Does anyone have a Django add, delete, modify, check project? If you have done it, please send it to me.

Who has a Django add, delete, modify, check project? If you have done it, send it to me update html: urls.pyurlpatterns = patterns(”,(‘^area_update/$’, area_update),)models.pyclass Area(models.Model): val = models.CharField(max_length=255, blank=True, null=True)views.pydef area_update(request): id = request.REQUEST.get(‘id’) val = request.REQUEST.get(‘val’) area = Area.objects.get(id=id) area.val = val area.save() return HttpResponse(“ok”)Python is the language and django is the framework. How does Django display the contents of the database in admin How to do it: First, run the python manage.py createsuperuser command to create an administrator account. Then enter /admin in the URL to reach the administrator login page. After logging in, you will find that there are no items to be displayed in the database because we have not registered yet. Next we register the data model to be managed in admin; register the model in admin.py. Then refresh the page and you will see the ContactMessage data table. You can add and delete in it for simple addition, deletion, modification and query. How to create a Django website This article demonstrates how to create a simple Django website. The Django version used is 1.7. 1. Create a project. Run the following command to create a Django project. The project name is mysite: $ django-admin.py…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索