Алексей
class Meta:
model = Review
fields = ["id"]
Rahul
Completed my django training can anyone share resume how to update the project as am from non it background
Алексей
i have add
<input type="hidden" name="id" >
how?
Abel
Can i use firebase cloud message with djabgo
Diz Is
how can we use data table inline with api data in django
AISHWARYA
can someone help?. when I opened one of my old project it shows some error like this I'm not able to understand what is this
AISHWARYA
https://nekobin.com/qegowefami
G
Hi gd evening all , anyone could you please help me any channel for django and mongodb i want learn backend
AISHWARYA
i upgraded python version is that the problem
IM~Exynos
AISHWARYA
so what should i do next
G
Yeah but i need these only so I am asking
IM~Exynos
Use signature () function
AISHWARYA
Use signature () function
actaully i'm a beginner i don't know what it is . will the problem solve if i go back to a lower python version
AISHWARYA
ok let me try
G
What i need i want to use python for backend and mongodb database framework is django please anyone suggest me according to this
cj
if you really really want to use Django, then use PostgreSQL as database
Yuman
G
Thank you for your information
G
Ok
Demetra
hello, how i can get value from dict in html templates if i need d[i.val].some_value, where i it is object and i cannt get d.i.val.some_value
Demetra
TemplateSyntaxErrorException Value: Could not parse the remainder: '[i.url]' from 'd[i.url]'
Demetra
I solved this problem, I think good way to do easy structure to the view
Nabil
Hi, There're in models.py Blog and Comment classes with date field and I wanna restrict Comment date to be greater than or equal Blog date, as Comment has a blog foreign key field.
How to do that?
Can I use limit_choices_to to achieve that?
Mirco
Nabil
Is it a best practice to delay this validation to forms?
Умид
who can help there was a small question related to Django!?
Doragonsureiyā
Умид
I need the fields to be immutable and dynamic, but their values can be changed and saved separately to display later in Excel,
Alejandro Alomia
A question in my Django project I am using a directory called apps to store all my apps but when I try to add the app in the project configuration file as apps.nameapp or apps.nameapp.apps.NameappConfig I get an error. How should I add the app in these cases?
Doragonsureiyā
The Inspired
Alejandro Alomia
Alejandro Alomia
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
# Local
"apps.blog.apps.BlogConfig",
]
Alejandro Alomia
What I understand is that it is taking "apps.blog" as the name of the application but I do it that way because apps is the directory where I have all my applications.
The Inspired
No...
The Inspired
what you have to do is... go to the 'apps.py' file inside your app directory
The Inspired
and copy the value of the 'name' key and then paste that here
The Inspired
don't write names by your own. Django will automatically look for the apps inside your project directory
The Inspired
so it should be something like name=(App name)
Anonymous
Can I confirm the form on the website via telegram
Alolote
Please how can I add a feature that can enable users upload their profile picture by themselves
Izbash
Please how can I add a feature that can enable users upload their profile picture by themselves
1. Add route for uploading avatars
2. Define validation
3. If you want save pictures in your server, define public folder for static files
4. Save in database path to the user avatar (if user can have only one avatar, you can add column to user table, if many you need create new table for avatars with one-to-many relation to Users table )
5. Return to frontend path for avatar
Izbash
Alolote
Izbash
but it is not saving in the path from frontend, except I add the profile from admin panel
Yes, if I remember properly, you can define URL for static images and create static folder
So when you are saving user avatar you need to define it name by Django ( I recommend hashing or slug, don't save raw name )
Then you are saving avatar picture into your static folder and it's name in database ( test.jpg for example )
And if you are properly configured serving static files than on route /static/test.jpg will be your image
https://docs.djangoproject.com/en/4.2/howto/static-files/#
KD
Automatically gets logged out when customer logins and selects a link from the manubar. Why does this happen?
Emmanuel
Hello everyone, please I have a problem. I don't know where I'm stuck. I'm new to Django. 🧎🏽♂️🧎🏽♂️🧎🏽♂️🧎🏽♂️🧎🏽♂️
:q!
Emmanuel
What is the problem?
The last version 4.2 IS not good.🧎🏽♂️🧎🏽♂️🧎🏽♂️I did everything, until watching the tutorials but nothing is displayed, it always displays error.
jevAd
Maxim
Doragonsureiyā
Emmanuel
it is not possible to send pictures
Doragonsureiyā
it is not possible to send pictures
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
am
Course django?
Doragonsureiyā
Course django?
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
M. Hossein
I have a User model which extends AbstractBaseUser and I use it as AUTH_USER_MODEL.
I want to add a UserProfile model and add one-to-one field referencing User. So whenever I create a user, a userprofile must be created as well. How to do this?
Shamnad
Savage
M. Hossein
class User(AbstractUser):
email = models.EmailField(unique=True)
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
Shamnad
Shamnad
Did u try in the shell? What's the output
M. Hossein
M. Hossein
Is it ok to override AbstractUser save method?
Sarthak
How to add chatbot and Facebook integration using django any suggestions please?
Kareem
Why does Django drf sees on a addUser form some Fields and sends those fields to the db but the other fields sets their values to the default that's being set in models.py
Kareem
I'm using react and Django drf