Максим
Hello Guys! Can anybody help me ? I installed django-cors-hears. adding it to INSTALLED_APPS and MIDDLEWARE_CLASSES After it i restarted uwsgi(when i restarting it. virtual env was active) and then i get 500 erorr. THen i remove dajngo cors headers with pip uninstall and remove cors headers from INSTALLED_APPS and MIDDLEWARE_CLASSES. But i still getting 500 internal server error. In nginx error log i don't see any errors ((( Please help me
Rahin
how to create app serverless on aws lambda
Rahul
I'm trying to integrate razorpay payment gateway in my Django project
Rahul
I face issue like .... Request () cannot find argument amount .... While crraynuniqur order id
Rahul
Creating unique order id*
Tobi
Hi, How can I create a decorator that always get the user to a specific view with no specific condition, I just want to return a specific view whenever I call that decorator
Tobi
Do you necessarily need a decorator for that?
Nope, but I don't want to rewrite the code everywhere I need a view function to work like that
Jigani
If you're trying to redirect users to a particular view from another, then you should use reverse()
Tobi
If you're trying to redirect users to a particular view from another, then you should use reverse()
What I want is something like "maintenance mode" every time I need a view to not be available and return a message that say "maintenance mode", I will just have to apply the decorator to that view
Jigani
What I want is something like "maintenance mode" every time I need a view to not be available and return a message that say "maintenance mode", I will just have to apply the decorator to that view
You can implement that in several ways. You could have a model Page with a page status field that you can toggle from admin. Then have every view have their instance and do the template rendering from live mode to maintenances mode.....no a serious Django related question though
Jeevachaithanyan
Heloo all, I am a new member to this group and I am django/python ignorant. I been using PHP / LAMP stack as my primary stack for last 5 years. These days I am thinking of switching into django/python. Reading a few articles online , I find the hosting of django websites are pretty complicated and costly. Is that so ? I am so much used with CPANEL / LAMP hosting and which is cheap and pretty straight forward.. But I am not hesitant to switch over to Django/python regarding this hosting issue. Is there any good article / tutorial about the difficulty level of django hosting ? What's ypur opinion about this topic ? Thank you
Jeevachaithanyan
It's not so complicated, it depends on the infrastructure you wanna build
I usually work on middle level websites/web applications..like school management , simple news websites etc.. is Django/python too much for such projects ?
Cheap
How to add subdomain with django url? Please help me
in settings.py add your subdomain to ALLOWED_HOST
Jeevachaithanyan
Thanx for the replies
Aditya
Hello, can anyone suggest a good tutorial on deployment of deep learning project using Django?
Aditya
Wanna create a prototype. Any guidance will be appreciated
Damron
Hi there! My model's got tags field from dj-taggit and I'd like to add tags filter into my ModelFilter(django_filters.rest_framework.FilterSet) But have no idea where to find that filter, did smbd encountered with such a problem?
Lelouch
In my chat of site Msg coming in stack style How to reverse
Anonymous
Hi How can i use django smart sélect or chained select Im not Looking for somthing from the internet, i test all this tutoriels and all all, but not working, please, i need à project demo, a demo with catégories and subcatégories, i want to use chined or smart sélect in admin, Only admin, thkx Best regards
Vivek
Please anyone help me with django tutorials I am fresher
Alberto
Hi, I have one issue: https://pastebin.com/MCmYffq6 I create a simple from with ModelForm class and the problem is that when I run the website and complete the form, the POST method works but the input is not saved. I'm not sure why happens that, any suggestion will be much appreciated
дуван
Hi, guys. I think this may be a bit off topic, but I will ask anyways, and apologize beforehand if this post isn't allowed. Has anyone here tried Zenva academy? I've read some reviews online, but idk, some people say it's good and others that it isn't worth it.
Anonymous
Which is the best and free sms api in python
Alberto
Yes I did, the url to the view is homepage (" ")
Alberto
All works fine but I don't know why I can't see the form done on admin
Cheap
Yes I did, the url to the view is homepage (" ")
can you inspect when you send post data, if it shows in browser developer tools?
Alberto
Yes, it doesn't throw any error. it shows the input with all its values, and also in the terminal I can see the POST method when I send the form
Cheap
Yes, it doesn't throw any error. it shows the input with all its values, and also in the terminal I can see the POST method when I send the form
the issue might be , if form.is_valid(): is False and hence its not saving. try getting errors if it is not valid
Cheap
or try saving after removing that if statement
Cheap
Maybe the problem is with the csrf token
then it should show csrf error?
Anonymous
then it should show csrf error?
I don't remember if Django shows any error if csrf is missing. Flask does not show any error, the form.is_valid just returns False. IDK I might be wrong.
Alberto
Maybe the problem is with the csrf token
It could be, at a first moment when I loaded the page it throws an csrf error but I fixed them just reloading the page in all that cases and it work. I will check if it is the problem
Cheap
my view renders index.html, how can i make it render index.html/#contact (which scrolls till specific portion of page) if i directly return render(request, templates/index.html/#contact), then i am getting NotADirectory error django interprets #contact as directory
Дмитрий
Maybe js document.onload ?
Cheap
Maybe js document.onload ?
i am using same html template for multiple views, so it will do that for all right? i need only for specific view. or maybe make two templates, one for this view, but that would violate DRY principle
Anonymous
Website css is working now but when I run in development mode website shows a error.. Python manage.py runserver 0.0.0.:8000 But you can see the website it's working fine commissionerdjwysei.com What is the issue And also if I make change in views.py Will it be affected..
Harmless
Good afternoon guys
Дмитрий
So it js solution only, maybe I wrong
Harmless
Am trying to create my first project with Django on Ubuntu but a m having problem. Please I need help.
Doragonsureiyā
Am trying to create my first project with Django on Ubuntu but a m having problem. Please I need help.
Please 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 60k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Anonymous
Anybody can help me?
Anonymous
I have a problem
Anonymous
How to read data of forms input
Anonymous
I uploaded a file now i want to extract the uploaded filename and save it to file_name (member of model class File)
Anonymous
How can i do that
Anonymous
Please somebody help me
Anonymous
I uploaded file using model forms
Anonymous
Hello everyone. Does any one know of a good tutorial that explains Django's authentication? I know it's available in the documentation but I learn better with videos 😅 Also an introduction to JWT maybe if that's plausible? What I want to do is implement user authentication and authorization with django_graphene, a graphql implementation for django.
Alberto
Maybe the problem is with the csrf token
But what could be wrong? I check it's write well in the html template {% csrf_token %} And it should work fine
b
hey guys, im deploying django site to heroku and im getting this error - ModuleNotFoundError: No module named
Anonymous
Django authentication with JWT ?
Yes that and a way to implement it in an API. I'm sorry if what I say doesn't make a lot of sense since I don't test have a good understanding of authentication handled over the web. I know tokens are involved if you're not using sessions but other than that I'm blank. That's why I need a intro to all this as it is quite essential
Muflone
hey, if anyone know this
Writing the complete error message would be a good start
Muflone
Doubt
b
from heroku logs --tail
b
ModuleNotFoundError: No module named 'project-name'
b
yeah so if anyone know
Doragonsureiyā
Okay thanks for your help
You're welcome! 😊
b
there is another - raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
Anonymous
Thanks man