X
init() takes 1 positional argument but 2 were given
X
class PostList(generic.ListView): queryset = Post.objects.all().order_by('-created_on') template_name = 'index.html' class GalleryList(generic.DetailView): queryset = Post.objects.all().order_by('-created_on') template_name = 'gallery.html'
X
is the queryset causing the problem?
A.M
This may be a dumb question, but is html,css and javascript pre requisite for django?
Mirco
If you wanna build a full stack web app otherwise if another team works on frontend isn't a very requisite but it's always good you have strong fundamentals
blank_
Hello, I am beginner in django. I want to get tomorrow by using default date in django model . Any solution of my problem please help
Mirco
Hello, I am beginner in django. I want to get tomorrow by using default date in django model . Any solution of my problem please help
It's not a Django issue, you just need to read python's date and timedelta documentation
Mirco
Anyway for example if you wanna have tomorrow, you can just use date.today() + timedelta(days=1)
Mirco
Or by using timezone from django.utils
Anonymous
Hwy guys ,does django-saleor support bitcoin payment
Doragonsureiyā
Thank you
You're welcome! 😊
Anonymous
hw can create a chat-bot in django site.
Mirco
hw can create a chat-bot in django site.
Google is your first friend
George
Hexagonal, clean, onion architecture. It has different names.
I used django skeleton i found on searching. Its eggcelent
Gar
hw can create a chat-bot in django site.
You can use Django channel , you can integrate a chatbot call chatterbot or you can use Rasa to build and then integrate it in Django
Vahe
Hello guys. Does anybody know how can I make my server autopull from git when I push changes to remote master. Please can you suggest me what topics can I read to know more about this?
raven
U should try any CI service
CD actually he said auto pull
X
Generic detail view blah must be called with either an object pk or a slug in the URLconf
X
the urlpatterns is set right
Mirco
Share urls and view
X
am using class based views
Mirco
Share code
X
class PostGallery(generic.DetailView): model = Post template_name = 'gallery.html'
X
urlpatterns = [ path('', views.PostList.as_view(), name='home'), path('gallery/', views.PostGallery.as_view(), name='gallery_link'), path('<slug:slug>/', views.PostDetail.as_view(), name='post_detail'), ]
X
gallery/ has no pk or slug
i tried adding slug:'title'
Mirco
just add gallery/<int:pk>/
Mirco
Or <slug:title> if your Post model has title
X
I did and am getting 404 error
Mirco
I did and am getting 404 error
Because you don't have that Post object
Mirco
Into your PostList show posts with a link to the PostGallery by passing the Post pk
X
can i dm u
Mirco
No
X
ok
Mirco
Just study better , it's one of the most basic things of Django
Luis
what is slug?
George
what is slug?
It's something about urls
Gaurav
Why does django-admin runserver naot working?
Bheeshma
Becz it is django manage.py runserver
Bheeshma
Why does django-admin runserver naot working?
For this you have to append --pythonpath=.... Settings = 'my project.settings '
Gaurav
Becz it is django manage.py runserver
I know this command.... Wanted to try django-admin runserver
Алексей
Hello everyone How to pass smth to kwargs in get request in class-based view? class MyView(View): def get(self, request, *args, **kwargs): print(kwargs)
Anonymous
Hi! There is some docs for learn Django?
Алексей
Hi! There is some docs for learn Django?
Hi! You can refer to official documentation https://docs.djangoproject.com/en/3.0/intro/tutorial01/
Anonymous
Hi! You can refer to official documentation https://docs.djangoproject.com/en/3.0/intro/tutorial01/
Thanks! What kind of knowledge about Python I should have before to approache Django?
Bheeshma
I mean list, tuple, Dictionary, loops, if else, functions, class, string
Muflone
I mean list, tuple, Dictionary, loops, if else, functions, class, string
these are only the basic concepts to start developing in Python
Alex
Thanks! What kind of knowledge about Python I should have before to approache Django?
i am not sure about how up-to-date this site is, just found it yesterday, but worth taking a look as a starter https://www.fullstackpython.com/
Alex
actually last update was in March 2020 ^
Anonymous
Hey guys can I use thesame method of integrating stripe in django ecommerce into django-saleor
Anonymous
actually last update was in March 2020 ^
I think is okay, last month...
Anonymous
I want to add an add-on system such that user can extend features after purchasing an add-on. How can I do that
Rajesh
Anyone know how to send csrf token to django from angular
Rajesh
Getting 403 on put request
Mirco
Anyone know how to send csrf token to django from angular
You find everything you need on Django docs
Mirco
https://docs.djangoproject.com/en/3.0/ref/csrf/
Mirco
Check the AJAX part
Rajesh
Thanks
Ihsan
hi what should i learn and what keyword should i use to search for ways to auto update a value in db? Like i have rent system where after 2 hours of rent, the rent status will change to finished or completed
Ihsan
all is done in the background
Sencer
It works in my pycharm, maybe your friend missed some settings
Actually I hit that bug recently and I dont know the bug reporter. Would you please share your settings with me?