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

Url event by its name #30

Open
Reston opened this issue Mar 3, 2015 · 1 comment
Open

Url event by its name #30

Reston opened this issue Mar 3, 2015 · 1 comment

Comments

@Reston
Copy link

Reston commented Mar 3, 2015

I think there should be a possible more friendly URL for users as domain.com/calendarium/event-name

Is there any way to implement this method?

@Tyrdall
Copy link
Member

Tyrdall commented Mar 3, 2015

Sure, but the event.title attribute is not unique, so we will have to add a unique slug field. Then we can call the slug in the URL. We aren't working with thap app at the moment, so pull requests are very welcome.

TO DO:

  • Add slug field
  • Create a datamigration, which generates unique slugs from the event's title
  • Add functions to auto-generate slugs on event creation, if no custom slug has been set
  • Prepopulate fields in admin.py

Then URLs should look like http://localhost:8000/calendar/party-all-night-vol-two and for a second event with the same title http://localhost:8000/calendar/party-all-night-vol-two-2.

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

2 participants