Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe it's better this way #2

Open
Elon8 opened this issue Feb 8, 2019 · 0 comments
Open

Maybe it's better this way #2

Elon8 opened this issue Feb 8, 2019 · 0 comments

Comments

@Elon8
Copy link

Elon8 commented Feb 8, 2019

at rango/views.py
def show_category(request, category_name_slug):
context = {
'category_name_slug': category_name_slug,
}
...

and then , the template: category.html
<a href="/rango/category/{{ category_name_slug }}/add_page/">Add Page</a>

use category_name_slug is better than use category.slug , Especially when try a wrong category_name_slug in the URL , and press the 'Add Page' link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant