Python Guy
How they it get pk? def retrieve(self, request, pk=None):
queryset = Post.objects.all()
post = get_object_or_404(queryset, pk=pk)
Python Guy
is it in request?
Rohit
JustAnotherOne
does jinja inherit the js code from the parent to the child?
I need to write a global js code for all the html templates in the project
is it possible?
~:$
JustAnotherOne
I’ll try it now with a js file, and I’ll give a feedback
~:$
JustAnotherOne
Daniel
Hello
I'm a newbie
How do I get started with Django
I have a little background on python
Python Guy
Hi, I deployed my django app on netlify and now I am not able to access my admin page, it shows page not found
Anonymous
Anshu
Shubham
Can anyone tell me how to do e-mail validation and pagination in my project🥺
Anshu
Anshu
Кир
Hi! I'm trying to write tests for drf ViewSet's endpoints using pytest. But when I'm creating a user with token inside a test and sending GET request with headers (i'm using token auth) I receive {'detail': 'Invalid token.'}. Even considering the fact that objects have been created and that I can see token when print it.
Shubham
Amir
Hi there
How can I learn django?
Azamat
Doragonsureiyā
Hi there
How can I learn django?
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
William
Rebellion
Friends,
I'm creating cards in template displaying some info in them like title and body.
But, body text is too long. So, how can limit the numbers body characters say only first 20 characters.
Instead of showing entire body text, how can I show only few characters...?
Thank you!
SuperN00b
Rebellion
SuperN00b
Css actually is quite funny , u should try :)
SuperN00b
Rebellion
You mean js ?
<p class="card-text">{{ post.body|slice:"100" }}</p>
Rebellion
I don't know if its js or html only
SuperN00b
SuperN00b
But this is nice, I guess I should learn some more about django template
SuperN00b
Thank bro
~anonymous~
Heya guys ,
I am new to django , can you please guide me with some video tuts?
Python Guy
Hi, this is my view for like feature but data that I am sending is undefined to users. So What should I change
https://pastebin.com/9qG0rsb0
Ixlos
Python Guy
Ixlos
Python Guy
Python Guy
Response(data)
Actually think is kind of Jugaad . Do you know any better way for Liking Post?
Ixlos
Ixlos
like this
post
user
liked_time
...
Python Guy
Python Guy
Ixlos
Have user fields in like model?
Ixlos
Python Guy
Anonymous
Django rest framework in how to upload large CSV or Excel file ?
From endpoint
Ixlos
my suggestion is create like model
post=foreignkey
user=fk
liked_time=datetime
unliked_time=datetime default=null
delete like field on post model
Ixlos
maybe this help to you
Linus
Guys someone here has experience with async
Linus
Im using drf that doesnt support async
Linus
In views i have async methods that i turn into sync with async_to_sync
Linus
Is this correct? Im doing this to use asyncio
Turbulance
Guys, I'm having trouble running my django project on my LAN
Samuel
Mirco
It's worth it
:x-re
Hi guys i need help
How can i hide @gmail.com after send mail to user
Alireza
Hi, i have a website and I should upload some files with specific standard files or like below:
Title of question?
Option 1
Option 2
Option 3
Option 4
Title of question?
Option 1
Option 2
Option 3
Option 4
And these files or with .txt format. I want to upload these files and the django automatically add these files data to the database. How can i Access the files for scraping with python when it uploads by Django?
Sai
Sai
Sai
Вова
Hi guys, can I make database queries directly without using django migrations?
Rinat
Вова
Yusra
guys I'm new with django and currently I've started learning and building end points, I'm in authentication process now and I want to know auth library that works with rest framework, do ypu know any reliable auth library that works fine with rest framework?
Mounted
Hello
Mounted
How can I execute the function after loading the template?
.
.
It depends on what auth u need