Most voted "django-generic-views" questions
5 questions
Sort by count of
-
1
votes1
answer1346
viewsDifference between get_context_data and get_queryset and code improvement (Django)
i wanted to know the difference between get_context_data and get_queryset. And I would like to know your opinion about my codes. What’s right and what’s wrong in them?…
-
1
votes1
answer92
viewsChanging the template_name in Templateview (Django)
How do I change template_name in Templateview if user is authenticated? Look what I tried class Home(TemplateView): # template_name = 'index.html' is_auth = False def get(self, request): if not…
-
0
votes1
answer77
viewsPerformance in Queryset CBV
# models.py class Book(TimeStampedModel): name = models.CharField(_('nome'), max_length=50) authors = models.ManyToManyField('Author', verbose_name='autores') price =…
-
0
votes1
answer533
viewsHow to print page
I want to create a template for printing data but I’m a little lost on how to do this, I have a print name button, the same is found in a table that contains the customer name, telephone address etc…
-
0
votes0
answers12
viewsReturn data with CBV using parameters in the Django url
Good evening. I am trying to return the data of a query, and even managed to make the query work. The problem is when to send the data to the template. Always appears the error that has to be a…
python django url framework django-generic-viewsasked 3 years, 7 months ago Sergio Sacchetti Junior 55