Cleo
works GG
Cleo
Thx.
R.U.S.H.A.B.H
U should try Fileresponse class it well help
Can you expand this! I'm unaware of fileresponse
Anonymous
In my django project urls.py not importing . Import views
Method 1 from (app name).views import (your view name) Method 2 from (app name) import views NB: -the app name here is the folder containing the views.py file -don't put those brackets in you code i.e. the () brackets on (app name)
Anonymous
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') NameError: name 'os' is not defined
yes go to the settings.py file on the top of the file write import os
Kapil
to save registration data in django user table I'm using django form and for saving data in app's user table I'm using serialisation. I'm able to perform both operations seperately but can i do it in one step?
M
Anyone encounters ctype module failure in python build .. I want to avoid building this module
Anonymous
Hai how to sort and aggregate data by week,month,year
Jaime
Hai how to sort and aggregate data by week,month,year
I have my objects ordered by puting class Meta: ordering = ['-fecha'] inside my class model
Jaime
Being fecha an atribute and - standing for reverse
Saksham Mittal
Hi, please how did you got that Django course on cousera? free?
It's free for College students till 30 September
Saksham Mittal
Also you can ask for financial aid and it is generally given to all after 15 days of application
Ibrahim
It's free for College students till 30 September
my school is not on cousera, i really loose hope for this!
Ibrahim
But i hear that i can't apply for whole specialization, course by course?
Saksham Mittal
No issue, if you have College MAIL-ID you will get any course enrollment free till 30 September
Saksham Mittal
But i hear that i can't apply for whole specialization, course by course?
There's no such issue, enrolled for deeplearning courses
R.U.S.H.A.B.H
How to access pages role wise / user wise with special permission???
Tush
hello can anyone tell me
Tush
i mentioned n point in url and it's still show page not found error
Tush
also i defind it in views.py file
Anonymous
whats the difference between username = request.POST.get('username') and username = request.POST['username']
KP
How to access pages role wise / user wise with special permission???
Django Roles, Groups and Permissions Introduction | by Hemanth S P | DjangoTube: | Medium https://medium.com/djangotube/django-roles-groups-and-permissions-introduction-a54d1070544
Anonymous
I have a model Employee . I would like to create a user account for every new employee is saved. I think I can do this by overriding default save of employee and add User.objects.create() inside Employee save Is that possible Is that unlogical
Tush
How you registered inside the main urls
can you explain in East way how can i solve UnboundLocalError in below file
Hello
Hi can anyone tell me how to crate bulk user in django by admin pannel please help me if you know this
Akintola
I have two model classes Symptom and Patient, then I made a one-one relationship between Patient and Symptom. Right now major concern is that I aim creating a patient (I want a form to be displayed whenever I try adding a patient that would contain every fields on the symptom table, so that whenever I submit it it also gets saved on the Symptom table) that could only be acheivable from the admin part, but on the front-end it shows patient contents only and shoves off symptom contents. Please I'll need help on this, now. Am kinda frustrated ....
Tush
https://dpaste.org/073y
in this file in second line pycharm show error in product can anyone tell me how can i solve that
Anonymous
A patient can have more than one symptoms and may be another patient can have that same symptoms
Anonymous
By the way your concern is not clear
Akintola
How am I to get it displayed on my front end. I.e for patient id 1, I want to retrieve his details alongside his symptoms (Something that I want to be able to create from the front end)
Chetan
Hi I need help as I just got out of solutions for this problem I need to design a system for multiple users where user can block their time slot( event or events ) for particular day (Monday) or days of the week create a sort of planner for the upcoming week
Anonymous
Anonymous
You should have three models to achieve this
Anonymous
1. Patient name (Char) 2. Symptom title(char) 3. Entry patient (Forienkey) symptom (ManytoMany)
Chetan
Hi I need help as I just got out of solutions for this problem I need to design a system for multiple users where user can block their time slot( event or events ) for particular day (Monday) or days of the week create a sort of planner for the upcoming week
Should I create 4 models 1. User 2. schedule 3. Days of week 4. Time slots With one to many relationship in all of them a user can have multiple schedule Schedule can be for one day or all days Then each day can have multiple time slots Or there is a better design pattern or way for the same
Aneesh
I have a serializer methode In that i have taken data like obj.data Bt iam getting it as Bound method model.data of <model>
Aneesh
Any one how to get the data from it
Aneesh
Please help
Sherlock
Hi, I want to develop online booking web app with django.. My doubts are, 1. Do i need a frontend framework? 2. Which frontend framework better works with django? Am thinking to pick react. Pls share ur thoughts.. thanks in advance..
Anonymous
Can anyone help me with uploading my media files to firebase storage or google cloud storage, please.
Zokir
Hello. I have a Teacher and Class model the teacher is connected to the class through ForeignKey. I am trying to make a list of teachers and the list should indicate in which class Teacher belongs. I tried to do it through related_name (_set) does not work .. help please Source Code Snnipped - https://dpaste.org/Xt40
Adrian
When you use related_name, you don't need to put (__set), you have to use all, It means teacher.clasess.all()
Adrian
This returns a queryset of classes
Zokir
When you use related_name, you don't need to put (__set), you have to use all, It means teacher.clasess.all()
'ReverseManyToOneDescriptor' object has no attribute 'all' context['room'] = Teacher.sinflar.all() (sinflar - it's related_name
Sh
Assalamu alaikum. I am using simple jwt. to get token there should be jwt view in url. I want to get token without using views.
Adrian
context['room'] = Teacher.sinflar.all()
Adrian
You have another problem, you are calling the Class, not the object, you have tu user something like this context['room']=self.model.sinflar.all()
Adrian
Or use it directly in your template {{ mymodel.sinflar.all }}
Adrian
👍🏾👍🏾
Adrian
context['room']=self.model.sinflar.all()
Zokir
context['room']=self.model.sinflar.all()
'ReverseManyToOneDescriptor' object has no attribute 'all'
Zokir
🤔 Hmmm
Adrian
https://stackoverflow.com/questions/51950416/reversemanytoonedescriptor-object-has-no-attribute-all/51950693
Adrian
This es exactly your problem
The mint of Linux **
i have imported settings but why it is not showing
Anonymous
Have a look at django-storages
But it was referring me to use aws s3, google cloud storage, etc, kind of services And i seriously don't know how to implement them.
The mint of Linux **
https://dpaste.org/niqS