JayJo
Image Fields is not working
JayJo
Every data is displayed from database on frontend but not images
Muflone
This seems a rebus no one wants to solve
Rana Awais Ahmed
If you need to upload image using a form the give the attr enc_type to the form tag. Also you should set media files address in your project files and point to it in the settings
Lords
hey,everyone when I am trying to access admin panel through DNS getting error CRSF token verification failed how to resolve these issue Thankyou in advance .
Eki
good morning friends, I want to ask, how do I enter data that is not looped into a Python class, my data is type queryset, if I loop first, only 1 data comes out but I need all the data
Eki
objPD = ProdAllocNewD.objects.values(
'bundle__pk', 'prodalloc__line__divdesc', 'bundle__style', 'bundle__orc',
'bundle__color','bundle__expdate', 'prodalloc__dateAlloc', 'bundle__qtyord',
'prodalloc__targetHour', 'prodalloc__manPower', 'smv',
'prodalloc__pk', 'prodalloc__startTime', 'prodalloc__finishTime').annotate(qtyAlloc=Sum('qtySizeAlloc')).filter(prodalloc=data)
Eki
This is an example of queryset data
Eki
detail.append(SewingDash(ai['bundle__style'], ai['bundle__color'],
ai['bundle__orc'], ai['bundle__qtyord'],
objSum1['total'], objSum_in['Tot'], objSum_in['Tot']-objSum_out['Tot'],
objSum2['total'], objSum_out['Tot'], Efff))
Eki
This is an example of a Python class
Suyash
Can anyone tell how to redirect to another url with POST request. Actually there are two forms on two different page. The second one is a succession of the first one so I want the data filled in first form on page 1 to be post to page 2 also. HttpResponseRedirect(reverse('url')) is redirecting with get request.
Believe
Maleficent
How to install django in ubuntu
عبد القيوم
How to install django in ubuntu
just write this command on terminal pip install django. Note it is recommended to install django in seperate env
dvd
I am deploying DJANGO into production with gunicorn and nginx, my web is working but my static files are not showing. I get a 403 forbidden error. In the error.log file I get this error: [error] 1478#1478: *49 open() "path/for/image.png" failed (13: Permission denied). Can someone help?
Миркамол
dvd
sure
Миркамол
are you change static url after change debug to false
dvd
It is a permission thing, my setup is everything done
Doragonsureiyā
Lords
okay thankyou
Suyash
Q
Can form templates be stored in the Db?
Suyash
Move to first form and store data into session then redirect to be 2nd form
actually request.session is also not working for my purpose because I am trying to store password field of a form in request.session. Actually it is a signup form with otp validation so I require two form page one for data username and password and other with otp sms so that when otp is correct I can create a User in django model
Believe
JayJo
I'm getting error as unidecode error while run template
Runserver
worksuite-saas-new
Please how to install the worksuite-saas-new sms module and change the name and adapt a default verification code
Q
deficiente ✙
???
maybe this will help:
https://stackoverflow.com/questions/14653056/django-saving-form-to-database
cj
ERMIA
Ali
Hi
I searched about django channels long time in youtube and....
But all examples are chat project.
Is django channels just for chatting applications??
I need to realtime data and django for backend.
What is the best choice?
Ali
Nazda
How to apply CSS code in my Django administrative page
nyctophile
Hi there!
I have question: Can I change images name before saving it into a folder. If it is possible can you show me ways or give me advices ?!. I am using ModelViewSet in rest framework. Can Anyone help with that. Any help appreciated
Mahan
How can I say in this code, if the product is equal to the vase, add the vase?
class CartAddView(View):
def post(self, request, pk, ):
product = get_object_or_404(Product, id=pk)
pot = get_object_or_404(Pot, id=pk)
quantiy = request.POST.get('ms_qtybtn')
cart = Cart(request)
cart.add(product, quantiy)
cart.add(pot, quantiy)
return redirect('cart:cart')
▂▃▄▅▆▇█▓▒░Dube@Tes$Bel░▒▓█▇▆▅▄▃▂
how i install django for python 3.11.4 ??
Alex
▂▃▄▅▆▇█▓▒░Dube@Tes$Bel░▒▓█▇▆▅▄▃▂
Maxim
▂▃▄▅▆▇█▓▒░Dube@Tes$Bel░▒▓█▇▆▅▄▃▂
Maxim
how i do that
https://www.google.com/search?q=python+virtualenv and/or https://www.google.com/search?q=django+virtualenv
Tamerlan
How can i do livestreaming in django
Doragonsureiyā
How can i do livestreaming in django
These single steps will help you a lot:
Step 1️⃣: Open a browser
Step 2️⃣: Write down https://google.com or https://duck.com and press Enter
Step 3️⃣: In the search box, write down the same words you asked here
Step 4️⃣: Read the first results
Tamerlan
I wrong explain my maind i want create platform look like udemy. I want upload video to server. I i do not want the user can not see the url of video. That is why i think it is posible with streaming video. How can i do streaming with drf
Doragonsureiyā
Believe
Believe
Daniel
Maxim
Aleksey
Is it possible to write all sql queries to a dedicated log when DEBUG=False?
Here's my logging setup (https://gist.github.com/happygrizzly/97efded0289456ad29a3bffa86e7dd2f). There's no output with DEBUG=False. Is it in the end required to have DEBUG=True?
Is having custom wrappers/interceptors the only option then (like this: https://stackoverflow.com/a/56281311/532675 or like this: https://github.com/gruuya/django-sql-sniffer) ?
Daniel
Daniel
Ingvarr
Hello everyone! I've got an issue
recipes = Recipe.objects.filter(
ingredient__food__name__in=include_ingredients,
).exclude(ingredient__food__name__in=exclude_ingredients)
I want this code to get only that recipes, which include/exclude all the food names in lists. If there is at least 1 ingredient that not in include_ingredients, this recipe should be skipped
Ingvarr
Oh sorry, i figured it out by myself. it was a dumb issue
Mahan
hi i want use multiple products in django and i see this error
No Product matches the given query.
Doragonsureiyā
DeathLikeSilence
hello everyone.
I have 3 different models
Customer
Seller
Owner
I wrote
AUTH_USER_MODEL=” accounts.Clients”
In setting.py
Can I use JWT to authenticate them?
Doragonsureiyā
حسناء عياش
hi
i try to connect mysql to django by writing in terminal :
pip install mysqlclient
or
pipenv install mysqlclient
but the error "microsoft visual c++ 14.0 or greater is required" is raised
so i intalled the vs tool required from Microsoft visual installer
and i tried again:
pip install mysqlclient
or
pipenv install mysqlclient
but the error "command ....../cl.exe failed with exit code 2" is raised
and in two cases i have the error "Failed building wheel for mysqlclient & could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects"
any one know the solution of this problem?
HAJI MASTAN
cj
Anton
Daniel
Daniel
https://scrnli.com/files/Kxxw2II73LwN9f
ROG 💻
Does anyone know if a Django project can be integrated with JasperReports for report design?
Charly