abhishek
In test.py file
abhishek
I have tried this method but in diffrent way i will try with also and i will reach out to you
abhishek
You need to create and login an user in tests: https://docs.djangoproject.com/en/4.1/topics/testing/tools/
I have created the super user if i give the username its giving an error like username matching with query does not exist
Sardor Mirzayev
Hello friends! In the Django project, the information in the <input> tag in the html form should be automatically filled from the database, please help!
Charly
Hello friends! In the Django project, the information in the <input> tag in the html form should be automatically filled from the database, please help!
if you are using Django forms use the initial_data parameter, if not just render the value as any other using the template
Charly
you can reasearch then come with more specifi things but you need to put some ffort
Sardor Mirzayev
No
Ok Thank you
Charly
Ok Thank you
https://t.me/django/234394
Vas
can you show me
Documents Django form's
Hell
I have a doubt can django be used to develop a social media platforms like insta or fb? I mean in scalability pov can it with stand?
Hell
Hmm
Shubham
How to get current date time in django
Charly
I tried so hard but it didn't work
What have you tried and what where the errors?
Sardor Mirzayev
What have you tried and what where the errors?
the cell does not receive data from the database
Sardor Mirzayev
class Specialists(models.Model): title = models.CharField(max_length=200) price = models.FloatField(default=0, null=True, blank=True)
Sardor Mirzayev
class Patient(models.Model): name = models.CharField(max_length=255) year_of_birth = models.DateField() address = models.CharField(max_length=255) phone_number = models.CharField(max_length=14) complaint = models.CharField(max_length=500) expert = models.ForeignKey(Specialists, on_delete=models.CASCADE) doctor = models.ForeignKey(Doctors, on_delete=models.CASCADE) payment = added_on = models.DateTimeField(auto_now_add=True)
How to get current date time in django
from django.utils import timezone now = timezone.now()
Shubham
How to redirect from one page to another page in html
How to redirect from one page to another page in html
Did you confuse this group with Google?
Shubham
No
Shubham
I am learning that’s why i am asking question
I am learning that’s why i am asking question
You should learn how to searching in Google
Eba
How to redirect from one page to another page in html
if youre talking about django template you must add the urls directory of the page you are adding
Hell
Can anyone help me out on using teradata db with django?
Doragonsureiyā
Can anyone help me out on using teradata db with django?
No one can help you until you explain your difficulties.
Hell
No one can help you until you explain your difficulties.
I'm facing connectivity issues or not able to connect with teradata db with django I need help regarding it
Hunter
How to access all the details written by Particular User. This is my Student Model class Student(models.Model): name = models.ForeignKey(User, on_delete=models.CASCADE) roll_no = models.IntegerField(null=True) date_of_birth = models.DateField(auto_now=True) address = models.TextField(null=True) tolal_marks = models.IntegerField(null=True) User have written 2 data, And How to access those two data.
Kush
Hey ! I want to do unittest using pytest which path or documentation I can follow
Saadi
How to generate dynamic form? For example : User will give input of class_name, fields, id, type. And it will generate dynamic forms. Is there anyone who can help me with that?
adelshievvv
Hello everyone Who knows how to configure the output from the database in html in horizontal format? It just initially displays everything vertically and I want to fix it
Nikita
hey guys! I have a technique model and a user model, I can add a free technique by selecting the desired user and selecting the technique, then clicking on the button to change the state of the model How to implement this with checkboxes? Forms? I was trying to do with forms but it is not success
Jhon
friends, does anyone know any intermediate or advanced courses for django?
X_ShaygaN_D
friends, does anyone know any intermediate or advanced courses for django?
After beginner, the best courses are your imaginations; If you really don't have any idea about a website, Youtube is a great source if you feel like you lack the kickstart knowledge.
SantiU
What is the best practice for deploying django with ngnix dockerized on aws, I currently have it on one instance, but should I move the two images to ECS?
rtg
I want to try django-allauth proyect. Git clone from github, but there is a problem:
rtg
System check identified some issues: WARNINGS: openid.OpenIDNonce: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. openid.OpenIDStore: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
rtg
what is happening? thank you!
Марат Владимирович
How send hidden input from form to Django  CreateView? For example my hidden input value id for OneToOneField, but I sent post data id not found???!
부산
Hi everyone. has anyone read Django by example 4 edition here? I need help
Muhammad Owais
Hello everyone... Can anyone tell me how to secure django website to prevent from hacking
부산
what kind of help?
I am doing social media project which is a part of the book, you know. I am getting stuck on Bookmark feature of that project
Riad
How to solve this issue? this is an warning in pycharm. Class 'DecimalField' does not define '__truediv__', so the '/' operator cannot be used on its instances
cj
Hello everyone... Can anyone tell me how to secure django website to prevent from hacking
what kind of hacking? do you mean ensuring your website complies with cyber-security? go read this: https://docs.djangoproject.com/en/4.1/topics/security/
Riad
this is not a PyCharm support group
the warning is for DecimalField in Django. and I just mentioned the warning giver. I have added truediv method in the model but still the warning persists. Why so much toxicity here I don't understand. I get warnings for simple talking
Riad
simple talks are only allowed at @pythonofftopic
ok my bad, I was not aware about this group. excuse my mistakes
Jax
Any courses for django...for a beginner?
Hunter
username = form.cleaned_data.get('username'), what basically this cleaned_data means - I have googled that as well still not understood. Please help me.
Lightbourne
username = form.cleaned_data.get('username'), what basically this cleaned_data means - I have googled that as well still not understood. Please help me.
"cleaned_data" is form's data that has been parsed and validated after calling the Form.is_valid method https://docs.djangoproject.com/en/4.1/ref/forms/validation/
Vaibhav
i have hosted my django admin on a domain lets say : magic.django.com and also using an alternate subdomain for load balancing with the name : wizard.django.com Now when I log into django admin in magic URL, it still ask me to login in wizard URL ... i don't want users to do multiple login and want to prevent that all together, I have tried going through this setting in django https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SESSION_COOKIE_DOMAIN but it doesn't seem to be working for me for some reason
Olesia
Hi. I have a problem with CFRS token. Ive been trying to solve a problem at least 3 days. Could please someone help. I have html template, when i try to edit the post i get the problem: Custom CSRF check error. 403. But the token exists and its put in form. Seems to me that redirect doesnt work. When i type the edit adress in address bar in browser i am sent to the right page and it opens.
(₤ام͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـ͠ـیر͠
Hi. i have a problem with my css files in django. I biuld a static directory for my project, which includes js, css, fonts, img, and then I loaded these statics into the templates of my project to use them. All static files (img, etc.) are loaded correctly, but the style.css file is not loaded correctly. What is the problem?
Shubham
When user enter bank name then enter character must be in string format not include integer float
داودخان
how can i get last matched element to if condition while looping with for loop in django template
abhishek
https://linkode.org/#Z2i15EglowG4UkAuQ1BIf3