django-pagelets
django-pagelets copied to clipboard
Edit pagelets link should use a name not a slug
What steps will reproduce the problem?
- create a template
- use the render_pagelet template tag eg {% render_pagelet "foo_bar" %}
- load the page in a browser as a logged in user
What is the expected output? What do you see instead? I see "edit foo_bar". This is the slug for the pagelet. The slug is not used to generate the edit URL (the id is used). It is only used to create the edit link. Why make a restricted slug instead of any string for the link. ie. Why not create a pagelet.name and display that instead of the slug when rendering the edit link.
copied from: http://code.google.com/p/django-pagelets/issues/detail?id=1
Afew options.
- Add a new column name and migrate the old entries' slugs into it.
- Make a name method that capitalizes and adds spaces to the slug.
- Just cap and space the slug in the template itself