Re: Django use id=models.IntegerField(primary_key=True) as autokey

2019-07-03 Thread Piotr Duda
W dniu środa, 3 lipca 2019 03:34:30 UTC+2 użytkownik P O napisał: > > Hello, > sorry if I am wrong, but I use somethig like: > id=models.IntegerField(db_name="some_id", primary_key=True) > and Django uses auto-key when I add objects this way: > obj = Obj() > obj.some_id= 1 > obj.save() > obj = Obj(

Re: invalid literal for int() with base 10: 'admin'

2019-06-26 Thread Piotr Duda
Try move first path to end in your main urls.py. W dniu wtorek, 25 czerwca 2019 17:17:04 UTC+2 użytkownik Harshit napisał: > > Here is urls.py of my app > > from django.urls import path > from . import views > from django.conf import settings > from django.conf.urls.static import static > > app_na