Nitesh
so should i use like.user.user
Mirco
Use a related_name and call it profile , easier
Anonymous
Is there any group releated to FLASK framework?
Fedor
Hey everyone. Does anyone one the best way of implementing settings in admin page? For example, I want my home page of web-site to be flexible: i want to be able to change media data and text on it.
Anonymous
??
Anonymous
Use __str__ method into your model
i am not getting u want to mean for eg if i register string to name it will show in the admin objects
Anonymous
is that i have to call anything??
Anonymous
yes... sorry...
Gaurav
Amit like this: from django.db import models class Question(models.Model): # ... def str(self): return self.question_text class Choice(models.Model): # ... def str(self): return self.choice_text
Ghorz
Is there any other method we can use if we have multiple views which has same use
Cluster them, use a single view class, define functions in the for the different parts.
Ghorz
Please can anyone help with styling Django forms! Giving a class to the entry fields so it could be styled with css
Install django bootstrap4 Add to installed apps In template {% load bootstrap %} Inside formtag {% bootstrap_form form %}
Ghorz
Use context_processor
It will enable you store site settings in database
Gaurav
Ghorz
👍👍👍
Something is missing
Ghorz
__
Gaurav
__
Haha yeahh
Ghorz
Double underscore
Ghorz
I typed it but Telegram filtered it
Ghorz
str
Fedor
Yeah, it cuts it off. Hate that...
Gaurav
I typed it but Telegram filtered it
Same thing happened with me... Double scores changed text into italic font...
Fedor
So non-pythonic
Gaurav
likethis
Anonymous
Hey I want to start learning django Can anyone suggest how to start ?
Fedor
Hey I want to start learning django Can anyone suggest how to start ?
Django documentation is amaizing thing to start learning django.
Ghorz
Since you want to return questions, Use return str(question_text)
Ghorz
It will help convert it
Anonymous
Or any course that i can refer...?
Anonymous
Learn Graphql in django, Amazing topic to learn
Ghorz
Hey I want to start learning django Can anyone suggest how to start ?
Use Jose Portilla Python Django Development Bootcamp
Gaurav
Hey I want to start learning django Can anyone suggest how to start ?
You gotta learn basic python...spend around 1 month playing with it...then switch into django... practice their official poll app code several times...
Anonymous
I already learned python
Anonymous
So now i want to switch to django
Ghorz
So now i want to switch to django
https://ghorz.com/blog/Video/2019-08-06/3/best-django-tutorial-video-for-beginner/
Ghorz
This course is the best I came across
Ghorz
The guy explains every bit of Django like you've never programmed
Ghorz
It kicked off with HTML, CSS, Javascript, python, django intro, django app
Anonymous
Thank you so much..
Lugano
Thats a lot
Anonymous
https://www.youtube.com/user/CodingEntrepreneurs/playlists
Anonymous
you can use this tutorial for free django 2.2. too it was very usefull
Ghorz
$19.99
I'm not marketing for them, thats what I used
Lugano
I'm not marketing for them, thats what I used
How can we know,if you are not marketing for them
Ghorz
https://www.youtube.com/user/CodingEntrepreneurs/playlists
You can if you've had a little knowledge of django. Most of the videos assume you've some coding knowledge.
Ghorz
He can use the official docs if he finds it comfortable
Ghorz
Then*
Anonymous
Ghorz
Ghorz
It was on promo then
Ghorz
That's why you see over a million students enrolled in the course
Ghorz
I must confess, I've used countless of tutorials but this one really broke things down.
Anonymous
There is an udemy course of the same person which we can get for free on toreent..
Anonymous
Torrent*
Ghorz
Torrent*
Please no piracy here
Anonymous
Lugano
There is an udemy course of the same person which we can get for free on toreent..
Send me the link personally They dont advice such things here.
Anonymous
Cool stuff man..
Fedor
Thanks for your time. But in your example setting is a usual model and in django admin I would be able to create many settings (it would be represented in table). What i want is a special page in django admin with setting fields, but not as a table-view.
Ghorz
Thanks for your time. But in your example setting is a usual model and in django admin I would be able to create many settings (it would be represented in table). What i want is a special page in django admin with setting fields, but not as a table-view.
That's the way to go about it. You can create as many model as you want, just pass them to the context processor. Django admin gives you the freedom to customize your project. It does not by default come with your requirement since it expects your to make your decision on how you want your project built.