Re: Improperly Configured at /blog/write/

2021-03-20 Thread Omkar Parab
Looks like, the slug is not configured correctly. Post the screen-shot of the models.py file of the "App_blog" App. On Sat, Mar 20, 2021, 4:48 PM Noyon Barman wrote: > Please help me what should I do now > > On Sat, Mar 20, 2021 at 12:39 PM Omkar Parab > wrote: > >> Post the screen-shot of app/

Re: Improperly Configured at /blog/write/

2021-03-20 Thread Omkar Parab
Your slug is adding extra characters after the main title. On Sat, Mar 20, 2021, 5:31 PM Omkar Parab wrote: > Looks like, the slug is not configured correctly. Post the screen-shot of > the models.py file of the "App_blog" App. > > On Sat, Mar 20, 2021, 4:48 PM Noyon Barman > wrote: > >> Please

Re: Improperly Configured at /blog/write/

2021-03-20 Thread Kasper Laudrup
On 20/03/2021 12.10, Noyon Barman wrote: > Please help me what should I do now > You should learn how to write a proper question. Just posting screenshots of error messages and not even doing the minimal effort required to solve the problem yourself or take the time to describe your problem is ext

Re: Improperly Configured at /blog/write/

2021-03-20 Thread Omkar Parab
First, import slugify πŸ‘‡ from django.template.defaultfilters import slugify then, Add this πŸ‘‡ below the "def __str__()" in your Blog model. def save(self, *args, **kwargs): if not self.slug: self.slug = slugify(self.blog_title) return super().save(*args, **kwargs) On

Re: Improperly Configured at /blog/write/

2021-03-20 Thread Noyon Barman
Thank you so much for helping me with this On Sat, 20 Mar, 2021 at 7:22 PM, Omkar Parab wrote: > First, import slugify πŸ‘‡ > > from django.template.defaultfilters import slugify > > then, > > Add this πŸ‘‡ below the "def __str__()" in your Blog model. > > def save(self, *args, **kwargs): > if

How regular expression work in djando

2021-03-20 Thread Black
*some of my code:* #urls.py urlpatterns = [ url(r"^$", views.home_page, name="home"), url(r"^(?P[0-9]+)/$", views.details, name="details"), ] #Views.py def details(request, album_id): return HttpResponse(f'You looking for album no: {album_id} |') what i wondering

Hi how to another app URL config to main project URLs

2021-03-20 Thread Mahendra
Mahendra Yadav -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://group

Re: Hi how to another app URL config to main project URLs

2021-03-20 Thread Omkar Parab
path('' ", include('name_of_your_app.urls')). Tip - You should learn more about, how to send an email. On Sat, Mar 20, 2021, 10:41 PM Mahendra wrote: > > > Mahendra Yadav > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe

Re: Improperly Configured at /blog/write/

2021-03-20 Thread Kelvin Sajere
Just adding to the previous answer, you should always make sure your slug field is unique when saving, as sometimes two posts can have the same title and that would result to an error. def _get_unique_slug(self): slug = slugify(self.blog_title) unique_slug = slug num = 1 while Blog.objects.filte

Re: Improperly Configured at /blog/write/

2021-03-20 Thread Kelvin Sajere
Sorry, the save method isn’t supposed to be inside the _get_unique_slug() function. That’s what happens when u type code on an iPad. On Sat, Mar 20, 2021 at 14:08 Kelvin Sajere wrote: > Just adding to the previous answer, you should always make sure your slug > field is unique when saving,

Re: load standard user settings per view

2021-03-20 Thread Ryan Nowakowski
I'd store the query parameters in the user's session: https://docs.djangoproject.com/en/3.1/topics/http/sessions/#examples On March 19, 2021 9:56:54 AM CDT, "sebasti...@gmail.com" wrote: >Hello, > >i have a addresslistview that also take parameter like pagingsize and >ordering over url. For ex