Saydullo
TonFutures 💎
I try to use ajax to get data without refresh But after 1 time, the page refresh
Mark
please help how to add index.html to the new django project with app
Charly
please help how to add index.html to the new django project with app
Before whatever you are doing go and complete the official django tutorial
TonFutures 💎
When I go from the SignUp page to SignIn and log in, it is refreshed (it shouldn't be) But when I first come to SignIn and log in, it is done without refreshing
Doragonsureiyā
When I go from the SignUp page to SignIn and log in, it is refreshed (it shouldn't be) But when I first come to SignIn and log in, it is done without refreshing
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://hastebin.com, https://nekobin.com, https://dpaste.org (or your favorite one)
lili
hi i have uploaded my django project on a host and befor that i have made debug mode off, now when my app saves a file(taken from user) in a folder, it cant show that file. but when i switch to debuge mode, it gets fixed what is the problem? i havent used web server. i hust uploaded the project on a hosting site that had a host suitable for django...
lili
You need to configure the media files as the static one. How, depends on what kind of host you choose
Apart from host, even on the local host when i set debug to False, it doesnt show static files
lili
Same thing you need to configure them on a webserver
how to do this? do you have any link or..?
Charly
how to do this? do you have any link or..?
Yeah: https://wolfx.io/how-to-serve-static-and-media-files-in-nginx
ashu
Hey guys my images is not uploaded in production but in local it is working fine I dont know about this error I already used python manage.py collectstatic command in terminal
Guseyn
what are the ways to format datetime in template? Now it display like yy-mm-ddT00:00:00
Arslan
How to host django project for free
Arslan
I had completed my django project now i was trying to deploy my project on HEROKU for the very first time but it throws the following error. I tried on different browsers/devices and also from different email accounts but the issue is not solved yet can anyone help me in solving this problem??
Mark
you must pay for deploying
Arslan
Isn't there any free recourse for django like for frontend we have vercel, githubpages,000web,netlify etc
Bilal
error in anyjson setup command: use_2to3 is invalid any one have solutions ?
Doragonsureiyā
error in anyjson setup command: use_2to3 is invalid any one have solutions ?
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
Bilal
i want to deploy django project and i have this requrements : setuptools==50.3.2 amqp==5.1.1 gunicorn==19.7.1 anyjson==0.3.3 asgiref==3.6.0 async-timeout==4.0.3 beautifulsoup4==4.11.2 billiard==3.6.4.0 bleach==6.0.0 celery==5.2.7 certifi==2023.7.22 cffi==1.15.1 charset-normalizer==3.2.0 click==8.1.7 click-didyoumean==0.3.0 click-plugins==1.1.1 click-repl==0.3.0 colorama==0.4.6 cryptography==41.0.4 defusedxml==0.7.1 dj-rest-auth==5.0.1 Django==4.1.6 django-allauth==0.56.1 django-bootstrap4==22.3 django-celery==3.3.1 django-filter==22.1 django-icons==22.1 django-summernote==0.8.20.0 django-taggit==3.1.0 django-tof==0.3.2 djangorestframework==3.14.0 idna==3.4 kombu==5.3.2 Markdown==3.4.4 oauthlib==3.2.2 Pillow==9.4.0 prompt-toolkit==3.0.39 pycparser==2.21 PyJWT==2.8.0 python-dateutil==2.8.2 python3-openid==3.2.0 pytz==2023.3.post1 redis==5.0.0 requests==2.31.0 requests-oauthlib==1.3.1 six==1.16.0 soupsieve==2.4 sqlparse==0.4.3 tzdata==2022.7 urllib3==2.0.5 vine==5.0.0 wcwidth==0.2.6 webencodings==0.5.1 and i have the error i mintion above
Bilal
no i'm using pyton 3.10.5
cj
no i'm using pyton 3.10.5
why are you using anyjson? that package is dead since 11 years ago
Bilal
are you have any suggest ?
cj
because i'm using celery
I use celery too, I never saw anyjson as dependency
cj
are you have any suggest ?
check your packages dependencies, you shouldn't have that 11 years dead package
cj
i will check it
Django and Celery... no anyjson 11 years dead package anywhere
Sammy
Good day techies
Sammy
How can I install pillow successful on namecheap cpanel
Sammy
As in other places. Using pip.
It ain't still installing have being on it for days now
Charly
It ain't still installing have being on it for days now
So then you need to share the errors you are getting
Sammy
error: command '/usr/bin/gcc' failed: Permission denied [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for Pillow Failed to build Pillow ERROR: Could not build wheels for Pillow, which is required to install pyproject.toml-based projects
_
I want to make room renting website using python django
_
How can i start this project need some jelp
Doragonsureiyā
How can i start this project need some jelp
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Maxim
I installed already
you obviously didn't read the post you were replying to carefully
_
I wnat to make different portal for client and admin how can i do it need some help who can help me
Andrew
I wnat to make different portal for client and admin how can i do it need some help who can help me
1. Learn python 2. Learn html/css 3. Learn Django 4. Create your portal It looks not too hard ;)
I'm
Hi. Is it possible to add a column to the User django built in model?
I'm
Yes
How? I should creat a new model and relate it with user by one to one field? Or there is a more simple eay?
Believe
How? I should creat a new model and relate it with user by one to one field? Or there is a more simple eay?
https://dontrepeatyourself.org/post/django-custom-user-model-extending-abstractuser/
Believe
How? I should creat a new model and relate it with user by one to one field? Or there is a more simple eay?
Yes there is another way also. Which way to use totally depends on your needs
Ædel
this is from the docs (here): def contact_default(): return {"email": "to1@example.com"} contact_info = JSONField("ContactInfo", default=contact_default) what is "ContactInfo"?
Papy
it doesn't work
Papy
?
Balde
hi, I installed tailwind (pip install django-tailwind) in my django project according to the instructions on the site (((https://django-tailwind.readthedocs.io/en/latest/installation.html))) but it doesn't work so much the default css code works. THANK YOU
Alex
https://github.com/timonweb/pytailwindcss
Alex
https://github.com/timonweb/pytailwindcss
Use this one, much more simple and efficient.
George B
def add(request): if request.method =='POST': form = StudentForm(request.POST) if form.is_valid(): new_student_number = form.cleaned_data['student_number'] new_first_name = form.cleaned_data['first_name'] new_last_name = form.cleaned_data['last_name'] new_email = form.cleaned_data['email'] new_field_of_study = form.changed_data['field_of_study'] new_gpa = form.cleaned_data['gpa'] new_student = Student( student_number = new_student_number, first_name = new_first_name, last_name = new_last_name, email = new_email, field_of_study = new_field_of_study, gpa = new_gpa ) new_student.save() return render(request, 'students/add.html', { 'form': StudentForm(), 'success': True }) else: form = StudentForm() return render(request, 'students/add.html', { 'form': StudentForm() })
George B
it gives an error message ""The view students.views.add didn't return an HttpResponse object. It returned None instead.
George B
how can i fix this one?
Muflone
can you provide the way to render the template?
Like you have done at the end of your function
Balde
How you are configuring the css?
With a balise {%tailwind_css%}
Balde
Okay How do you make for add tailwind in django? Please
cj
Okay How do you make for add tailwind in django? Please
the same way you do like any other CSS/JS package
Dairon
Does anyone knows about any resource or book to help me implement a multi tenant architecture in a Django application?? The application is already built in a single tenant architecture and I need to adapt it to multi tenant
Muflone
downvoted + report as spam
Alex
Alex
Okay How do you make for add tailwind in django? Please
Install pytailwindcss using pip, create a configuration file, use cdn in development and build in production.
Alex
of course not
How not? What you are describing is linking stylesheet/script not tailwindcss
Alex
And even if you go with templating by using tags, it would introduce too many breaking points.