Pandu
hi i’m mid level in django
and i don’t have any idea for project :(
please give me some ideas 🤯💤
sure
you can make CMS apps like
blog, recipes, insta reel/yt shorts clone,
productive apps like:
todolist,notemaker
wheather app, currency converter using apis
or simple ecommerce
i just made my recipes site
main drawback was , images were not rendering which were uploaded by user, on deployment mode with debug=False
i tried setting up whitenoise
and external bucket but didn't worked
so for now leaving it debug true , its working without any efforts lol
i mean can learn about rendering static files uploaded by users on production.
Serhii
Hi there! Could someone share a few courses or YT videos about Django, I am a totally beginner, and know only python syntax. Or some advices would be great 😊 I do not know where the point to start is 🫣
King
ruthless
Felix
Please, i need a mentor on Django
Victor
Tell us your question and we can help you.
Felix
Danya
AZ
Hello everyone how are you, i want to deploy my website in two separate droplets one for frontend and second for backend, the first one is 2GIB RAM and 2 vcpus is it enough for frontend, the visitors about 500000 per month
clouded
Anonymous
#question
i have to use this variable {{file.author.avatar.url}}, but it is not working
Anonymous
clouded
Anonymous
clouded
Anonymous
clouded
Or: Why do you think so?
clouded
Or: What makes you believe Django does not accept this?
Anonymous
Exception Value:
The 'avatar' attribute has no file associated with it.
clouded
clouded
But where is an answer to this?
Google. But I'll help you this time: https://stackoverflow.com/questions/15322391/django-the-image-attribute-has-no-file-associated-with-it
Anonymous
I'm
Does anyone know why should we use csrfToken when we are posting in DRF? I know the application but I am using token authentication. Why should I use csrf too? Ehat is the difference between csrftoken and token authentication?
The procedure of both look the same. A token is created when a user has logged in and in every url header the browser should give us that token to check.
cj
Promiscuous Ferris
unless you use local storage based tokens, meaning that only the js codes that are received from your website, can access your website's token. which is generally how jwt is handled.
ʜᴀssᴀɴ 🥴
What can i use django
Promiscuous Ferris
Anonymous
py
Can someone tell me what does Key management means? and how to achieve or implement it in Django in terms of security?
I'm
I'm
Hamid
I'm trying to lock object A that has fk to object B and C but I want to only lock object A and not B and C:
one senarion is to make db_constraint=False in that fk but it has another risk that can fk to object that is not exists I want to know that is another way to handle this .
Alex Turner
Who knows how to configure Django (DRF) to work with Etag and If-None-Match headers?
Shaun
I’ve got to build 5 web scrapers and have them handled via celery tasks. Is there a base cookie cutter or library I should use?
Software
Hello please instgram scrape in python django source code avilable any ??
Software
Hello please instgram scrape in python django source code avilable any ??
cj
Soham
Promiscuous Ferris
I'm using authentication tokens already. And all of my views are accessible when users are logged in. So why should I use another token?
you can search more about how csrf works and why it's better to move to jwt tokens instead of normal tokens. jwt is not susceptible to csrf. (for apis)
I'll just give you a summarized paragraph on how cookie tokens work.
let's say you've given the client a token and it's stored in the cookies for your website. the way all modern browsers work is that every time any http request is sent to your website from that browser, be it from your next.js frontend client or another website's frontend client, the cookie will be sent.
so essentially, if in another tab, a js code sends a http request to your website, the browser will send the cookie (and the token inside it) with the request. that tab won't see your cookie. but it won't matter. because your website receives the cookie. and you'll think you've received a request from your customer, but it was from another website.
Promiscuous Ferris
one warning. if jwt is stored in a cookie, it'll still be susceptible to csrf
Goodness
I do need assistance, I believe I am mixing up my serializers
Goodness
I successfully create an assignment
but when i try to retrieve it, i observe that option and correct_option is not saved in the db
this is the structure of my models.py https://www.useblackbox.io/editor?id=67b83e43-c3f5-46c2-9790-618cc462623b
this is the serializer for creating an assignment https://www.useblackbox.io/editor?id=6572d5a1-9432-4d52-8edc-25aefbfaa8bf
assessmentQuestionSerializer - https://www.useblackbox.io/editor?id=f6aaada1-947d-416e-87fd-2b686db09b52
and finally the answer serializer https://www.useblackbox.io/editor?id=f48ad9cb-ea73-492f-b4da-ada4d2554119
Yusif
Hi. During the user registration process, the function I wrote for e-mail confirmation returns an error. I created app password in Yandex and wrote it in the settings.py file. but it gives error again. can you help?:
Error sending activation email: (535, b'5.7.8 Error: authentication failed: Invalid user or password! 1704910042-M7nb9xBAUqM0')
Yusif
ruthless
Yusif
yes. email confirmation
Yusif
Error sending activation email: (535, b'5.7.8 Error: authentication failed: Invalid user or password! 1704910042-M7nb9xBAUqM0')
Is that why this error?
Mahmuod
I’am trying to add rest auth but it returns NO MODULE NAMED rest_auth
Mahmuod
any help
Charly
Charly
Mahmuod
It’s all ready installed
Mahmuod
I reinstalled it few times but nothing happens
Charly
Mahmuod
Mahmuod
Done it
Habib
Hi there, I have a question
Say i want to create a docker image of a django project
Which commands are necessary to be included in dockerfile for it to work properly
collectstatic
Makemigrations
Migrate
Are they necessary? Or a good thing to do?
I am still using python manage.py runserver in CMD [] to run it
Java
I don't know if it sounds absurd but is there a way to put two forms in the same html (the two forms have different models)?
Java
I've been searching for information but I can't find what exactly I'm looking for.
Charly
Charly
Java
Charly
Habib
Ok thank you so much
Charly
We don't know what's the purpose of your application
Charly
I meant that you are the only one that know what features are missing in your project
Charly
eyah if your project ha nothing else to do go with another roject
Charly
thats up to you
@Rp
error Traceback (most recent call last)
c:\Users\Among\Desktop\Code\UpWork\rodney_projects\lambda_sync_email_to_MYSQL\source\test.ipynb Cell 15 in <cell line: 26>()
24 imap = imaplib.IMAP4_SSL(imap_server, port=993)
25 # authenticate
---> 26 imap.login(username, password)
28 # status, messages = imap.select('"Sent Items"')
29 status, messages = imap.select('INBOX')
File c:\Users\Among\AppData\Local\Programs\Python\Python39\lib\imaplib.py:612, in IMAP4.login(self, user, password)
610 typ, dat = self._simple_command('LOGIN', user, self._quote(password))
611 if typ != 'OK':
--> 612 raise self.error(dat[-1])
613 self.state = 'AUTH'
614 return typ, dat
error: b'LOGIN failed.'
Maxim
I'm