Rajesh
Django has job scheduler?
Mirco
Django has job scheduler?
Nope, but you could easily integrate it 😊
Mirco
Django supports different message brokers
Ihsan
ok ,thanks will look into it
Mirco
ok ,thanks will look into it
Especially django-q
Mirco
Nice
💪🏻
Rajesh
💪🏻
Any Jwt package u know for django
Ihsan
btw is celery also considered job scheduling?
Mirco
btw is celery also considered job scheduling?
Yup, but check Django Q Much easier and less headaches
Ihsan
ok, thanks. appreciate that 👍🏼
Doragonsureiyā
Rajesh
djoser for example
Since when u r working with django or python
Rajesh
??
Mirco
Since when u r working with django or python
A couple of years more or less
Rajesh
I just started python
Rajesh
Earlier I was using php
Mirco
Happy learning!
Rajesh
💪🦾
Bradypodion
Actually I hit that bug recently and I dont know the bug reporter. Would you please share your settings with me?
Have you set the right project interpreter? Settings-> Project Interpreter -> virtualenv_dir/project_dir/python_bin
Shashank
Guys so I have just started learning Django and i have noticed that few Dev's use Class for view and then call class object.as_view() to show and few use def and then render() which is the best practice?
Ihsan
it's called class based view, while the other is function view
Ihsan
tbh i don't know which is better
Daro
hi, indjango official doc, i found,>>> ArticleFormSet = formset_factory(ArticleForm) >>> data = { ... 'form-TOTAL_FORMS': '1', ... 'form-INITIAL_FORMS': '0', ... 'form-MAX_NUM_FORMS': '', ... } >>> formset = ArticleFormSet(data) >>> formset.is_valid() True, but when i try it, it retorns me false
Daro
any ideas
Daro
??
Mirco
Guys so I have just started learning Django and i have noticed that few Dev's use Class for view and then call class object.as_view() to show and few use def and then render() which is the best practice?
There's no a best practice, it depends on what's your need But usually start from FBVs and then move to CBVs , but there are some scenario when a small FBVs is a proper choice
Mirco
any ideas
You are not sending any data
Ihsan
from my understanding, class based view less boiler plate and can be used again and again
Ihsan
but function view in my opinion is easier
Mirco
Can you tell me which scenarios which is better.
Thery are classes, you can use inheritance for example and reuse lots of code
Ihsan
i also just started django for 2 weeks
Mirco
but function view in my opinion is easier
They are easier to start and because you don't have so much experience yet
Mirco
But later you will get CBVs are much easier and flexible
Daro
in forms
Ihsan
They are easier to start and because you don't have so much experience yet
yup, i will try class based view when i have completed 2 projects
Mirco
Into views you are not sending any data
Shashank
Thery are classes, you can use inheritance for example and reuse lots of code
Hmmmm... So basically it's suggestable to use classes when there is reusability right. But there's this concept of using the URLs {{}} where we can re use right?
Mirco
You don't have to send that total etc. Django will do it for you
Mirco
You need to pass request.POST
Daro
You don't have to send that total etc. Django will do it for you
i do need to, cause django fills the formset with data from the db
Shashank
Using what ?
I don't know what they call it it's basically we write in {{ %extends url%}} Jinja? Is that what they call this.. we can reuse using this right?
Daro
i do need to, cause django fills the formset with data from the db
and i need to add things not edit existing ones
Mirco
i do need to, cause django fills the formset with data from the db
Are u rendering the formset into your template ?
Mirco
yes
So are you sure is it correct ?
Daro
and is showing errors cause, the meted is_valid is returnin false
Daro
in template
Mirco
Stop sending code into message Use pastebin
Mirco
Or I will warn u
Mirco
And here you don't have any form tag
Mirco
So you are not sending anything
Mirco
And you need to add crsf token
Daro
the data is sending rigth
Daro
i can save it to the database
Mirco
And why you are telling us is valid is False if you are saving into db ?
Daro
And why you are telling us is valid is False if you are saving into db ?
cause in django doc, from initial data always return valid, but in my code no, and that makes the template render the fields with errors
Daro
This field is required.
Daro
for every emnty field
Daro
for every emnty field
of the formset of course
Mirco
So fill the fields
Mirco
Into your model you have blank equal to False for those fields
Mirco
It's by default