Tuesday, March 31, 2020
NoReverseMatch error message - Please help
NoReverseMatch at /photo_feed/ Reverse for 'add_comment' with arguments '('',)' not found. 1 pattern(s) tried: ['add_comment/$']
The code for the relevant part of the HTML document is as follows:
<h2>comments</h2>
{% if not comments %}
No comments
{% endif %}
{% for x in comment %}
<div class="comments" style="padding: 10px;">
<p class="font-weight-bold">
<h4>Comment by</h4> {{ x.user }}
<span class=" text-muted font-weight-normal">
{{ x.created_on }}
</span>
</p>
{{ x.body | linebreaks }}
</div>
{% endfor %}
</div>
<div class="card-body">
{% if new_comment %}
<h2>Your comment has been posted.</h2>
{% else %}
<h3>Leave a comment</h3>
<form action="{% url 'nowandthen:add_comment' image.id %}" method="POST">
{{ comment_form.as_p }}
{% csrf_token %}
<button type="submit" class="btn btn-primary btn-lg">Submit</button>
{% endif %}
The URLs.py entry for add_comment is path('add_comment/<int: image_id>', views.add_comment, name='add_comment'). Removing the int: image_id doesn't fix the problem.
When I go into admin, no ids appear to have been generated for the photos. Could it be that the problem is that there are missing IDs? If so, how do I fix this?
The repository URL is https://github.com/EmilyQuimby/my_now_and_then.
Thank you.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bb078990-f0e1-484a-a3dc-366f018b1df6%40googlegroups.com.
Problem to make billing
Dear all, i am developing Resturat Management system. I made models for all. I made a static webpage for billing using ajax. I have beverage and dishes model. Now i need to develop, sn with is auto increment as per items, bevereage/dishes items to select and type, rate as per items, qty should type as i know it i can do, total which must be calculate as per qty * rate, sub total and discount with grand total as per table number. Can ayone help me out.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0bd51f63-97c2-4c61-aadd-b4bf50139672%40googlegroups.com.
Re:
I am having a user model ( which include username,user email and password) and have another model user_detail . I want to add username column to user_ detail and want to show the details of that username who have logged in and filled the details..--How can i do this?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACqgSmBXCDeVV%3DX72zBk7ip%2B0-QXE81w88Szr43GjwBHMiPCrQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHV4E-euRiPmfb6Y5v9m72BtGS9%3DjByfvjNs1MpJFJcXsBy8Gw%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACqgSmBXCDeVV%3DX72zBk7ip%2B0-QXE81w88Szr43GjwBHMiPCrQ%40mail.gmail.com.
Hey can anyone help me how do I create such a gallery like spotify?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6c690d3f-120e-4a56-a1af-fd84200a6cd5%40googlegroups.com.
Monday, March 30, 2020
Re: Extending Django admin delete confirmation page
Greetings,--I am wondering if it is possible to extend Django Admin's delete confirmation page. I tried the following but the received template does not exist error page.% extends 'admin:admin/delete_confirmation.html' %}I refer to this website which stated it is possible to do so https://book.huihoo.com/django/en/1.0/chapter17/index.htmlI want to add a few custom actions which should require confirmation before proceeding.Thanks and RegardsGagan Deep
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c71f8c6c-c218-4dbc-ab4f-6c5c814d5a3a%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAE89-bcfPg9oTJGfy%2B4Hi1oAipJK5NTjuVkHvm9UVOM%3D0JURMw%40mail.gmail.com.
Re: HTML code not being read
show me your views--
On Monday, March 30, 2020 at 5:13:49 PM UTC+3, Jeff Waters wrote:HiI have written some code that allows users of a website to comment on photos in a picture gallery, using a form. However, when I test the code, no comments are displayed.
It would appear that Django is not processing the following code (from my HTML file for the photo gallery), given that 'Comment by' is not displayed on screen:
{% for comment in comments %}
<div class="comments" style="padding: 10px;">
<p class="font-weight-bold">
<h4>Comment by</h4> {{ comment.user }}
<span class=" text-muted font-weight-normal">
{{ comment.created_on }}
</span>
</p>
{{ comment.body | linebreaks }}
</div>
{% endfor %}Does anyone have any suggestions as to how I can fix this, please?
Thank you.
Jeff
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/85705553-9cd4-49e2-878e-8c0a903bc79f%40googlegroups.com.

