Hari
Activate
Activated
игорь/igor
Install again
Hari
I can't share screen shot bcz this grp not allowed media sharing
Doragonsureiyā
I can't share screen shot bcz this grp not allowed media sharing
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Hari
Install again
Ok python Or django
игорь/igor
Hari
Ok
Anonymous
Hi can you reffer any django tuitor
Muhammadamin
insert or update on table "mainapp_category" violates foreign key constraint "mainapp_category_parent_id_3af30e8e_fk_mainapp_category_id" DETAIL: Key (parent_id)=(1) is not present in table "mainapp_category".
Doragonsureiyā
Hi can you reffer any django tuitor
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Natsu
Hi, I'm working on Django+react project and I have build password change functionality in DRF. Now I want to change password using react but how do I get that userID after login?
Natsu
Password change url: localhost:8000/user/<int:pk>/
Yogesh
Use request.user.id
Natsu
Use request.user.id
I'm using drf+react
Vadim
Hi guys, the problem is this. I am trying to filter the value from the Model by the "Segment" field but nothing is displayed.
Vadim
segment = models.ForeignKey(Segment, related_name='segment', on_delete=models.CASCADE)
Sudhanshu
Sir I want to create dynamic website like mutual funds So anyone help me to download template
Sunken
Hi I have a problem with many to many field. I want to have a list of a many to many field's objects, as a field in my model How can I do that while many to many field is not iterable ?
William
Hi, I'm working on Django+react project and I have build password change functionality in DRF. Now I want to change password using react but how do I get that userID after login?
After successfull login return users' Info in response. Like after the user logged in return the response as {id, username, first_name, last_name}. Modify the login response API
Sunken
How about array field?
No it has to be many to many field
Vaibhav
No it has to be many to many field
So what's the issue with a many to many field .. you can always use through table to query
Sunken
What kind of data do you want to store in many2many field?
It is a model that has name And it is model (not array field or list of choice)because l want to add or remove its samples
Sunken
So what's the issue with a many to many field .. you can always use through table to query
Let me explain it completely... I have a model named student has many to one relationship with model named professor. Professor model has many to many relationship with model named course course model just has name. I want to add a course field to student and I want it to be a list of choice of professor.course.
Sunken
Are you sure, that's the right way to model, shouldn't the course linked to students as well?
Student should not choose a course that is not mach to professor I mean maybe student choose a course that is not present by chosen professor if it happens makes problems
William
Student should not choose a course that is not mach to professor I mean maybe student choose a course that is not present by chosen professor if it happens makes problems
One way of doing this is to create a new model with the course and tutor/professor with students field as Many2Many.
William
Student should not choose a course that is not mach to professor I mean maybe student choose a course that is not present by chosen professor if it happens makes problems
If the student is the one choosing the course then create data with no professor so that the student can take the course.
Vaibhav
And in real world, we course course and not professor
Sunken
And in real world, we course course and not professor
You know its not a reall professor, student and courses I just tell it for an example for well understanding
dhokabeatz
Help me fix django-admin not recognized
dhokabeatz
I have installed the django package but can't use it in my programs
Mirco
I have installed the django package but can't use it in my programs
You have an error ? Share the traceback with pastebin.org
dhokabeatz
When I try something like django-admin startproject I get error
Mirco
When I try something like django-admin startproject I get error
I bet my 2 cents you are not using any virtualenv
dhokabeatz
Please teach me🙏 to setup one
Mirco
Please teach me🙏 to setup one
Google it and read it from Python official doc
Gaurav
anyone know how to show login data off all user in html page or addition to how to update or delete the data in html page?
Vadim
Share the query that you have written.
if I access the Name field in a given model in this way "class CakeListView (generic.ListView): #seg = 'Bonari' model = Product def get_queryset (self): return Product.objects.filter(name__icontains='Красный бархат') " then it filters.
Vadim
if I filter like this "def get_queryset (self): return Product.objects.filter (segment__icontains = 'Bonari') "then the error" Related Field got invalid lookup: icontains "
Vadim
Help me please
William
if I filter like this "def get_queryset (self): return Product.objects.filter (segment__icontains = 'Bonari') "then the error" Related Field got invalid lookup: icontains "
Try segment__field__icontains. As the segment is the ForeignKey relation you can't use segment__icontains directly. You have use it on segment fields
Vadim
this way? def get_queryset(self): return Product.objects.filter(segment__field__icontains='Бонари')
Anonymous
models.DO_NOTHING ?
Mirco
models.DO_NOTHING ?
Or SET_NULL , it will just set the fk to NULL
@LSR
Can i send context with redirect in django
Vaibhav
Protect, set null, do nothing are the others options
игорь/igor
Can i send context with redirect in django
I think context mixin would probably help
Anonymous
How to connect remote Oracle database in django project
Anonymous
K(RANA)
Can anyone help me! My python manage.py is running but directly open the django administration...today I am facing the issue
....
error : Reverse for 'detailresume' with arguments '(<built-in function id>,)' not found. 1 pattern(s) tried: ['detail\\-resume/(?P<id>[0-9]+)$'] views.py : return HttpResponseRedirect(reverse('detailresume',args=(id,))) urls.py: path("detail-resume/<int:id>",views.Resume_detail_view.as_view(),name="detailresume") why is this error . ? how can i solve this ?
tushar
Actually I have created super use but when I'm login with user login form then password is not authenticate any idea to authenticate and login
Anonymous
how to build a private chat with drf ?? Can anyone suggest me any material for this
cj
how to build a private chat with drf ?? Can anyone suggest me any material for this
to build a chat you'd better use channels instead of drf
Doragonsureiyā
If possible please share the steps
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
yusof
hey guys does anyone know what does ManifestStaticFilesStorage do in django?
Danil
Hello everyone, can anyone please help with the problem of importing a model from one app to another, it seems like a common problem, but for some reason everything that Google does not work. ```from ..manager.models import Manager ImportError: attempted relative import beyond top-level package ``` Such an error occurs, the apps are on the same level, I try to climb from one to another
Danil
I don't think there's anything like ".." Instead "./" Or "../" or "../../"
".." suggested by pyCharm and ". /" Or ".. /" or ".. /." - discard the error
Danil
I don't think there's a need for "..". As long as the app is included in "INSTALLED_APPS", 'manager.models' should work just fine
thank for you answer, but in reality, mistake was from pycharm, it highlight right import as import with error I spent two hours for this😂
Clevrr
Um ok😅
O
hi, does anyone used semantic ui with django? can I import it via cdn and use directly or I need to install a 3rd party like https://pypi.org/project/django-semantic-ui/