Re: NoReverseMatch at /catalog/author/1

2018-10-05 Thread Manjunath
Seems like you are not passing the argument along with the url. Please share your template file to verify. On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote: > > Hello guys, i am in dire need of any django user's knowledge, i have this > issue that has been bugging me literal

Re: Need help with unique_together - on ForeignKey and Boolean field

2018-10-05 Thread Manjunath
How are you deciding which post is pinned? The unique approach might not do any good to you. A simple solution is to update the pinned values of each post to False & setting the required post pinned value to True when you are setting a pinned post. There may be better solutions, but I hope this m

Re: Need help with unique_together - on ForeignKey and Boolean field

2018-10-05 Thread heriberto ochoa
well, maybe using forms, and the parameter initial of the send form to the template https://docs.djangoproject.com/en/2.1/ref/forms/fields/#initial or directly with javascript El vie., 5 oct. 2018 a las 10:35, Chuka Nwadiogbu () escribió: > Hi, I know it has been a while since this question was a

Re: Need help with unique_together - on ForeignKey and Boolean field

2018-10-05 Thread Chuka Nwadiogbu
> > Hi, I know it has been a while since this question was asked but I have a > similar question. I have a Post model, and I want there to be one pinned > post out of the list of all posts, I tried creating a new property thus, ```pinned = models.BooleanField(default=False, unique=True)``

Re: db_index=True not creating indexes

2018-10-05 Thread Jason
depending on the index and the fied, you might have to create the custom index yourself with runsql in a migration -- 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

Re: db_index=True not creating indexes

2018-10-05 Thread Web Architect
Hi Mathew, Thanks for your response. I did run makemigrations before running migration. There were no issues with those. But somehow the indexes were not showing on the tables when I ran SHOW INDEX from tablename;. That's the reason I was thinking of creating the indexes manually. I will lo

RE: db_index=True not creating indexes

2018-10-05 Thread Matthew Pava
Hi, I’m using Django 2.0 and PostgreSQL 9.something, but my tables do have indexes. Did you run the makemigrations command before running the migrate command? Also, you can modify the database that Django uses however you want with some caveats. Anyway, you can add views and modify columns and

db_index=True not creating indexes

2018-10-05 Thread Web Architect
Hi, We are using django for our ecommerce website. I am facing a strange issue. I was trying to index a field in a table and hence, set db_index=True in the field declaration. I ran migrations but when I checked the indexes for the table, the index for the field wasn't there. There were also

Re: Django table with checkboxes

2018-10-05 Thread myskyroute
Hi, I am actually looking for a quick help on the same issue. Trying to learn and create a delete button with checkbox's, *Models:* class Customer(TimeStamp): name = models.CharField(max_length=30, unique=True) description = models.CharField(max_length=100, blank=True, help_text="Long-

Re: Creating superuser

2018-10-05 Thread Nagarjuna J
once migrations are completed successfully. then check urls.py, bellow two lines are there are not from django.contrib import admin path('admin/', admin.site.urls), then browse this http://127.0.0.1:8000/admin On Fri, Oct 5, 2018 at 4:36 PM VIPIN VIPIN wrote: > This is not working > > > On

Re: Creating superuser

2018-10-05 Thread VIPIN VIPIN
This is not working On Thursday, October 4, 2018 at 11:53:42 PM UTC+5:30, SHUBHAM .SINGH. RATHORE wrote: > > First of all makemigrations and migrate than creatsuperuser > > > On Thu 4 Oct, 2018 11:47 pm VIPIN VIPIN, > wrote: > >> id is : 12345 > > password: 12345Vipin >> >> -- >> You