The problem might not be from the HTML template but the View.
All the HTML elements within your for loop will not display if there are no
records to loop through in "comments"
On Mon, Mar 30, 2020, 3:14 PM Jeff Waters wrote:
> Hi
>
> I have written some code that allows users of a website to com
What you passed to the context in your views.py is 'comment', but you are
looping through 'comments' in the template
On Mon, Mar 30, 2020, 3:52 PM Jeff Waters wrote:
> Hi
>
> Thanks for getting back to me.
>
> This is from my views.py:
>
> @login_required
> def add_comment(request, image_id):
>
Let's see your url.py
On Mon, Mar 30, 2020, 10:03 PM Jeff Waters wrote:
> I've modified my code a bit to try (unsuccessfully!) to get this working.
>
> My views.py is now as follows:
>
> @login_required
> def add_comment(request, image_id):
> new_comment = None
> template_name = 'add_com
In def Namev_view under views.py, include form in the return parameter and
see if that resolves the issue
return render(request, 'namev.html', {'form':form})
On Sat, Apr 4, 2020, 1:35 AM Ifeanyi Chielo
wrote:
> Hello,I developed a form with a single field, but this form displays only
> the su
'CHIELO\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages']
>
> Server time: Sat, 4 Apr 2020 11:27:07 +
> Dr. Chielo C. Ifeanyi
> Chief Programmer,
> Head Webometrics Section
> ICT Unit, UNN
> 08032366433, 08154804230
> ifeanyi.chi...@unn.edu.ng
>
Hi,
I've just forked the repository on your github account.
On Wed, May 6, 2020 at 4:21 PM Sherif Adigun wrote:
> Thanks. Checked. Good job. I think I've got more features than you.
>
> Latest commits now have authentications
>
> On Tuesday, May 5, 2020 at 9:37:26 PM UTC+1, Sherif Adigun wrote:
Yes that's possible since you are using Ajax. It should be something like
this:
$.ajax({
url: '{% url "" %}',
data: {
'x': ,
},
dataType: 'json',
success: function (data) {
if (data.added_item) {
item = ""
+ data.added_item + "";
$("#selectListID").append(item);
}
}
});
On Mon, May 25, 2020 at 7:56 PM Luqman Shofuleji
wrote:
> Yes tha
Hi,
Please also attach the code of your list template where the delete is been
executed.
On Mon, May 25, 2020 at 1:39 AM Ifeanyi Chielo
wrote:
> Hello,
> I performed a CRUD operation and every thing is working well except two
> things
> 1. my insert form does not clear the text boxes after savi
rm = SoapprodForm(request.POST,instance= soapprod)
if form.is_valid():
form.save()
form = SoapprodForm()
return render(request, "soapprod_form.html", {'form': form})
On Tue, May 26, 2020 at 8:07 AM Luqman Shofuleji
wrote:
> Hi,
>
&
Sorry little mistake there:
Then in your template:
{% for a in mylist %}
{{ a }}
{% endfor %}
On Wed, Oct 9, 2019 at 2:27 PM Luqman Shofuleji
wrote:
> 1) you forgot
1) you forgot to include {% endfor %} in you template
2) I believe in your view all you actually need is:
mylist = ['aa','bb']
return render({'mylist':mylist})
Then in your template:
{% for a in mylist %}
{{ mylist }}
You need to do some little reading about Django aggregation
https://docs.djangoproject.com/en/2.2/topics/db/aggregation/#topics-db-aggregation
Example
from django.db.models import Max, Count, Sum
Publisher.objects.values('name').annotate(*dcount*=Count('name'))
As seen above you can apply simila
Try using django-mathfilters.
https://pypi.org/project/django-mathfilters/
On Wed, Dec 18, 2019, 11:55 PM Adeotun Adegbaju
wrote:
> you should indicate which files codes should be added to
>
> On Tuesday, November 18, 2008 at 11:21:09 PM UTC+1, Daniel Roseman wrote:
>>
>> On Nov 18, 7:55 pm, ja
14 matches
Mail list logo