Not sure what is causing this error. Please help NameError at /dash/ name \'Business\' is not defined Exception Location: /home/src/common/models.py in ImageBank, line 38
I am using Django. I am having a few issues with caching of QuerySets for news/category models: class Category(models.Model):
I have a Mod开发者_如何学编程el with 100 identical fields named field_1, field_2, and so on. Is there a method to define these fields in a cycle (just to avoid writing and maintaining 100 rows)?
I am using Django-secretballot app which allows anonymous voting. First we register a model for secret voting and then there is a function add_vote() which takes 2 arguments. \'Token\' and vote value(
I\'m trying to u开发者_开发技巧se on_delete with my models but my IDE is asking me for: collector, fields, sub_objs, using (i.e. ..., on_delete=models.PROTECT(collector, fields, sub_objs, using)).
I am preparing a Examination website for my students. Simple website, with use of Django\'s admin interface to create the Question paper.
I am storing data as Integers: class Something(models.Model): value = models.IntegerField(blank = True)
My models.py: SHOP1_CHOICES = ( (\'Food Court\', \'Food Court\'), (\'KFC\', \'KFC\'), ) SHOP2_CHOICES = ( (\'Sports Arena\', \'Sports Arena\'),
In order to sign users in after registering them, I manually set the user.backend property.It normally works in my views.In this instance, I\'m trying to register the user via AJAX.It is raising an At
I have this custom primary key in a model: class Personal(models.Model): name = models.CharField(max_length=20,primary_key=True)