Adilet
yep it's ok when you filter by fields without underscore in name but if you have underscore in your field name, it not gonna work
NN
Hi there. Is there a way to show a form embedded in an admin view? Or an inline
v6nom 『 🅽🆃🅼 』
Hello i have a input and i want to add only this input in a div html py start_event = forms.CharField(label=False, widget=forms.TextInput(attrs={'class': 'input100'})) How i can make ?
0x01
Hi everyone, I’m working on a blog project that has 2 apps (dashboard and blog). I’ve been able to work on the dashboard app but I have issues connecting and displaying the blog posts/front end. In essence, how do I link the the 2 apps when I import models from the dashboard app?
Vladyslav
hey everyone) RuntimeError: Model class test_project.core.models.Clothes doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. my app is in installed_apps, but there is this problem
Vladyslav
what should I do🥹
Neo
class YourModel(models.Model): ... ... class Meta: app_label = 'whatever_app_name'
Neo
or check your application's app.py
Vladyslav
Vladyslav
RuntimeError: Conflicting 'clothes' models in application 'clothes': <class 'core.models.Clothes'> and <class 'test_project.core.models.Clothes'>.
Vladyslav
I don't understand why it seems like there is 2 modules core
The Inspired
show your INSTALED_APPS
Dhruv
Can we automate sqlite database to update everytime an query has been made
Dhruv
What are you talking about?
I have an api which gives me a csv file That api gives csv file according to the keyword searched That csv i need to keep in my database(one time is simple(manually)) I want to automate that code which remakes the table flushing the previous one
Ihechukwu
how can i see my main page's view name
On the browser ?? Or on your editor ,?
Favas
Any body know how to have vustom filter for tabular inlines
Bobosher
Any body know how to have vustom filter for tabular inlines
You may override the get_queryset() method of your tabular inline class.
Santosh
Hello Guys, plz anyone knows how to use button tag using html from python code for the output of Puzzle Number Game??
Favas
You may override the get_queryset() method of your tabular inline class.
Custom filter like dropdown for inline...while selecting one of the option it should query the selected ones
Favas
Like list_filter for normal listing in admin
Marat Popov
need help! I'm making a navigation menu, the transition occurs via a link to a dynamic page with parameters from different database models. Throws an error: ``` keyword arguments '{'pk': ''}' not found <li class="nav-item"> <a class="nav-link active" aria-current="page" href="{% url 'prof-detail' pk=professor.idDiscipline_id %}">Info</a> </li> <li class="nav-item"> <a class="nav-link" href="{% url 'prof-detail-discipline' pk=discipline.idDiscipline %}">Disciplines</a> </li>
Ravi
need help! how to associate model with current user while saving?
Ravi
How to create a model which contain two fields like created_author as Current user and updated_author when record is updated as current User
Anonymous
And if you want to check if the current user who wants to edit the post or something is the actual author then you can just perform some condition checks
Anonymous
Like if request.user == post.author Do this Else: You're not the author of this post
Anonymous
How to create a model which contain two fields like created_author as Current user and updated_author when record is updated as current User
do you mean something like this? if request.user == post.created_author pass else: post.updated_author = request.user post.save()
Eslam
Guys is it normal to use uuid instead of slug to display the product
Семерухин Михаил
Guys is it normal to use uuid instead of slug to display the product
Your site will be not so relevant in google serch
Ganesh
How to save logged in user ID to database using view and same filter data added by user
Gumi
I'm using django's EmailMultiAlternatives to send html template as mail, but when I send mail it does not load css, I tried with external and Internal CSS both https://drive.google.com/file/d/1jNsQ-ZnpXY86biHA7qASygZZwGYtoKTj/view?usp=sharing This is what I am doing
Naggafin
mail clients typically refuse to download external css files so you usually need to inline your css
Bagaudin
how open file debug.log?
Shivam
how open file debug.log?
To enable debug logging information and open the debug log file: Select Preferences from the Preferences Toolbar. The Viewer/General dialog box displays. Click the Error Log File check box. Click OK to save your selection. Open the Debug Log located in the following directory:  Windows XP, Windows Server 2003 - c:\Documents and Settings\[user]\Local Settings\Temp\Prizm Viewer Log File.txt Windows Vista, Windows 7, Windows Server 2008 - c:\Users\[user]\AppData\Local\Temp\Prizm Viewer Log File.txt Windows Vista, Windows 7, Windows Server 2008 With IE in Protected Mode - c:\Users\[user]\AppData\Local\Temp\Low\Prizm Viewer Log File.txt Open the Prizm Viewer Log File.txt by double-clicking the filename. The debug log file displays:
MUHAMMAD Ahmed
Is any way to embed video from local directory without media folder.
Yogesh
How to access admin panel after deployment in production help me
Sibiselva
I am creating small api with sqlite3 as db . In filter method if i pass lte or gte means the data is properly fetching but if i gave both lte and gte means all data in the db is returning. How to fix it
Egor
Hello everyone. Tell me how to authenticate using the link if the access of insecure applications is blocked?
Ajn
Anyone have guide on deployment of django application on Aws instance
Doragonsureiyā
Can i send photo
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Sibiselva
Would be helpful if you can share code + expected output
https://nekobin.com/camuqudiqu this is function In filter iam passing agegte=20,agelte=30. So the expected out is the age between 20 and 30 but the actual output iam getting is whole data. If I use any one filter like age__let=20 means the data below age 20 is returning
Anwar Sadik
Any one to help to deploy django project in aws
Mahmood
Hi everyone I'm making a site where the domain change dynamicly from the server I'm using custom app something like the "Django Sites Framework" The domain stores in a model in the database, and I want to update the ALLOWED_HOSTS from a model in the database Anyone have an trick to do this
Mahmood
http://xyproblem.info/
I updated it Thanks
Naughty
Can anyone guide in add,update,delete and displays products in django and fetch category
Doragonsureiyā
Can anyone guide in add,update,delete and displays products in django and fetch category
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Arslan
Hi why swagger gives an error when I go to the handle with the get method { "detail": "Authentication credentials were not provided." } I am logged in to the admin area status code 401
Arslan
Thanks
Boogeyman
Hey everyone how can i used store procedure in my django model
V
Any project ideas in django
Vaibhav
Any project ideas in django
Build an autonomous school system
Yogesh
How to access admin panel after deployment in production
Yogesh
Anyone have idea
Mahmood
Check out Django tenancy
This doesn't fix my problem I just want to know how to update the ALLOWED_HOSTS from queryset, when i run my project If you know where i should put the code for updateing the settings.ALLOWED_HOSTS when the my project run This will be helpful And Thanks for your answer
Avi
Hi any django developer i need help please
Ali
Just post your question here & who can answer will help u
.
This doesn't fix my problem I just want to know how to update the ALLOWED_HOSTS from queryset, when i run my project If you know where i should put the code for updateing the settings.ALLOWED_HOSTS when the my project run This will be helpful And Thanks for your answer
“You shouldn’t alter settings in your applications at runtime” https://docs.djangoproject.com/en/4.1/topics/settings/#altering-settings-at-runtime Having said that, the link above shows a sample code doing what it warns against. Try that.
Mahmood
“You shouldn’t alter settings in your applications at runtime” https://docs.djangoproject.com/en/4.1/topics/settings/#altering-settings-at-runtime Having said that, the link above shows a sample code doing what it warns against. Try that.
Thank you for your answer Do you know where is the place to update it when run the code? I want to update it when i run the server, to load the domains from the database And i will update it when i save the model