These are chat archives for django/django

Oct 2017
Anish Shrestha
Oct 19 2017 02:36
Is there some two scoops of when to use afunctional or a class-based view
Oct 19 2017 03:52 how can i confirm a user email address from command line (django shell) made with django-allauth ?
Satyam Kumar
Oct 19 2017 10:22
Can anyone explain def save(self, *args, **kwargs) in Model documentation?
Oct 19 2017 10:53
What's your specific question/what don't you understand? Basically - it saves the changes to the database you made to an already existing model; or creates a new instance of the model in case you referred to it as obj = MyModel(some_field='hello'); You should be careful when overriding this method and always call the parent's save, ie. super().save(*args, **kwargs). There is rarely a situation where overriding save is a good solution. If you require for some action to happen after the save, you should be probably using signals and not calling the method from within the save method
other solution than signals is to use a custom method such that if we have models for Author, Book and Publisher, and we want to let the author know when his book is published, something like this would be probably appropriate: book.set_publisher(publisher) and then in set_publisher you can (1) save the book object with the new publisher, (2) send email to the book's author
Ahmed Ablak
Oct 19 2017 17:30

Hello guys.

I wonder what is the platform to use with django that enable the following features:

  1. edit/ enhance features in django app
  2. rapid deploy of the django app

I tried docker containers, it a long process of building, pushing, pulling, ... etc.

Thanks in advance!
Oct 19 2017 23:31
@Wahtdb_twitter , appears that link is broen