Report
Question
I have two models: class ModelA(models.Model): name = models.CharField(max_length=256) class ModelB(models.Model): user = models.ForeignKey(MyUser) model_a = models.ForeignKey(ModelA) points = models.IntegerField(default=0) How can I prevent creating the same object? For example: I have ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
1 Answer 14 views

Report
Question
I’m new to Django. I’m very familiar with Python. We’re working with Django 1.8 (I thought with 1.18… this was part of my confusion but by far not all). In most cases I try to find documentation Google sends me ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
2 Answer 7 views

Report
Question
I’m having a weird issue when using a ModelForm as a form_class for UpdateView. First of all: When using the UpdateView without the form_class tag, everything works perfectly. However, when I try to use the ModelForm (because I want to ...

Please briefly explain why you feel this question should be reported .

Report Cancel
0
0 Answer 4 views

Report
Question
i have: Django 1.9 django-registration 2.1 I want to extend default django user with “about me” field. From docs suggested solution: models.py: class ExtendedUser(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) about = models.TextField() forms.py: class RegisterForm(RegistrationForm): class Meta: ...

Please briefly explain why you feel this question should be reported .

Report Cancel
0
0 Answer 83 views

Report
Question
Can anyone tell me if its possible to send multiple variables from field names to a template tag? this question How do I add multiple arguments to my custom template filter in a django template? is almost there, but i ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
1 Answer 67 views

Report
Question
Models.py class Liked(models.Model): user = models.ForeignKey(User, null=False, blank=False) content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) object_id = models.PositiveIntegerField() content_object = GenericForeignKey('content_type', 'object_id') class Series(models.Model): likes = GenericRelation(Liked) ...

Please briefly explain why you feel this question should be reported .

Report Cancel
0
0 Answer 7 views