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

Show slugs in the URLs of the events #443

Merged
merged 2 commits into from
Nov 6, 2021

Conversation

cmdelatorre
Copy link
Contributor

closes #243

La solución (simple) que implementamos es la siguiente: no modificamos las URLs, sino que al momento de mostrarlas (o sea en los templates), appendeamos #un-slug-del-titulo. Por ejemplo https://www.python.org.ar/eventos/60/#python-sprint-day-cordoba

De esta manera,

  • quedan URLs informativas, más amigables para los usuarios
  • No hay complicaciones técnicas ya que todo lo que sigue al # se puede obviar desde el punto de vista del backend (porque decidimos mantener el ID único de la instancia),
  • Permite que la URL cambie si se cambia el título de un evento, al mismo tiempo que las URLs pre-existentes siguen funcionando.

Laburo hecho con @emilioramirez y @tonisgo

Copy link
Member

@eduzen eduzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Está muy bien para mi!

@eduzen
Copy link
Member

eduzen commented Nov 16, 2018

@cmdelatorre quién tiene poder de merge?

@andpozo
Copy link

andpozo commented Nov 17, 2018

@cmdelatorre y @eduzen en esta linea esta roto https://github.com/PyAr/pyarweb/pull/443/files#diff-6878226b037734d1d7b05bc86f7571a1L22
donde dice:

{% url 'events:detail' object.event.id %#{{ object.event.name | slugify }}}

debe ir

{% url 'events:detail' object.event.id %}#{{ object.event.name | slugify }}

@eduzen
Copy link
Member

eduzen commented Nov 17, 2018

@cmdelatorre y @eduzen en esta linea esta roto https://github.com/PyAr/pyarweb/pull/443/files#diff-6878226b037734d1d7b05bc86f7571a1L22
donde dice:

{% url 'events:detail' object.event.id %#{{ object.event.name | slugify }}}

debe ir

{% url 'events:detail' object.event.id %}#{{ object.event.name | slugify }}

esa! bien visto

@facundobatista facundobatista merged commit e72805c into PyAr:master Nov 6, 2021
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

Successfully merging this pull request may close these issues.

agregar url amigable para eventos basada en autoslug
4 participants