Report
Question
When I read Django code I often see in models what is called a “slug”. I am not quite sure what this is, but I do know it has something to do with URLs. How and when is this slug-thing ...

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

Report Cancel
solved 0
8 Answer 2 views

Report
Question
I have a Donation model defined as: Donation project = models.ForeignKey(Project) user = models.CharField() Each user can donate multiple time to any project, so in db I can have the following: Donation ------------------- project | user ------------------- 1 ...

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

Report Cancel
solved 0
1 Answer 18 views

Report
Question
Right now I have two models (in the future could be more): class UserProfile(models.Model): first_name = models.CharField(_('first name'), max_length=30, blank=True) last_name = models.CharField(_('last name'), max_length=30, blank=True) birth_date = models.DateField(_('birth date'), null=True, blank=True) class ...

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

Report Cancel
solved 0
1 Answer 16 views

Report
Question
So, my app should dynamically create inlineformset with variable number of extra forms depending on kwargs and/or session cookie. Then, once submitted, I should be able to validate and save the data. At first, I tried to create ...

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

Report Cancel
0
0 Answer 17 views

Report
Question
I have a model of restaurant and userprofile. Restaurant has all the restaurant information and userprofile has information related to user like username, all the restaurants that he/she has, address, order he/she has, restaurant he/she has favorited, and is_owner.But i ...

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

Report Cancel
0
0 Answer 24 views

Report
Question
How to view tables in django? I want to query the module that i have and want it to be appearing in the form of a table like how is happens in sql. I am working on django shell. I have ...

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

Report Cancel
solved 0
1 Answer 12 views

Report
Question
i am trying to extend the user model by creating a new model: from django.db import models from django.contrib.auth.models import User class utilisateur(models.Model): user = models.OneToOneField(User) sexe = models.CharField(max_length=1, blank=True) ville = models.CharField(max_length=50, blank=True) avatar = models.CharField(max_length=10000, blank=True) pays = models.CharField(max_length=50, blank=True) nbConnexion = models.IntegerField(default=0) fiabilite = models.IntegerField(default=0) nbMessages ...

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

Report Cancel
solved 0
2 Answer 12 views

Report
Question
When I have a QuerySet that may be empty, and is OK to be empty, I usually do: results = MyModel.objects.filter(something) if results: work on results Is the conditional automatically translated to bool(results), or is different to explicitly call bool() ...

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

Report Cancel
solved 0
1 Answer 8 views