pranit
And in views.py
pranit
I imported like this way
pranit
form APP1. models import Employee
pranit
Getting error no module to employee found
pranit
from APP1. models import Employee
raven
include it in settings installed apps
raven
cj
why the hell you sent me direct message?
Lone
How can I redirect the user to the intended page he was looking after maybe routing him back to a login page for authentication?
Mirco
Lone
By using login required mixin or decorator
Take an instance where a user adds to cart while not registered and he clicks checkout button.How would I route him back to the checkout page after successfully registration?
Mirco
Mirco
The value of that param is the checkout url
KALEAB
How to fix bootstrap 3 navbar toggle is not working in django
KALEAB
I wanna to develop messega send and receive system using django is it possible
Anonymous
https://www.inkoop.io/blog/how-to-ensure-great-user-experience-on-forms/
Успішний Андрій
Could you send me this translation, please?
cj
cj
PV
Anonymous
I did add fields to model User but i got into trouble
When i migrate
django.db.utils.ProgrammingError: relation "user_myuser" does not exist
Anonymous
How to reset password with email plz any one help me
Anonymous
Mail concept
Jimmy
Anonymous
Anonymous
And i added
AUTH_USER_MODEL = "user.MyUser"
Jimmy
Yeah
Send Pastebin link so we can read the entire error log
Damian
hello !, does anyone know of any component in django that can filter dynamic tabs from the administrator?
thanks!
m0nte cr1st0
Hello. Help me
m0nte cr1st0
https://stackoverflow.com/questions/60169659/how-can-i-test-overriden-function-in-django-admin
Moe (محمد)
Hello guys!
So i have a Company model that is linked to User model,
And i have a form the let company owners create users for their employees
I want to save the created user company same as the Owner company who created the user
So by default it gives the user the same company when saving the form
Moe (محمد)
Hope its clear if not let me know, English isnt my best
Dhinesh
hey guys, I occurred in this error "ValueError at /accounts/login/
The view accounts.views.login didn't return an HttpResponse object. It returned None instead."
Dhinesh
This is my views.py
Cesar
Cesar
In your view, take the request.user.company and add it to the user creation
Moe (محمد)
I found a way in form_valid
form.instance.company = self.request.user.company
Before saving the form
Moe (محمد)
Is this the way to do it?
Himanshu
how can i create order from two different models.?
Himanshu
i want to make a the payment for two different models one is for whole package and another is for individual product. individual product will add to cart and whole package will be directly bought by users but before that i want to add the whole package to order summary to proceed to payment
Himanshu
how can i achieve that?
Himanshu
can anybody help me
Anonymous
Help help check the manual that corresponds to your mysql server version for that right syntax to use near
PV
PV
cj
Alex_E
https://py-orm.com
Detailed Query Development Guide Using Django ORM with SQL Notations
sohrab
how display show object_list data mysql on page home ?
Cesar
is there a way to get request.user from signals?
Sumit
anyone know how to upload mega.py using link instead of folder name?
Alex
I think it should have request somewhere in its entrails
Alex
Alex
So if there are some db actions with it, you will trigger that handler.
Moe (محمد)
One other question
Current the company owner is create employee’s account and he is setting the password, is it possible to let the company just create the email and then send an email to the employee and let him set his own password
Luan
Hello, I need to make a select field so that the option I choose remains fixed even when changing pages or updating the page. So everything on the page will be filtered by the selected option. Does anyone have any tips on how to do?
Alex
Cesar
Muhammed Enes
Hello, I have an a element. It has attribute = data-slug={{project.slug}}
But i couldn't take it's attr with jquery
Duncan
How can i solve the problem with vs code when i cannot type in the terminal. For instance if i make an input string, i can not type in the terminal... How can i solve this please?
వ్లాదమిర్ పుతిన్
https://hastebin.com/koqehotubo.sql anyone familiar with this error?
Alex
Alex
It literally says that cannot import that module
Valery
This is Boris real slav?)
Anonymous
django- how to send jsonResponse from views and fetch in template...
please help
Valery
And what the problem? https://docs.djangoproject.com/en/3.0/ref/request-response/#jsonresponse-objects
Shyamkumar
in Django where template folder sudo create in root project folder or root app folder
BASE_DIR, 'templates'
but many tutorial or django doc or Mozilla doc are show in both the root project folder or root app folder
Valery
Application templates are best placed in the application folder. This is useful when importing an application into another project.
Shyamkumar
project root/
projectname
...
appname
...
template
appname
...
Shyamkumar
or this one
project root/
projectname
...
appname
template
appname
...
...
template
master
...
Valery
accounts/templates/accounts/login.html
Shyamkumar
or this one
project root/
projectname
...
appname
template
appname
...
...
template
master
...
Valery
'DIRS': [os.path.join(BASE_DIR, 'templates')],
Shyamkumar
ok and thanks
Shyamkumar
Valery
I don’t get it