Xeon
And one more thing if I try to set DEBUG=false My static files don't work how do I go about that
Koen de
Have you tried; python manage.py collectstatic. ?
Xeon
No
Koen de
please do and restart “runserver” afterwards
Xeon
ok thanks
Xeon
Thanks it's working now but when I upload a picture for the profile it doesn't show
Koen de
Thanks it's working now but when I upload a picture for the profile it doesn't show
Can have a lot of reasons, what’s to see in django log/console , webserver log, browser-console.. are you storing the pictures in the database or in private_media? and how are you serving them, sendfile,…?
Xeon
It's been stored in a data base
Xeon
But when I set DEBUG =true the image shows
Ukasha
But when I set DEBUG =true the image shows
I think you have stated if settings.DEBUG: in your routing
Xeon
I watched a video that suggested that I add an if statement
String
Hello. I hope the community is doing well. I need your help. By the way, I would like to use the upload_to attribute to store my data in a file that must be in the form of a date, for example:2022/07/31 to make it easier for me to find the files if necessary. Please tell me how I can do it
Pooja
Want to learn #salesforcedeveloper #salesforceadmin Live sessions by industry experts If interested please comment call/WhatsApp 8587O74446 enquiry@pathfindereducation.in
Jo
Please share with me example of background tasks uses ?
Ukasha
I watched a video that suggested that I add an if statement
But now debug is not recommend to be True turn it false then use Apache or other
Ukasha
How do I use Apache
Then browser on Google to find out more
Xeon
Ok thanks
Luis
How do I use Apache
Apache is well documented on the help files.
Luis
But this is offtopic. I think.
ayuLS
hello guys, can anyone help me. i have a plan to add code form (form to request code to access main page)
ayuLS
Views file from .forms import TickerForm def index(request): if request.method == 'POST': form = TickerForm(request.POST) if form.is_valid(): ticker = request.POST['ticker'] return HttpResponseRedirect(ticker) else: form = TickerForm() return render(request, 'index.html', {'kolom_form': form }) def ticker(request, tid): contex = {} contex['ticker'] = tid contex['DCF'] = discountedCashFlow(tid) return render(request, 'ticker.html', contex)
ayuLS
Module TickerForm from django import forms class TickerForm(forms.Form): ticker = forms.CharField(label='Ticker', max_length=5)
ayuLS
I already have one form, and i plant to add another form code But i dont know how to gei it 🙏
𝘍𝘈𝘋𝘌𝘓 𝘈𝘉𝘉𝘈𝘚
hello guys
𝘍𝘈𝘋𝘌𝘓 𝘈𝘉𝘉𝘈𝘚
This is my first time using Django and I got a 404 error that I don't know how to solve, can someone help me?
IZUKU
Anyone deploy my python app in cpanel
IZUKU
:)) i cant able to deploy:)
Fatima
Return database.cursor.execute(self,query,params). django.db.utils.integrityError : NOT NULL. constraint failed: new__blog_contqct.message How to solve this problem??
Fatima
I try this but again same
∆$¶u
Go to migrations folder of your project and delete the migration file created because of the command: python manage.py makemigrations and re run the same command and then run it
Sayed
Hi guys, i have an api endpoint that takes an excel file as a request, how can i write a unit test to this api
Ramazan
Hi Guys, please help, I need to send some value of variable from django-view to template via AJAX without using a standard template engine, for example send some massive from from view.. Possible this and how can I do this?
Ramazan
Big thanks before...
Fidèle
Hello everyone Please how to retrieve data from a Bootstrap form? It works in a normal view but I can't get the fields when I put the form into a modal. Please help
Owolabi
Please how can I sync a WordPress database with a Django Postgresql database?
The Inspired
Hi all.. I'm very interested in django looking to contribute to the community.
The Inspired
Hello everyone Please how to retrieve data from a Bootstrap form? It works in a normal view but I can't get the fields when I put the form into a modal. Please help
Why are you using a modal as a form? Modals are used "to add dialogs to your site for lightboxes, user notifications," (from Bootstrap docs) If you want to get data from the frontend, use a bootstrap form instead. https://getbootstrap.com/docs/4.0/components/forms/
The Inspired
This is my first time using Django and I got a 404 error that I don't know how to solve, can someone help me?
A 404 error in django, usually either means your urls aren't mapped properly, or you don't have any response for that url (either HttpResponse or a template to render)
𝘍𝘈𝘋𝘌𝘓 𝘈𝘉𝘉𝘈𝘚
A 404 error in django, usually either means your urls aren't mapped properly, or you don't have any response for that url (either HttpResponse or a template to render)
I think the reason is in the url, but this is the first time I work with Django and I don't know how to implement the solution
Razieh
Hello good time For a store project, instead of entering the products into the database and then making a query, I want to use the fake api and retrieve the products and the product by ID, etc., but I don't know how, please guide me.
The Inspired
It is how they designed the frontend. The client doesn't want to have a separate view for signup/login
well, in that case, I suppose you will have to get it the normal way by using self.request.POST.get['(field name)']
The Inspired
https://stackoverflow.com/questions/47526239/django-get-data-from-api
𝘍𝘈𝘋𝘌𝘓 𝘈𝘉𝘉𝘈𝘚
check your urls...
thanks you bro
Doragonsureiyā
It doesn't work 😔
If you need help, don't just say "not working", explain in detail what's not working the way you expect it to
Giacomo
I have to implement a paginated queryset filter based on user input, should i use django-filter? or doing it manually?
Koen de
I have to implement a paginated queryset filter based on user input, should i use django-filter? or doing it manually?
What have you tried so far? I am using Django filter with(out) “Q” in my viewsets.
Giacomo
What have you tried so far? I am using Django filter with(out) “Q” in my viewsets.
Yeah i got it work with Q objects, but i need to paginate a post query so, i need to store the query filter by user somewhere (maybe in session) in order to paginate the queryset
Giacomo
And i would like to know if i should switch directly to django-filter for this kind of tasks, without reinventing the wheel
Koen de
Are you using DRF or just plain Django?
Giacomo
Are you using DRF or just plain Django?
Plain django, with templates
Koen de
Then session in backend or even in frontend might be the trick.
ラマゾッティ
Hi guys! Please help me with this question! https://stackoverflow.com/questions/73187266/cant-trigger-a-views-breakpoint-in-django-tests
Abhi
django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 7: 'static'. Did you forget to register or load this tag?
Abhi
giving this error for html file
Abhi
<link rel="stylesheet" href="{% static 'css/MyFiles.css'%}">
Rk
Register in settings.py templates
Eli
Hi, Iwanna use a gauge in django and I don't know any things abt it. Who can help me?
Anonymous
Import " django.db" could not be resolved from source pylance
Anonymous
What is this issue and why
Fabin
Hello guys.Iam new here.anyone can help me in my django project? Its a hospital booking project and I want to show the doctors consulting times and if a user clicks that time it's should need to store in database and disable for 24 hours. After 24 hours it should need to be activated.
Rahul
Hey , anyone know how to implement windows authentication in django website.
Doragonsureiyā
Hey , anyone know how to implement windows authentication in django website.
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
Fabin