Anonymous
fields = ('contact_number')
I did the same but it's giving attribute error
Anonymous
I can take only default fields. Like username, password1 and password2
Anonymous
*fields
Baku
Do you have contact_number field in UserModel?
Baku
No. How to add it.?
You can Inherit from AbstractUser and add new fields
Andrej
Can I use use it for multi tenancy ?
Do you mean with multi tenancy to have different websites/ shops with one backend? Have a look here: https://groups.google.com/forum/m/?fromgroups#!searchin/django-oscar/Tenant/django-oscar/z3IBbMQMQ0w
Achal
python3 -m venv env
What to do next
Baku
What to do next
source env/bin/activate
Baku
if you use linux
Achal
For window?
S
For window?
Look on net , u will get it easy
Baku
For window?
start env/bin/somefile.bat
snc
For window?
source Script/activate
snc
source Script/activate
if you are in the env folder
Achal
start env/bin/somefile.bat
It gives error msg source is not recognized.
snc
It gives error msg source is not recognized.
do you have... virtualenv installed?
snc
Yes
https://git-scm.com/ download this CLI app... it will help you to execute the source command... and many more
Anonymous
Admin panel CSS not loading it shows only HTML after deployment it works fine for development...
Anonymous
How can I solve that problem
Anonymous
No. How to add it.?
Just create new model like CustomUser and use OneToOne relationship to User model inside, add as many extra fields as you wish, this is the easiest way
Prakash
"Unknown column 'Candidate.fkcountry_id' in 'field list'"
Prakash
im getting this error can any one help me
Anonymous
Khalil Ibnu Omar
Hi, I have issues when i run python manage.py migrate AttributeError: 'Settings' object has no attribute 'OSCAR_DYNAMIC_CLASS_LOADER' I am using oscar api . Anyone help
Mirco
!paste
Doragonsureiyā
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
Nikolay
how ?
something like: OSCAR_DYNAMIC_CLASS_LOADER = 'myproject.custom_class_loader'
Anonymous
Admin panel CSS not loading it shows only HTML after deployment it works fine for development...
Anonymous
How can I solve that problem
Muslim
How can I solve that problem
Read about using static files on production with django
Khalil Ibnu Omar
my Setting.py https://dpaste.org/xfyM
Nikolay
my Setting.py https://dpaste.org/xfyM
and where is OSCAR_DYNAMIC_CLASS_LOADER?
Khalil Ibnu Omar
and where is OSCAR_DYNAMIC_CLASS_LOADER?
here https://dpaste.org/VAGb
Khalil Ibnu Omar
and I and this issues ImportError: Module "FastShopping" does not define a "custom_class_loader" attribute/class
Nikolay
I don't get?
replace it by default_class_loader()
Andrej
I don't get?
Actually you don't need to set the variable. It looks more like Oscar is not configured correctly and so not everything is loaded.
Nikolay
Same error
looks like Andrej is right, check with docs that you setup everything correctly
Andrej
Same error
You need to create a folder for your own plugin and create a file: app.py In that you create your application: https://pastebin.com/hD94vVL2
ROG 💻
How can I use the calendar.js library with django? Some example?
Egor
Andrej
How to start with this ?
The Django Oscar Docs looks on the first look incomplete, but it is actually okey. To make progress with it is first of all to understand the Oscar architecture and the principle behind it. It is a fully customizable shop system. Read the docs and watch the video by the author of Django Oscar https://django-oscar.readthedocs.io/en/2.1.0/index.html https://www.youtube.com/watch?v=o4ol6EzGDSw
Andrej
The Django Oscar Demo Repo is out of date, but it helped me to understand the concept better: https://github.com/django-oscar/django-oscar-demo
Andrej
When you have understood the concept behind it, you will be able to find all the specific points to customize the shop system by yourself. For example the basket, catalogue, customer, checkout-process, promotions, search, dashboard and offers.
Andrej
The debug toolbar is your very best friend
Shubham
Someone please help me, i need to draw a graph in django using d3 graph and in which i can load my json dictionary data
Neeraj
Someone please help me, i need to draw a graph in django using d3 graph and in which i can load my json dictionary data
Use the chart. Js graph. In this graph send the json/dictionary or list (which you want) in Templates and access the data in Javascript Section of chart.js selection. Now by for loop pass the data in graph. If you need more help msg me i will help you. 😊
✙Yaroslav
Hi guys. I have three models. Quiz, Question and Answer. How to display on one template name quiz, count questions to it and count answers for each questions? In the admin panel the solution to this problem lies in inline_formset_factory, how to do the same in the template?
Baku
And write a function that counts how many questions in the test
Baku
def questions_count(self): return related_name.count()
Baku
def questions_count(self): return questions.count()
Baku
As example
Pratik
Hi I am trying to insert using bulk_create and getting this weird error: django.db.utils.IntegrityError: null value in column "tour_details_id" violates not-null constraint this is the code snippet, obj = [ TourDetailsHelpers(tour_details=tour_details, field_name=1, field_image=e.get("image"), display_seq=e.get("rank")) for e in images ] TourDetailsHelpers.objects.bulk_create(obj) Can anyone tell me what could be the issue?
Mr
Django did not connect with postgresql
Mr
Password authentication failed for user
Mr
But all details are fill proper
Somesh
I will recommend you to use django admin panel..
Somesh
Guy. Could you send any best link for message notifications or post notifications for user..
Anonymous
Guys, I'm tryna built a calendar with pre-established events in program, which will show colour cell if day has restriction, then is possible to do that in Django?
Bral Bral
I want enable pagination on ModelViewSet. I created custom pagination class , and overrided "pagination_class" variable. But how i can get paginated data? /api/?page=3 or how?
Jasurbek
is there any built in Class Based View like LoginView but for Registration