Алексей
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
Mirco
Hi gd evening all , anyone could you please help me any channel for django and mongodb i want learn backend
django and mongo don't work well together so don't use them use Postgres to unlock all the superpowers, also the "document" like store
IM~Exynos
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
Check the import is correct, means the function name "formatargspec" is present, this error can be directly figured out via vs code.
AISHWARYA
i upgraded python version is that the problem
IM~Exynos
i upgraded python version is that the problem
Yup it's deprecated in python 3.5
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
IM~Exynos
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
It will solve for but for this if your planning to revert the version it's a bad idea. Use signature it's same as formatargspec.
AISHWARYA
ok let me try
Doragonsureiyā
Hi gd evening all , anyone could you please help me any channel for django and mongodb i want learn backend
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
cj
Yeah but i need these only so I am asking
and the answer is: you don't use Django with MongoDB
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
What i need i want to use python for backend and mongodb database framework is django please anyone suggest me according to this
again, you DON'T use Django with MongoDB... if you really want to use Python and MongoDB for web development, then use Flask or FastAPI with an ORM that supports MongoDB... but don't use Django with that
cj
if you really really want to use Django, then use PostgreSQL as database
G
Thank you for your information
cj
Alright use the default database
the "default" database is SQLite... I bet you'd prefer to change it to PostgreSQL instead
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?
Nabil
Is it a best practice to delay this validation to forms?
Умид
who can help there was a small question related to Django!?
Doragonsureiyā
who can help there was a small question related to Django!?
No one can help you until you explain your difficulties.
Умид
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?
Alejandro Alomia
"I got an error" Ok, but what kind of error?
django.core.exceptions.ImproperlyConfigured: Cannot import 'blog'. Check that 'apps.blog.apps.BlogConfig.name' is correct.
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
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?
Izbash
Automatically gets logged out when customer logins and selects a link from the manubar. Why does this happen?
For every request must be send auth token If I'm not mistake, Django by default store Auth token in cookies So please check if customer has enabled cookies
Emmanuel
Hello everyone, please I have a problem. I don't know where I'm stuck. I'm new to Django. 🧎🏽‍♂️🧎🏽‍♂️🧎🏽‍♂️🧎🏽‍♂️🧎🏽‍♂️
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.
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)
Maxim
it is not possible to send pictures
this group is for programmers, not instagrammers
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?
M. Hossein
U have the answer already😅
The problem is whenever I create a User, a UserProfile is not created
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
Did u try in the shell? What's the output
M. Hossein
Did u try in the shell? What's the output
When I create a User from shell and try to access its UserProfile, says User has no userprofile
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