Will do, thanks
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://grou
There in your template...that closing form tag...is it a typing error?I
can't see the second closing tag
On Mar 30, 2020 13:23, "Ernest Thuku" wrote:
> Try this
> On Mar 30, 2020 12:58, "Jeff Waters" wrote:
>
>> Thanks Ernest.
>>
>> I'm not sure I follow (forgive me, I am very new to Django).
>>
Thanks Ernest.
I'm not sure I follow (forgive me, I am very new to Django).
Given that template_name is defined earlier in the method as
'add_comment.html', surely what I've written is equivalent to:
return render(request, add_comment.html, {'image': image,
In the views why have you used templane_name while you not using class
based views...try and change that to render the template using request
On Mar 30, 2020 11:55, "Jeff Waters" wrote:
> Sure. It's as follows:
>
> @login_required
> def add_comment(request, image_id):
> template_name = 'add_c
Sure. It's as follows:
@login_required
def add_comment(request, image_id):
template_name = 'add_comment.html'
image = get_object_or_404(Picture, id=image_id)
comments = image.comments.filter(active=True)
new_comment = None
# Comment posted
if request.method == 'POST':
Can you display your views please?
On Mar 30, 2020 05:13, "Jeff Waters" wrote:
> Apologies if I'm posting this twice - my original message isn't displayed
> in the list of messages.
>
> I am creating a website using Django. I'd like to give users the chance to
> comment on pictures they have post
Apologies if I'm posting this twice - my original message isn't displayed in
the list of messages.
I am creating a website using Django. I'd like to give users the chance to
comment on pictures they have posted. I have created a comment model and a
comment form, and put the following code into
Thanks guys. @matias I tried your solution, and the post button
appeared. After clicking on it, I get 'COMMENT POST NOT ALLOWED (404)'
Please whats wrong?
On Feb 12, 4:37 pm, Matías Aguirre wrote:
> Excerpts from Michael P. Soulier's message of 2012-02-12 14:16:26 -0200:
>
>
>
>
>
> > On 12/02/
Excerpts from Michael P. Soulier's message of 2012-02-12 14:16:26 -0200:
> On 12/02/12 coded kid said:
>
> > Below is the codes in my comments/form.html
> > {% load comments i18n %}
> > {% csrf_token
> > %}
> > {% if next %} > value="{{ next }}" />{% endif %}
> > {% for field in form %}
> >
On 12/02/12 coded kid said:
> Below is the codes in my comments/form.html
> {% load comments i18n %}
> {% csrf_token
> %}
> {% if next %} value="{{ next }}" />{% endif %}
> {% for field in form %}
> {% if field.is_hidden %}
> {{ field }}
> {% else %}
> {% if field.errors %}
Hi guys, please help me out with django-comments form. I added :
'django.contrib.comments', to INSTALLED APPS
(r'^comments/', include('django.contrib.comments.urls')), to urls.py
and I copied the default templates from
django.contrib.comments.templates.comments to my app templates
directory.
Af
11 matches
Mail list logo