Skip to content

Tag: django-templates

How to fix website picture problem on HTML

Is there a problem with this code I tried reformatting the code, by replacing the products.url into the alt brackets. But it was what i typed on in the brackets that showed up. Answer I am not exactly sure what your problem is but I see problem in code, try replacing: to and then update this lines with new variable

List View is not working but get_context_data() works

I have a ListView but when I call it only the get_context_data method works (the news and category model, not the product) when I try to display the information of the models in the templates. view: There is also this piece of code: context = super().get_context_data(**kwargs) If it’s written before: categories = Category.objects.all() The Product model is show but not

NoReverseMatch at /login/ Reverse for ” not found. ” is not a valid view function or pattern nam

I don’t know why this problem is occuring. The login page is being rendered fine. But when I am clicking the Log In button after filling out the forms, I am getting this error. Can anyone help me solve this? My My My login.html file: Answer You’ve specified LOGIN_REDIRECT_URL = “”. The documentation for this setting says: The