django-models
Design problem with a component that should automatically create a database record when another one is saved
I have a situation where I want to create a menu item in the database whenever a record is created. I need to design a component that will create the mentioned menu item.[详细]
2023-04-05 12:43 分类:问答Django Many to Many display values, not object
I\'m working with Django 1.3, with the following 2 models: class Person(models.Model): name = models.CharField(max_length=500)[详细]
2023-04-05 12:02 分类:问答Django : How to ensure a unique value for a field or group of fields in a record / form
I\'m using a ModelForm and i\'m happy with the default validation and errors. In my template i use a simple:[详细]
2023-04-05 11:49 分类:问答What type of inheritance allows this
I have 2 simple models; a \"JobInfo\" model and a \"Contact\" model. class JobInfo(models.Model): client = models.Ch开发者_运维知识库arField(max_length=50, choices=CLIENT_CHOICES)[详细]
2023-04-05 11:19 分类:问答How can I make a join table with Django models?
I\'m a beginner bumbling through a Django guide and it told me to put this in models.py: class Bookmark(models.Model):[详细]
2023-04-05 05:44 分类:问答How do I make a model formset based on another model
I currently have two Django Models, on it like a setup model and another is the actual data for that model. Like this:[详细]
2023-04-05 04:01 分类:问答Django-Media For Each app in apps
How Can Make media For Each app In One Project??? For Example I Have A Project That\'s Name Is MyProject And Have Tow Application That\'s Names Are myapp1 and myapp2 And Want To Make Medi开发者_C百科a[详细]
2023-04-05 01:34 分类:问答How do I return data from a related model in Django Tastypie?
How do I bring in the information from another model? I have two models Article, and ArticleBody Article containing the main info and ArticleBody containing a loop of body and image information[详细]
2023-04-04 23:53 分类:问答How to filter with manytomany field?
I have model\": class MyModel(models.Model开发者_如何学JAVA): field1 = ... sites = models.ManyToManyField(Site, blank = True, null=True)[详细]
2023-04-04 22:58 分类:问答Django admin - importing images to the text
I\'ve pasted below small part of my models class. It\'s a class for publishing entries (articles, blog posts etc.). On most we开发者_开发知识库bsites news images are pasted below the text of message.[详细]
2023-04-04 22:34 分类:问答