Unique@pp++
Anyone is bigner in Django
Doragonsureiyā
Anyone is bigner 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 directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Arezoo
huh?
I have completed my question
Alex
I have completed my question
does it show any error on runserver?
Alex
0 That's unrelated to django 1 I think you can wrap such model in Gateway pattern and then transfer data you need via rest. https://martinfowler.com/eaaCatalog/gateway.html
Arezoo
does it show any error on runserver?
I can not send file in this group😒
Alex
I can not send file in this group😒
Thx God for this. Use pastebin services.
Arezoo
Thx God for this. Use pastebin services.
https://pastebin.com/LzMkuRak
Arezoo
This is dynamic setting in django
Alex
https://pastebin.com/LzMkuRak
I asked if there is error message.
Arezoo
I asked if there is error message.
But when I use python manage.py runserver i get this error https://pastebin.com/zUZ4H5TZ
Arezoo
I asked if there is error message.
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ") AttributeError: 'NoneType' object has no attribute 'split'
rtg
Django def return dude: ¿Is this correcto que return...? HttpResponseRedirect('users_app:change_password')
rtg
return HttpResponseRedirect('users_app:change_password')
rtg
or how can we return a url in Django?
Vyacheslav
For Rest API I can ask a question in this chat, I hope? For the API for logging into the system (without registration). Could you give me a hint?
Alex
For Rest API I can ask a question in this chat, I hope? For the API for logging into the system (without registration). Could you give me a hint?
Don't understand you. You can use builtin logging and write the logs wherever you want. Django doc even has an example. https://docs.djangoproject.com/en/3.2/topics/logging/#configuring-logging
Pulkit
Hi, Is there any way to check which website is sending a http request to our rest api
Alex
Hi, Is there any way to check which website is sending a http request to our rest api
*an http well, you can try to check nginx's logs for example
Mohsen
hi i want to learn web developing with django i would be grateful if anyone can suggest best source
Anonymous
on top of that if you are absolutely new to web development, google and read about these terms http https http methods http response codes headers cookies
Pulkit
ok thanks
i will try it
Sarp
https://stackoverflow.com/q/68871190/12614466
Sarp
Help in this question
Alex
Help in this question
That's totally unrelated.
Sarp
I am using this api in django project thats why asked here
Anonymous
i want to restrict which websites can use my api
HttpRequest.get_host() should give you information
Mo
Hi, can we use try catch in Dajngo rest api for handling errors? what is the best way of handing errors in django rest api? Thanks
Alex
i want to restrict which websites can use my api
seems like you need authentication and permissions system. https://www.django-rest-framework.org/api-guide/authentication/ https://www.django-rest-framework.org/api-guide/permissions/
Alex
Hi, can we use try catch in Dajngo rest api for handling errors? what is the best way of handing errors in django rest api? Thanks
I'm not sure if there is anything specific about error handling in django. As they say - "django is just python". I only can give this link on how to handle exceptions on the api level https://www.django-rest-framework.org/api-guide/exceptions/
Mo
I'm not sure if there is anything specific about error handling in django. As they say - "django is just python". I only can give this link on how to handle exceptions on the api level https://www.django-rest-framework.org/api-guide/exceptions/
thanks, i have seen this link before. Someone guides me to use try catch for error handing but as i serached it was more about jave not drf. i just want to be sure and check it.
Ankit
I want to check user exist or not
Ankit
But I am getting error
Doragonsureiyā
But I am getting error
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Ankit
I am working on user management
Ankit
And in login section I want to check whether user exists or not
Maxim
And in login section I want to check whether user exists or not
did you read this https://t.me/django/175509 ?
William
And in login section I want to check whether user exists or not
You can do get_object_or_404(UserModel, username='')
rtg
Hi Djangolovers! How can i redirecto user to a url from def post? Thanks!
игорь/igor
Yes i do
You cannot log in without registering whatever it is, drf or just simply Django. Sorry, didn't see the actual question at first
rtg
How can django when an image is uploaded, create (if it doesn't exist) a directory with the id as the directory name?
rtg
models.ImageField(upload_to='img/installations/') ¿...self.id...?
rtg
🤔
rtg
https://pastebin.com/2za1aGWF
VISHNU
In admin how to make dependent drop down of the field has generic foreign key relation.. which means if I select brand or distributor on next field I need email related to that selected field.
Sergio
Question: If I want to make a page to solve mathematical problems as derivatives, can I do it with Django? For all the part that is responsible for solving mathematical problems
Sergio
Is that I want to use Python to solve the operations
Sergio
Yes
Michael the wolf 🐺
how much redis storage is needed for caching at minimum? i am planning to use aws redis service
Rohan
how much redis storage is needed for caching at minimum? i am planning to use aws redis service
People generally go for a 3 node setup now instead of just 1 elastic cache for big projects.
Rohan
And if you’re going with elasticache, storage is dirt cheap, you can always keep minimum that fits you, provisioning storage later should be as easy as adding an EBS to it.
Michael the wolf 🐺
but one big node is not good to use ? also is 20 gb enough ? for not so big project
Michael the wolf 🐺
also do you have any suggestions for memory profiler..i also think the application have memory leaks..always gateway timeout error occurs
Michael the wolf 🐺
even after increasing servers
Rohan
even after increasing servers
https://github.com/django-extensions/django-extensions/blob/main/docs/runprofileserver.rst
dคv¡d
I searched in Google about chosen form but they said we need to install django-chosen from pip but i saw chosen in admin page -> create user had it... So how to create that form? Thank you
Viji
Type error: expected string or bytes-like object This error raised while im doing migrate.. what should i do?? How can i clear this?