As I saw earlier, Django does not allow you to have two rows as autofield,
you can make your own save method for model. Ex. get first of
YourModel.objects invert sorted by wanted field, add to it's value 1 and
save
ср, 17 жовт. 2018, 08:55 користувач Rakhee Menon
пише:
> Hi Everyone,
>
> I have
You can read how to generate models here:
https://docs.djangoproject.com/en/2.1/howto/legacy-databases/ without
models you'll need to write musch more code for managing and handling, and
point of using django will be lost)
вт, 16 жовт. 2018, 08:52 користувач Rakhee Menon
пише:
>
>
> I am sorry .
You need to import polls.views, and pass view.index into path func
Ex from polls import views
urlpatterns = [
path('polls/', views.index),
]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving em
If you wrote something like this:
if settings.DEBUG:
# static files (images, css, javascript, etc.)
urlpatterns += path(...)
Make shure that you defined urlpatterns before, like urlpatterns = [], or
probably missing definition sign. Need your's urls.py content for a correct
answer)
Sorry correct return self.author.username
--
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 post to this group, send
In class Comment in str method you need to user.username or something you want
as string, now you are returning full user object. Ex def __str__(self): return
user.username
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from th
6 matches
Mail list logo