Avatar ·

Variables in Django template

📁 django

I would like to use the {% url %} tag to avoid hardcoding, and I encountered the following problem:

  1. I pass a model containing page data

    {% for page in pagelist %}

  2. I want to insert the page name as a parameter, but Django complains about this syntax

    {% url 'blog.views.view' pagename={{page.name}} %}

    {% endfor %}

Please tell me what I am doing wrong

Avatar ·

Or you can simply add user nick to the www-data group, if it doesn't compromise security

And in general, the use case of running a dev server as the www-data user is not entirely clear, and what does that have to do with the fact that such a user exists in PostgreSQL

Log in to leave an answer

Blogs