django-models
Django: can I add a list of new model instances to the database via a single method call?
If I am creating a list of new m开发者_开发百科odel objects based on some form input, e.g., new_items = [][详细]
2023-04-06 16:16 分类:问答Custom View on a table in the administration console
I have a simple table in my Django app that looks like: class Setting(models.Model): group = models.CharField(null=False, max_length=255)[详细]
2023-04-06 14:46 分类:问答overriding methods of ModelAdmin
I am working on a Django project where any time an admin does something in the admin console (CRUD), a set of people gets notified.I was pointed to three methods on ModelAdmin called log_addition, log[详细]
2023-04-06 13:10 分类:问答Customize Django admin index page to display model objects
In the Django admin index page, the app and its models will normally be listed. How can the model objects also be listed in this index page? Instead of displaying just the app, I want to also d开发者_[详细]
2023-04-06 07:24 分类:问答In Django, why do I need to add the site name to imports in tests.py?
I\'ve put some unit tests in mysite/vncbrowser/tests.py, and I can run these with: cd mysite python manage.py test vncbrowser[详细]
2023-04-06 06:48 分类:问答How to obtain a QuerySet of all rows, with specific fields for each one of them?
I have a model Employees and I would like to have a QuerySet of all rows, but with some specific fields from each row, and not all fields.[详细]
2023-04-06 06:23 分类:问答How to do a reverse foreignkey lookup for all records in Django?
I\'m trying to do a reversed SQL lookup using Django 1.3. I found a lot of related questions, but unfortunately I can only find the answer for doing this on a single record, not on multiple records at[详细]
2023-04-06 04:16 分类:问答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 分类:问答dynamic FilePathField question
I have a model where the location of pdf directory I\'m pointing to with my FilePathField is based on the \"client\" and \"job_number\" fields.[详细]
2023-04-05 18:57 分类:问答How to fill model field value from a different ModelForm field with some calculation?
I want to have age fiel开发者_开发百科d in my ModelForm and use it to fill birth_year in the model.[详细]
2023-04-05 12:50 分类:问答