I have seemingly redundant code in Django Views which evaluates the same query-set (Model.objects.all()) but with different field names: def overview_view(reque
I am doing a simple form site with Django. This is what my sites url is looks like: mysite.com/register/12345678 I want to print the part after the register (12
In my django project, I have made a view class by using TemplateView class. Again, I am using django channels and have made a consumer class too. Now, I am tryi
I am relatively new to Django so I am likely doing something obviously wrong but I cant seem to figure out what exactly. I have a model called Report and this h
i'm trying to access my model using both method but one of them is not working in my view. i want when a user click on {{question.title}} in my home page to be
So I have the following code: # the view class UpdateDateView(LoginRequiredMixin, UpdateView): model = Date form_class = DateForm template_name = '
I have changed the input's name attribute to some custom name, but the view calls form_invalid method. Why my Form isn't saving (validating)? html: <tr>
I have created filters that filter API responses, if the response contains at least one letter in the value as substring, I need to create a filter to filter re
As soon as the django user_logged_in signal works, I want to send data to my template at that moment.I need to check if my signal is working. from django.contri
I am trying to display some extra context on the page, but when I adding get_context_data method it is displayed context but not a forms fields. This is because
While working in Django I am trying to take a variable from HTML input, pass it to views.py for some decision making, then pass it from views.py to a separate p
right now my template looks like this I wish to use those cards as the choices in the form that is on the right side. i am a newbie so i cant figure out how. is
I am currently learning Django,I connected my register FORM with my views.py, and wrote a little backend code, the problem, is that it links successfully with m
my problem is that the login operation is done correctly and the session is set up correctly, but user.is_authenticated does not work. The point is that it work
After you sign up, you are prompted to a page that contains a form used for gathering additional information about the new user and after that it redirects you
I want to replicate the admin functionality shown in the screenshot below on the client side. This is app is meant to cost a recipe based on the ingredients and
im learning Django framework and having some issues that i dont get it. Actually i have apps like Polls/ Blog/ and my homepage/ installed and working as i want
[enter image description here][1] [1]: https://i.stack.imgur.com/2wDSL.png NameError! I am following Django tutorial in part 5 when try to run test, getting e
I need to filter API response based on URL parameters that both exact match and also the substring of the parameter matches in Django. The API call would be : "
when ever i add data to the form i got extra puncuation marks in the value as shown in the image. for example - name = xyz while saving i get name = ('xyz',) Th