Anonymous
My_site says it hasn't any module named my_app
go to setting.py and install your application
Mirco
pip install django
Mirco
After activating the virtualenv
The Captin
Visual studio or visual studio code
The Captin
Then it is fairly easy .. just check the virtualenv docs and the django docs for installation steps
Mirco
Studying
Mirco
Search engines are out there, you can do it by yourself to learn
Mirco
Yes what ? Start studying python before moving to Django
Mirco
If you don't know how to install a simple module in a virtualenv, it means you need more time to study basics of the language and its tools
Mirco
Regardless the IDE or Editor
Mirco
Which error ?
Mirco
How many times do we need to ask you which error ? I mean give details of it
Mirco
Can anyone help me with query 👆
Pass it through the context And then you can access its attributes
M
Yes I did but in template when I display object it is not showing
Mirco
Is django installed ? Is virtualenv activated ?
Mirco
Are you sure ?
Mirco
You can do a pip show django ?
Mirco
The command is django-admin, not admin-django
M
Share the code
M D: https://pastebin.com/XXzy0L7g object is mon which i am passing and trying to access inside {{ }}
Mirco
M D: https://pastebin.com/XXzy0L7g object is mon which i am passing and trying to access inside {{ }}
You are passing a dictionary not an object so you need to get value by key into the template
Mirco
python manage.py check Should work if django is properly installed
M
You are passing a dictionary not an object so you need to get value by key into the template
Ahh I see ..I read that in context we can pass only dictionary so I was using like passing as key : myobject and then data.key.key1 In my example {{ data.mon.k }}
Mirco
Pip freeze
pip show django is better
Mirco
You are confusing a virtualenv with Django As I said before you need to clear your ideas about Python world
KP
Anyone please help me how to convert currency in restapi
https://github.com/aisayko/django-xe-currencies
Sumit
Hey, how can I implement daily database update in django, i.e. there will be daily data update, I have read about django-simple events, django-eventtools, but I don't know how to use it, I am a newbie with these library.
Akhil
Can anyone help me
Akhil
In my django project urls.py not importing . Import views
Akhil
ImportError: attemped relative import with no known parent package
Sumit
Maybe you are not provide the correct path
Sumit
Import as follows
Sumit
Import Myapp.urls
Sumit
Or from Myapp.urls
bot
I am facing issue in import views in the urls of app itself
bot
Error message says import error: can't import views
Anil
Doragonsureiyā
Sent screenshots
Read the rules before any activity: @PythonRules
Kapil
I have a registration form and I want to save the data from that from in two models...one in django admin user model and another in seperate user model...how can i do that in django?
✙Yaroslav
Guys, I'm using dj_rest_auth. I want to log in through Google, do it according to the docs, created the GoogleLOgin class along with the adapter and the client. BUT when I go to the address to this login, it asks me to enter the code that comes from Google, but it turns out that when I contact me, I don't have this code. What step i miss and which is not in the dock? I made a separate urla, which sends me to Google, log in there, give data to enter the application and return me to the home page, where code is already in the url. But you have to copy and paste it .... How not to do this? thanks)
Kapil
are they connected somehow?? like one to one or foreing relation ??
I'm using django admin user model and the other user model have id, name, mobil, email, password, status, created on, updated on , role id and token
Kapil
i haven't made any relationship
Kapil
I just want the data from registration page to go in admin user model and the other user mode at same time
محمد دلشاد
I'm using django admin user model and the other user model have id, name, mobil, email, password, status, created on, updated on , role id and token
thats very inefficient way you should go with making an one to one realtion with the user model of django and your custom model should have all the fields which are not in the Django user model
محمد دلشاد
and when you create the form for the custom user model you can store all details easily on respected models
محمد دلشاد
https://hastebin.com/ujenucokal.py have a look here and don't forget to check official docs
Kapil
and when you create the form for the custom user model you can store all details easily on respected models
I cannot change the custom user model as it is related with other models and I'm using django's form to take data
محمد دلشاد
I cannot change the custom user model as it is related with other models and I'm using django's form to take data
then just pass the same details to its form also it will pick up with the name but truly thats really inefficient to store same data at different models
Kapil
actually I want to provide these users admin level accessibility that is why I'm doing this
R.U.S.H.A.B.H
How to return 2 renders in 2 different htmls from 1 single function jn django
R.U.S.H.A.B.H
Can we ?
cj
Can we ?
yes, if you use some conditions to whether show one of the templates you want when each condition is met if some_condition: return render("some_template.html", ...) elif another_condition: return render("another_template.html", ...) return render("default_template.html", ...)
Anonymous
Hello I want to get value of p and h1 tag (which is dynamically change time to time) in method(def) in views.py. So could someone help me to solve this issue??
Anonymous
Okay just wait for a while
Jorel
Hello
Jorel
please i have proble when installing psycopg2-binary and Pillow
Jorel
I am on windows os
محمد دلشاد
please i have proble when installing psycopg2-binary and Pillow
try installing them by downloading the relative .whl files an follow the instructions online
Anonymous
Show me the code through pastebin
https://pastebin.com/TNwsSxYu
Roger
Hello! Does anyone know what is the best way or propper way to implement Bootstrap in a Django Project?
Roger
Using Bootstrap CDN. Please don't mention it 😂
Anonymous
I can't create new class in models.py. it gives error like, no such table : Hospital_test
Tarun
I am facing issue in import views in the urls of app itself
From testapp import views as v1 From testapp2 import views as v2