django-pagelets icon indicating copy to clipboard operation
django-pagelets copied to clipboard

Edit pagelets link should use a name not a slug

Open tobiasmcnulty opened this issue 14 years ago • 1 comments

What steps will reproduce the problem?

  1. create a template
  2. use the render_pagelet template tag eg {% render_pagelet "foo_bar" %}
  3. 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

tobiasmcnulty avatar Sep 09 '10 05:09 tobiasmcnulty

Afew options.

  1. Add a new column name and migrate the old entries' slugs into it.
  2. Make a name method that capitalizes and adds spaces to the slug.
  3. Just cap and space the slug in the template itself

glassresistor avatar Apr 05 '11 19:04 glassresistor