Saydullo
TonFutures 💎
I try to use ajax to get data without refresh
But after 1 time, the page refresh
Doragonsureiyā
Mark
please help how to add index.html to the new django project with app
Charly
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ā
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...
Charly
lili
Charly
lili
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
clouded
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
cj
Bilal
no i'm using pyton 3.10.5
Bilal
Bilal
are you have any suggest ?
Bilal
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
Charly
Charly
Sammy
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
Charly
Sammy
Peaceful
_
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
Charly
Andrew
I'm
Hi.
Is it possible to add a column to the User django built in model?
Believe
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
Believe
I'm
Æ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
Alex
https://github.com/timonweb/pytailwindcss
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
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()
})
When the first if is not ok, the code will not do anything, resulting in passing None
You have to render the template
George B
George B
Balde
Balde
Okay How do you make for add tailwind in django? Please
cj
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
cj
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.