django-database
Django - legacy db and problems with 'id' field
I\'m integrating a MySQL database from a php app into a new Django project. Inspectdb worked well, I just had to change a couple of fields to ForeignKeys and now all the reading and editing current da[详细]
2023-04-06 01:08 分类:问答Client insists on making an editable column the primary key of a table
I\'m 开发者_StackOverflow中文版building a web app on Django. The client insists that some column on some table should be the primary key, he doesn\'t want autoincrement one. But also he wants that col[详细]
2023-04-03 02:47 分类:问答Django : refresh issue on selection field
I have a choiceField called from a context_processors so it can appear in all of my site\'s pages. It provides the projects existing in a database. The problem is that it does not refresh correctly.[详细]
2023-04-02 21:00 分类:问答Django dump : models don't validate
When I try to dump the data of my model in Django with this instruction : python manage.py dumpdata app> temp_data.json[详细]
2023-03-27 16:48 分类:问答Django Column 'id' cannot be null
I am having a weird problem with my mysql database and django. I created an app with a model imported from an existing database with inspectdb. It was working fine until yesterday I removed the djang[详细]
2023-03-27 09:49 分类:问答Django create several records at a time
I want to be able to create as many records as a user wants for a database table in a single form. For example, there will be some inputs for the data required for a record and at the end of the line[详细]
2023-03-25 05:59 分类:问答Complex 'AND' Django Queries
I\'m trying to do the equ开发者_开发百科ivalent of this SQL query: \"SELECT * FROM something WHERE ((something >= something AND something <= something) AND(something >= something AND somethi[详细]
2023-03-23 14:19 分类:问答Where is the ON DELETE CASCADE logic being implemented in Django? (PostgreSQL is used)
I just need a confirmation for my understanding on Django\'s implementation of ON DELETE CASCADE from you Django experts.[详细]
2023-03-21 02:39 分类:问答Django - ForeignKey issue. How many DB accesses?
I am currently using Django and my model is like this. class City(models.Model): name = models.CharField(max_length=255, primary_key=True)[详细]
2023-03-20 08:15 分类:问答Django multiple and dynamic databases
I\'ve been evaluating django and wondered if the following is possible. I\'ve already looked at the regular multiple database docs so please don\'t point me to that because this use case isn\'t mentio[详细]
2023-03-17 23:33 分类:问答