Kuth
Consider on the line context = { foo = bar ... } return render(request, template_name, context)
Kuth
def example_one (request): {Your code } return render (request, 'index.html', ...) def example_two(request): return render (request, 'index. html', ...)
Kuth
This case the same index.html but can render dynamic content base on your implemented same template variable but different function So client can request from different route to same but render just a single page
_VVV_
Please help me connect ms sql server, where is the error? DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'calculation', # Имя вашей базы данных MS SQL Server 'HOST': 'LAPTOP-I338VDBM\\SQLEXPRESS', # Имя сервера MS SQL Server 'OPTIONS': { 'driver': 'ODBC Driver 17 for SQL Server', # Драйвер ODBC для SQL Server 'trusted_connection': 'yes', # Использовать Windows Authentication }, }, }
Kevelino
Please anyone can help me with easy panel, to deploy Django application?
Kevelino
https://cfptac.com go to this site to see the response from easypanel deployment.
Chintu
{ "user": { "username": "reseller_username", "email": "reseller@example.com", "password": "your_password", "mobile": "9876543210" }, "company_name": "Company ABC", "cin_no": "CIN1234567", "company_address": "123 Street, City", "pan_card_number": "ABCDE1234F", "bank_name": "Bank of Reseller", "bank_account_number": "1234567890", "ifsc_code": "ABCD0123456", "region_state": "State ABC", "pincode": 123456, "select_category": "ESIM", "salesman": 1 } how can test this api in postman but i am facing this issue because i have the these fields....in user model have the json type data but if i want to file upload then it will form-data so how can i handle this in one api
Chintu
anyone know the solution then please let me know
麦当劳
Please anyone can help me with easy panel, to deploy Django application?
AWS EC2 or pythonanywhere although pythonanywhere is way more expensive
nizzer
i need help when i try to use phonenumberfieldwidget in my form.py i did get the country code for my phone number class OnlineMember(models.Model): MALE = 'M' FEMALE = 'F' OTHER = 'O' NOT_SPECIFIED = 'N' GENGER_CHOICES = [ (MALE, 'Male'), (FEMALE, 'Female'), (OTHER, 'Other'), (NOT_SPECIFIED, 'Not Specified'), ] first_name=models.CharField(max_length=100) last_name=models.CharField(max_length=100) email=models.EmailField() phone_number=PhoneNumberField() gender=models.CharField(max_length=10,choices=GENGER_CHOICES,default='NOT_SPECIFIED') country=CountryField(blank_label='(select country)')
nizzer
i got this ' MultiWidget.init() got an unexpected keyword argument 'input_attrs''
Baliraine
how can i make time setting to east african time when my django project is live at pythonanywhere
Priyanshu Pratap
Hey anyone knows how to use django template language inside javascript...like i want to use for loop of DTL like {% for data in dataset %} ... and some other dtl after that... anyone know how to do that?
Priyanshu Pratap
impossible that's server-side party
So how i can do that like i am sending json data from my views.py to html file where JavaScript code is also there and inside the js there is a function where i have to use the value provided by that json data
Maxim
So how i can do that like i am sending json data from my views.py to html file where JavaScript code is also there and inside the js there is a function where i have to use the value provided by that json data
like <script language="javascript">const jsvar={{ pythonvar }};</script> where pythonvar is JSON replresentation of some data
Priyanshu Pratap
Okay 👍🏻
Parsa
Hi guys 👋 is the Django models can connect to the all database with createing models for example if i create models in Django it is create database like SQLite or postgress for can it work for mongo or Graph database?
Parsa
Django is built with the relational model in mind, using a non relational database is clearly a bad idea
So if we want use noSql it mean cant use in Django we want to use it for the big data we need graph or mongo and we monitoring is Django? It mean can not stacks in Django?
Charly
So if we want use noSql it mean cant use in Django we want to use it for the big data we need graph or mongo and we monitoring is Django? It mean can not stacks in Django?
Dude, graph data bases are not for big data are for graph shaped data. Mongo has its own features if you just want to have a lot of data SQL is fine. But yes Django is for relational databases only.
Maria
Hi all.. I am having a django application that reads and writes in to a network path that's looks like \\10.0.12.104 But I'm not able to read or write into it through my APIs.. But I'm able to read and write for this path from django shell. This works in my local host. But when I'm deploying it I'm getting the network error.. Please advise
Nick
how to get connections details from mysql db?
Mirco
Already
Ask ChatGPT 😁 Jokes apart, what do you need exactly ?
Nick
Nick
Where is your db ?
My database is hosted remotely
Mirco
My database is hosted remotely
And this is clear, but where ? Is it a VPS ? Cloud ?
Charly
Apache
That wasn't the question
01110010
Connect with ur host address and port
xv
how can i use is https://github.com/citusdata/django-multitenant to create schemas, anyone used this before😀😀😀
Lauriano
Hi class My question is about foreign key. I have two tables, the first table is named <plant> and the second table is <photo>. The table <foto> has a foreign key to the table <plant>, - because the relationship in question is many photos for a single plant, how do I access the value (name) of the plant, using the <photo> table? I am studying this document: https://docs.djangoproject.com/en/5.0/ref/models/querysets/#id4
Priyanshu Pratap
impossible that's server-side party
I did it...i had to use my variable as {{pythonvar|safe}} actually when we pass python variable to html using DTL then special character gets html hex encoded so by using 'safe' it skip or prevent our variable from encoding
Siddharth
hello sir please allowthe file sending option
Siddharth
i have suffering a template problem
Doragonsureiyā
hello sir please allowthe file sending option
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev
Данuло
Hello, could somebody tell me if it’s normal to delete all the migrations and initialise new one, before posting on platforms like GitHub, or should i leave them as they are and why?
Abror
Hello community How can I represent month as a field in django models
Circuit
mates! what causes this error in replit django projects [26/Jun/2024 11:05:03] "GET / HTTP/1.1" 200 290 [26/Jun/2024 11:05:30] "GET /admin/ HTTP/1.1" 302 0 [26/Jun/2024 11:05:30] "GET /admin/login/?next=/admin/ HTTP/1.1" 200 4158 Forbidden (CSRF cookie not set.): /admin/login/
jager
hello, does anyone have a login and registration template for the website?
Charly
hello, does anyone have a login and registration template for the website?
This group is not for template sharing you'll have better luck by googling it
Abror
Yeah why not
How do I do that
Charly
How do I do that
So just a field with a numeric value
Asr
Anyone using pythonanywhere? I am creating a project in django and make it live on pythonanywhere. I am facing a problem I try to upload a file which size is 500mb and it's show entity is too large anyone know what is the solution?
Vikend 🏆
Vercel doesn't provide support for python
But I myself use python for my api and host in vercel, it works fine
Asr
Okay i'll try it
Freak🙃
I'm working on user registration,login using Custom user, I'm really facing it hard,anyone please
Nichervan
What is the best module to add country lists and phone codes in Django models guys can you give me an example I want to use this to field for register form
M
Is Django recommended for beginners to learn backend dev? I am good in python language.
Harshith
does django have future
Charly
does django have future
No one knows about the future but things don't suddenly disappear
Suryo Adhy Chandra
does django have future
have you learn about django deeper?
Rupesh
Anyone here who work in product based company and use django?
Rupesh
I think django has no future for good career growth
Suryo Adhy Chandra
I think django has no future for good career growth
https://www.geeksforgeeks.org/future-of-django/
Genaro
Hi, has anyone ever make a deploy of a Django app using docker in a cloud server?