Mikias
So how can i resolve this
Maxim
So how can i resolve this
it is impossible to say without knowing something about your code
Mikias
Can i dm you
Mikias
Bruhh don't get me wrong i just wanted to send the screenshot of the code cuz i can't share on this group.
Doragonsureiyā
Bruhh don't get me wrong i just wanted to send the screenshot of the code cuz i can't share on this group.
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Mikias
Aight
.
....has no attribute profile And in my view user = request.user.profile
Add if request.user.is_authenticated before using request.user.profile or add if hasattr(request.user, “profile”)
Satya Anurag
Hello, i am using pythonanywhere to host my django website. I am building a yt video downloader. And using pafy, pytube and youtube-dl modules. It's working perfectly fine in my local environment. But giving me this ERROR: [youtube] 0d302v1aVXs: Unable to download API page: <urlopen error Tunnel connection failed: 403 Forbidden> (caused by URLError(OSError('Tunnel connection failed: 403 Forbidden'))) in pythonanywhere. Searched Google and got pythonanywhere provide requests only to its whitelisted api. What can be the soln?
eng.Ahmed
pip install virtualenv prdjct2\Scripts\activate python -m venv prdjct2 pip install virtualenv cd prdjct2 django-admin startproject prjct
Said
Hi i deploy my django project on heroku all things work but when change debug to false all website pages get error internal server error 500 except admin page still working
Said
Anyone know any solution please ?
Said
What the log says?
heroku[router]: at=info method=GET path="/" host=sfrblog.herokuapp.com request_id=f15e2651-db58-40c2-b97e-adaae9eaab43 fwd="105.67.135.99" dyno=web.1 connect=0ms service=32ms status=500 bytes=528 protocol=https
Said
Just that message gave me
Said
In logs
Anonymous
How to django i am beginner plz help me out
Anonymous
How to learn django
Doragonsureiyā
How to learn django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
eldhose
I created User class (Abstract user) in authy app. And when I try to migrate the changes. This error comes up that authy.user is not provided. The field authy.Peoplelist.user was declared with a lazy reference to 'authy.user', but app 'authy doesn't provide model "user". The field authy.Peoplelist people.user was declared with a lazy reference to 'authy.user', but app "authy doesn't provide model 'user'.
Uchiha
Hi guys, i did django in past
Uchiha
Any one have full tutorial on django and rest framework
Uchiha
Please share the links.
Doragonsureiyā
Any one have full tutorial on django and rest framework
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Doragonsureiyā
Any one have full tutorial on django and rest framework
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Eman
What is the best way to relate all apps together
Andrey
How to retrieve bytes as b"…" from BinaryField?
Kapil
how to render dataframe data in html page
Kapil
i have data like
Kapil
Open High ... ST-1 strike_price Date ... 2022-11-01 41552.398438 41677.250000 ... NaN NaN 2022-11-02 41472.601562 41474.300781 ... NaN NaN 2022-11-03 40873.699219 41478.000000 ... NaN NaN
.
how to render dataframe data in html page
Pass the dataframe as a context variable and loop through it in your template according to how you want it displayed, for example, in an HTML table.
Kapil
but it is data frame to get data column wise
.
What is the best way to relate all apps together
There’s no general best way other than following best practices & good programming principles.
Kapil
how to get
cazan
Can someone help me how i can implement multiple forms for esch account type
.
Can someone help me how i can implement multiple forms for esch account type
This can be done using Django’s generic class based view, such as CreateView and UpdateView. Override the get_form class, and implement logic in there to check user account type and then returning the intended forms.
Rohan
How to redirect user to previous page from where he get to login first ?
.
How to redirect user to previous page from where he get to login first ?
I think if you use @login_required or LoginRequiredMixin this should be handled automatically. Are you using any of those?
Rohan
No
.
Use it. It’s good
Rohan
But I'm working with button so if I use log_required it will directly redirect it to login and user won't go on the page first
.
After the user logs in, it will go back to the intended page. Is that not what you want?
Kiarie
I have many lists and each list contains a date and other items. How do I sort this by date before I convert my dataframe to csv. I want my dataframe organized by date
.
I have many lists and each list contains a date and other items. How do I sort this by date before I convert my dataframe to csv. I want my dataframe organized by date
If you’re using Django queryset, sort using queryset.order_by method. If it’s not related to Django, you should probably ask in Python group, not here.
Kene
Hi guys. I have an API that breaks whenever there is a DB connection /Operation error. As a solution, I want it to do 2 things: 1) Any endpoint not connecting to a db should work fine (return a response) 2) Any db error should be formatted in a proper JSON response. I've tried creating a middleware thinking this would stop the db error issue but this doesn't work. DB is postgres
Anonymous
How can i use two prefetch related. I wanna to get in 1 query response that contain data from 3 models which related like tree data
@ranger
Can anyone here recommend good material to start Django? Preferably video guide.
Doragonsureiyā
Can anyone here recommend good material to start Django? Preferably video guide.
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Snow
Will a Django web app still need JavaScript in its frontend?
Vorke
cazan
Is there a strong django developer that can help me with a task
Doragonsureiyā
Is there a strong django developer that can help me with a task
No one can help you until you explain your difficulties.
Niko
Hello everyone, I have a couple of questions about pagination, I have a className(serializer.Serializer) and now I can't find which method is called in this piece of code Code: https://www.toptal.com/developers/hastebin
SantiU
Does anyone know how I can iterate in a datatable different models that are related to a foregeinkey?
C_K
Anyone help me in django css font error
Doragonsureiyā
Anyone help me in django css font error
No one can help you until you explain your difficulties.
C_K
Website font are not changing even i change the font size in css
Doragonsureiyā
Website font are not changing even i change the font size in css
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
SantiU
I have a mother model related to two other models by foreingkey, I need to create an html table where different fields of the three different models are shown.
John
Experienced people please suggest me a proper package for token based authentication ... frontent vue and backend Django REST Framework
Sea Dragon
Experienced people please suggest me a proper package for token based authentication ... frontent vue and backend Django REST Framework
Django REST can use the inbuilt authentication system, you have to configure the decorator Or you want to write a custom JWT token ?
John
yes like access token and refresh token....or else please suggest me a secure one ...cause i only know this
Sea Dragon
yes like access token and refresh token....or else please suggest me a secure one ...cause i only know this
you could check this djangorestframework_simplejwt Note: anyone can view the data inside the JWT token.
John
OK cool...thanks man ..I'll have a look on that
Yemam
hey u can't run python manage.py and how can I get python env
•| M
Please code Add ratings and commet for product
Charly
Please code Add ratings and commet for product
This isn't a McDonalds for code where you just cand order things with no description at all