SLUG - not working if I use an other name than slug in my model

2021-07-16 Thread Deep Diver63
Hi, I'm new on Django. I'm trying to develop a site that will have several Django-app. I would like to define an unique name for slug in each model (for example airslug defined as SlugField in my aircraftt model). I use a ListView that call a DetailView and I need the slug to have the right URL.

Re: Slug not working

2019-04-19 Thread Gabo LaTo
Hi Aakash, it' a bit difficult to read it in the email, could you paste it in a pastebin/github or any code snippet share app? As far as I can see here, you are not adding the slug to the url in your website, so django cannot map your url to your code. It's better if you share a github repository

Re: Slug not working

2019-04-18 Thread Aakash Baranwal
Can anyone kindly suggest what I am doing wrong? Thanks Aakash On Thu, Apr 18, 2019 at 3:10 PM Aakash Baranwal wrote: > Hi Everybody, > > This is my models.py file: > > from django.db.models.signals import pre_save > from django.utils.text import slugify > from django.db import models > from dj

Re: Slug not working

2019-04-18 Thread Aakash Baranwal
Hello Sir, As of now, I haven't thought of making any tutorials as I am just learning. Best Aakash On Thu, Apr 18, 2019 at 4:05 PM fofa Zu wrote: > idk what is the problem but i liked your app it is a tutorial if is it may > i get the link thanks > > ‫في الخميس، 18 أبريل 2019 في 12:41 م تمت كت

Re: Slug not working

2019-04-18 Thread fofa Zu
idk what is the problem but i liked your app it is a tutorial if is it may i get the link thanks ‫في الخميس، 18 أبريل 2019 في 12:41 م تمت كتابة ما يلي بواسطة ‪Aakash Baranwal‬‏ <‪baakash1...@gmail.com‬‏>:‬ > Hi Everybody, > > This is my models.py file: > > from django.db.models.signals import pre

Re: searching by slug not working in cases with spaces (that really rolls off the tongue)

2010-06-06 Thread joelklabo
Yes! Thank you! I just used the (.+) for now, it's working. On Jun 6, 7:23 pm, James Gregory wrote: > or, if there's nothing that comes beneath brewery, just (r'^brewery/(. > +) > > On Jun 7, 3:17 am, James Gregory wrote: > > > > > The regex class "\w" doesn't include spaces, so maybe you need >

Re: searching by slug not working in cases with spaces (that really rolls off the tongue)

2010-06-06 Thread James Gregory
or, if there's nothing that comes beneath brewery, just (r'^brewery/(. +) On Jun 7, 3:17 am, James Gregory wrote: > The regex class "\w" doesn't include spaces, so maybe you need > (r'^brewery/([\w ]+). Then again spaces in urls are represented as > "%20", so maybe you need (r'^brewery/([\w%]+),

Re: searching by slug not working in cases with spaces (that really rolls off the tongue)

2010-06-06 Thread James Gregory
The regex class "\w" doesn't include spaces, so maybe you need (r'^brewery/([\w ]+). Then again spaces in urls are represented as "%20", so maybe you need (r'^brewery/([\w%]+), can't be bothered to test right now. Or maybe I'm totally wrong. James On Jun 7, 3:05 am, joelklabo wrote: > bumping th

Re: searching by slug not working in cases with spaces (that really rolls off the tongue)

2010-06-06 Thread joelklabo
bumping this, I'm still at a loss... On Jun 5, 1:28 pm, joelklabo wrote: > I am trying to capture the slug from a URL to search and find the > object with that slug. Here is my URLconf: > >         (r'^brewery/(\w+)', breweryDetail), > > It works when there are no spaces in the slug, but nothing

searching by slug not working in cases with spaces (that really rolls off the tongue)

2010-06-05 Thread joelklabo
I am trying to capture the slug from a URL to search and find the object with that slug. Here is my URLconf: (r'^brewery/(\w+)', breweryDetail), It works when there are no spaces in the slug, but nothing comes up when there are. There are no errors just no results showing up. Here is my v