gdesmott / manger-veggie

GNU Affero General Public License v3.0
5 stars 4 forks source link

Generate restaurant url using their name #5

Open gdesmott opened 9 years ago

gdesmott commented 9 years ago

something like /mr-falafel

Psycojoker commented 9 years ago

We should use slugify of django for that https://docs.djangoproject.com/en/1.7/ref/utils/#django.utils.text.slugify and probably store them in a SlugField if we .get on them for performances reasons https://docs.djangoproject.com/en/1.7/ref/models/fields/#slugfield

gdesmott commented 9 years ago

So we have two options here: a) /$id-mr-falafel and match only $id when searching in the DB b) /mr-falafel