Doragonsureiyā
How can I send a token via email to verify email? In drf
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Anonymous
Didn't find anything relevant that's why asked
Hello
Didn't find anything relevant that's why asked
In what part are you finding difficulty, Generating the token Or sending the mail?
Anonymous
Help me
Sahul
What is your problem 😰
Akhil
I want to create my own registeration/login page where user can register and after login they can see there dashboard
Tukhtamurod
Mirco
I want to create my own registeration/login page where user can register and after login they can see there dashboard
jokes apart, start studying Django and u will find out everything u need is already built and available inside it
Akash
I'll try to explain csrf with an example: normal authentication works like this: when you log in, a cookie is saved and every time you visit the site, this cookie is transferred to the site in a header. alternatively with basic auth, no cookie is transferred, but your login data is transferred, also via headers that are automatically set when you visit the site. let's say you are a youtuber and have a video with few likes. a csrf attack would then look like you copy the link to upvote your video and post it in the comments of other videos or on other websites. if someone else who is already logged in on youtube clicks on that link, their cookie will be transferred and the request is automatically authenticated and so you would get a like on that video. csrf is there to prevent this. a csrf token is generated when you visit the page and has to be transferred together with the cookie to authenticate you successfully. if you click on the link, the token is missing and you will not be authenticated and the video will not be liked. with token authentication you have to set the token header manually, the browser doesn't do that automatically, unlike cookie and basic authentication. if you post the link now and someone clicks on it, then the person is not authenticated because the token is not transferred automatically. that's why no csrf attack works here and that's why you don't need a csrf token here.
Thanks for the explanation, much clear now ! Just one thought, when a CSRF attack happens, in that case how does the backend validate the request ? I suppose request atleast needs to provide session cookie in order to validate request for correct session ID.
Меджитов
How can I extract an array from a python script and display it on a django site?
Anonymous
I want to build paid subscribtion base website how can I start. Can anyone here who had build it before I want full roadmap for building website
Vadym
Hi all, I have a question In regards to deploy Django in a Cloud (maybe using serverless) what is the biggest challenge that you are facing right now?
Aniket
I am developing a admin panel on django. I want to fetch total user present in my database to admin panel without clicking and refreshing page, like the page will refresh after some time...how can I do that please help with tutorial
Aniket
I don't know how to do that
Mirco
Hi all, I have a question In regards to deploy Django in a Cloud (maybe using serverless) what is the biggest challenge that you are facing right now?
Django is a bit too much for serverless Obviously this does not mean you cannot, it depends also on your needs
Ilya
I don't know how to do that
so you should learn it before, obviously
Aniket
I need to design my own panel for more functionality
Aniket
so you should learn it before, obviously
Can you provide any link or tutorial for this..
Mirco
I need to design my own panel for more functionality
You can customise whatever u like of the built-in one
🐼🖤
hello #question when creating a django form There is a difference between forms.Form and forms.ModelForm
Anonymous
how to run a script to use django without run django shell or run server?
Anonymous
i think i need use django.setup() by looking for stackoverflow examples
Mirco
hello #question when creating a django form There is a difference between forms.Form and forms.ModelForm
ModelForm is a "shortcut" to avoid wasting line of codes and reuse code The main point is that you pass a model and you can specify which fields of that model you wanna include/exclude into the generated form
Doragonsureiyā
thanks for the answer
You're welcome! 😊
AGASTRONICS
Django allauth How can I get the Facebook and Google details using jinja2 like example {{user}} like their other parameters apart of 'user'
Mike
hello, who can help. I dont understand two things. slug, instance and commit who can help what its mean in django? thankyou
Artyom
Can anyone tell me? I want to create a queryset, do some action on it later, and then call filter (), is this possible?
Artyom
Yes
How? example users=User.objects.all() And then I can do something with users, but later i cant user users.filter(), cos this error - AssertionError: Cannot filter a query once a slice has been taken.
Hikmet
hello, who can help. I dont understand two things. slug, instance and commit who can help what its mean in django? thankyou
Slug is just a readable URL representation of an instance. It is used in case if you don't want to identify an object by its primary key. For example, instead of www.site.com/products/1 you use for example the title of the product, something like www.site.com/products/samsung-galaxy-s21-black. Here 'samsung-galaxy-s21-black' is the slug (considering it to be unique for each object). Instance is simply the object that you pass or retrieve from request. Commit means you make some actions on forming an object and save changes into your database. Especially in django, if you set commit=False, means you saved object but did not added it to the database yet, which lets you to make some extra changes and then commit it and save.
Mirco
https://prnt.sc/yrsmc4
You cannot in this case because you have sliced your Queryset
Mirco
If you does not slice it, u can
Artyom
then how is it correct to do it? I just don't quite understand
Mirco
And you will able to do it
Mirco
then how is it correct to do it? I just don't quite understand
https://stackoverflow.com/questions/34267302/django-filter-after-slice-filter-on-queryset-where-results-have-been-limited
Arbeit
https://dev.to/brightside/scheduling-tasks-using-apscheduler-in-django-2dbl is it okay to run background scheduled jobs like in the tutorial? i don't get why there ist the django-apscheduler library if the above solution works.
Artyom
Ty @pyflare
Lokesh
Hi... I am making an foor ordering web application and I am stuck in one query... Can anyone help me...??
Nadeem
Hi has anyone tried multilingual in Django??
Doragonsureiyā
Hi has anyone tried multilingual in Django??
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
Anonymous
Can some help me in Django rest framework
Anonymous
Anonymous
Can anyone help me with correcting the indentation error i’m having in views.py file, please?
Anonymous
What help do you need?
Had to do a project in Django rest framework
@alberto1718
Can anyone help me with correcting the indentation error i’m having in views.py file, please?
I think if you change your IDE setting, no more problem. I use 4 spaces for tabulation
Anonymous
i can send you a book
Send me please....
Anonymous
Anyone can help me in webpush
Anonymous
?
Zack
Anyone can help me in webpush
https://www.youtube.com/watch?v=2zHqTjyfIY8
Doragonsureiyā
Ty @pyflare
You're welcome! 😊
Doragonsureiyā
Anyone can help me in webpush
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
AGASTRONICS
Django allauth How can I get the Facebook and Google details using jinja2 like example {{user}} like their other parameters apart of 'user'
AGASTRONICS
Django allauth How can I get the Facebook and Google details using jinja2 like example {{user}} like their other parameters apart of 'user' I need there account ID in a variable
kappa
please solve this error. File "manage.py", line 16 ) from exc
AGASTRONICS
please solve this error. File "manage.py", line 16 ) from exc
try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv)
Mirco
Have you installed djando
I don't think so and I bet my 2 cents neither a venv has been created
S
How how to add expery date in Django models, which deactivate offer after 3month?
Mirco
How how to add expery date in Django models, which deactivate offer after 3month?
add just a DateField and then u will add the logic of expiry