Lapanit ☃️
My new years resolution is to learn and master Django
Lapanit ☃️
So thats why Im here
George
how much do you need to master django?
Rajjix
master, wow wow wow
Master of what 🤔
Rajjix
no
George
NO
Rajjix
YES
cj
Master of what 🤔
Master of puppets 🤘🏻
Lapanit ☃️
🤦‍♂
Lapanit ☃️
Exactly why I cant stand this group, sorry @inchidi
George
Happy new year :(
Lapanit ☃️
Bye 👋
Who says Im leaving?
Rohan
My new years resolution is to learn and master Django
My new year resolutions don't last more than 2 days.
Rohan
But yea, I'd love to master Django as well
Lapanit ☃️
cj
Why would I?
🤷🏻‍♂️
cj
he'd already said goodbye, but... nvm
Lapanit ☃️
He'll ban himself eventually 🤷‍♂
Rajjix
is this admin troll mode?
Lapanit ☃️
Rajjix
started what
cj
and now, keep things clear and on topic...
Lapanit ☃️
¯\_(ツ)_/¯
Rajjix
🚶
Mirco
Keep calm guys pls!
Anonymous
Happy New year guy ...so I've just changed the user model with a custom one when i tried to login using the built-in user view and model backed it worked so I'm kind of confused here why wouldn't i need a custom auth backend
Anonymous
Im using an email address to login doesn't that strike the need for a custom one at all
inchidi
Im using an email address to login doesn't that strike the need for a custom one at all
yes as long as you already register your new user model at settings.py
inchidi
since default auth backend call it via get_user_model()
Anonymous
Ok now i get it thanks
cj
validate the data first
Luke
how I do that?
cj
if form.is_valid(): form.save()
cj
how I do that?
You'd better want to use ClassBasedViews 🤷🏻‍♂️
Luke
already did that.
cj
is_valid != is_valid()
cj
¯\_(ツ)_/¯
Luke
Oh😂
Luke
Thank you
Lucian
print('Happy new year!')
Lapanit ☃️
print("same, thanks");
Lucian
print("same, thanks");
What language is that, Dart?
Lucian
I didn't know ; works in Python. First thing I learnt this year.
Lapanit ☃️
!!sticker print("this");
Lucas
Happy new year people
Mirco
Happy new Year!
🅜🅞🅗🅘🅣
Happy new year
🅜🅞🅗🅘🅣
😊
Chiji
Hello everyone. I'm having some challenges with my Django app
Chiji
I used generic views in my app, and I'm getting my HTML form fields from my model. Now I have this field in my model which I'll like to be a hidden field in my form, and I'll also like to preload the field with an ID of a post. How do I acheive that pls? It would've been easier if I can separate that input field, and manually hard code it in the HTML file, but after doing that, the data is not submitting to the database. All other ones will get to the database except that one
Ghorz
Hey guys, I need help update two models using a single UpdateView class.
Ghorz
for instance I have modelx and modely. modely connects to modelx via OneToOneField I want the two models updated silmultaneously using a single UpdateView model class
Anonymous
Hey guys how do i syncdb in windows
Chiji
You can use HiddenInput() and give the pk of a post by pre-populating it
That's exactly what I want to do. How do I do that? Note: I'm not creating any new form, as generic views generated a form for me based on my models
Gulshan
Any one have django tutorial videos
Maz
Hey guys how do i syncdb in windows
manage.py --makemigrations, then --migrate. Or what did you mean by syncdb?
Anonymous
Thanks it worked
Death Killer
<li {% if message.tags %} class="{{ message.tags }}"{%endif%}>{% if 'html_safe' in message.tags %} {{message|safe}} {%else%}{{message}} {%endif%}</li> {% endfor %}
Death Killer
explain this statement "{{message|safe}} {%else%}{{message}}"
Maz
explain this statement "{{message|safe}} {%else%}{{message}}"
It's about escaping dangerous html syntax which can be used as malicious input. A quick search online about template safe filters escape will explain everything.
Mirco
Just read docs! 😀
Death Killer
"|" what does this do
Death Killer
bitwise or?
Death Killer
what will happen when condition is true message|safe
Maz
"|" what does this do
Just piping, like in linux. Kind of. "Pipe the message through the safe filter before rendering it."
Death Killer
what will happen when condition is true message|safe
what about "messege" and "safe" are they predefined
Mirco
what about "messege" and "safe" are they predefined
message is what you send to template from your view, but it can be called as u want