Siddharth
<select class="username-bar" name="catagory" id="cars" required style="width: 128%; border: 1px solid orange;"> <option selected>Select the catagory:</option> <option value="rom">Upload Rom</option> <option value="mod">Upload Mod</option></select> I have this HTML, Could you please tell me how to make views when the user select option rom then other views and when he select mod then other views
Omar
Thank you
Anytime
SantiU
someone knows where to inform me about architecture of several users within different tenants in django ? I have a project that I have to migrate to this architecture and it would be the first time.
Sanki gunda
I need help in django project need to create api and send data through Json
Doragonsureiyā
I need help in django project need to create api and send data through Json
No one can help you until you explain your difficulties.
Omar
<select class="username-bar" name="catagory" id="cars" required style="width: 128%; border: 1px solid orange;"> <option selected>Select the catagory:</option> <option value="rom">Upload Rom</option> <option value="mod">Upload Mod</option></select> I have this HTML, Could you please tell me how to make views when the user select option rom then other views and when he select mod then other views
I don't really understand what you mean here but I assume you want to create a dependent or chained dropdown list to rely on a previously selected field so to display a list of filtered options. You can check https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html
Alex
I have installed whitenoise but still images can't be load when debug=false on production
Alex
any help
Shubham
Hello, can I add a search_field in stacked inline in admin page ?
Ankit
Hey guys i have started to learn Django, is there any course that i can follow to get better results? (I am learning this to get a internship in 2 months and i already know Flask)
Doragonsureiyā
Hey guys i have started to learn Django, is there any course that i can follow to get better results? (I am learning this to get a internship in 2 months and i already know Flask)
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Madara uchiha
Hello guys can some help me i have developed a project that deploy on aws but now 3k request/ sec because of it my server is down whenever I make up
Madara uchiha
Any suggestions are appropriate thank you
Arslan
Hello everyone, who will tell you a way to beautifully display the JSONField field of the model, now the dictionary is simply displayed in the admin panel and it's not beautiful, how to fix it?
Vorke
Any suggestions are appropriate thank you
Load balancing, additional server to handle increased no. Of requests
Madara uchiha
Load balancing, additional server to handle increased no. Of requests
Yes I use that services in fact I use auto scalling
Madara uchiha
But seems no luck
Masta
Hello community, I have a question. I am developping a project in Django in which I have the following models Customer, Orders, Recharge. In the Customer model I have a field called amount which stores the customer's amount. When order is placed, the order cost is deducted from the customer balance. When there is a recharge, the amount of recharge is added to the customer balance. My question is, is it okay to have customer balance as a field ? If no how can I improve my code. Thanks for reading me.
Gianluca
Hi, can you advice me some invoce html template that i can use with pdfkit ?
Максим
Hi guys! I started learning Django, I'm doing my first project. Created two models: Menu, SubMenu. But there is one unpleasant moment: if you switch from https://127.0.0.1:8000 on https://127.0.0.1:8000/menuitem1 everything is fine, and the next time you switch to another item in the main menu, the URL is formed as: https://127.0.0.1:8000/menuitem1/menuitem2 My code
syber
Anyone can tell me about "models.Model" why we use this I know this is inharetance concept of the parent class but after models why use . Model extra??? from django.db import models # Create your models here. class Employee(models.Model): eno=models.IntegerField()
Siddharth
How to get rid of it?
U messed up with URLs
Максим
U messed up with URLs
didn't understand what was mixed up there?
Максим
U made wrong urls
please explain, I really don't understand what the URL may not be correct
Siddharth
Максим
U have to send the app urls so that i can see
#Urls urlpatterns = [ path('', HomePage.as_view(), name='home'), path('<slug:sub_menu_slug>/', MainContent.as_view(), name='main_content'), ]
cj
#Urls urlpatterns = [ path('', HomePage.as_view(), name='home'), path('<slug:sub_menu_slug>/', MainContent.as_view(), name='main_content'), ]
add a slash at the beginning of your URL, so it will always be /submenuitem1/ then /submenuitem2/ and so on instead of submenuitem1/submenuitem2/submenuitem3/ every time you click on that submenu item link
cj
you're having relative vs absolute paths conflict there ¯\_(ツ)_/¯
Максим
Okay, I'll try it now
Максим
add a slash at the beginning of your URL, so it will always be /submenuitem1/ then /submenuitem2/ and so on instead of submenuitem1/submenuitem2/submenuitem3/ every time you click on that submenu item link
WARNINGS: ?: (urls.W002) Your URL pattern '/<slug:sub_menu_slug>/' [name='main_content'] has a route beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'.
Abhi
Hi guys im a beginner i know python i want to learn django will anyone please tell me how to learn django
Abhi
Ok bro
Maks
Hi Do anyone know where on YouTube to find an info about how to work with api and Json in Django? I need to connect with side api and show products in html
Anonymous
Hi Do anyone know where on YouTube to find an info about how to work with api and Json in Django? I need to connect with side api and show products in html
On your views file parse your API JSON response as a context and use it in the front-end If that's what you're asking of
Ishu
anybody knows how to fix flask_mail error in puthonanywhere
Maks
On your views file parse your API JSON response as a context and use it in the front-end If that's what you're asking of
Yes that is But I would like how to do it exactly in code May be on YouTube someone do so… me to see it
Anonymous
Yes that is But I would like how to do it exactly in code May be on YouTube someone do so… me to see it
In your views.py file Import requests def API(request): URL = "URL" data = requests.get(URL).json() context = { "data":data } return render(request, "template.html", context) Just a basic example
cj
WARNINGS: ?: (urls.W002) Your URL pattern '/<slug:sub_menu_slug>/' [name='main_content'] has a route beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'.
hahaha wait... long time I don't touch Django, then it should be somewhere else where you need to put that / at the beginning —or the end— of an URL to have it as an absolute path when you click in that submenu item, because that's your issue, absolute vs relative URL paths
Anonymous
to create a profile should i use usermodel or a new model onetoonefield to usermodel
Anonymous
?
𝑆𝑎𝑚𝑎𝑛𝑑𝑎𝑟
cj
to create a profile should i use usermodel or a new model onetoonefield to usermodel
use a new model keep the User model as clean as possible and don't dirt it with more fields than needed to have auth/auth flow
cj
Most preferable way is using User model
of course not, you'd better don't pollute your User model with more fields than needed for and auth flow, if you need to add more fields, for example for a Profile registry, you'd better use a new model
Anonymous
use a new model keep the User model as clean as possible and don't dirt it with more fields than needed to have auth/auth flow
i made CustomUserModel but in a site i was reading it also made a profile model related to CustomUserModel with OneToOneField
Siddharth
Which field in models can take value like 13.0.1.70
Chayeb
Which field in models can take value like 13.0.1.70
You want to store IP address or what?
Siddharth
Siddharth
GenericIpAdressField
Which field can take value with commas?
cj
Which field can take value with commas?
just store it as a simple string, don't overcomplicate yourself
cj
Charfield ??
yes, why not?
Chayeb
yes, why not?
But must to add validation
cj
But must to add validation
that's not a problem
Chayeb
Version of a mobile
This is an example how to create a field for version
Doragonsureiyā
This is an example how to create a field for version
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Siddharth
This is an example how to create a field for version
Charfield and textfield not taking values which have commas which field to use ?
capt. Levi
Can I any one help me with my assignment
capt. Levi
It's based incident management system
capt. Levi
I need to build an API