These are chat archives for django/django

19th
Oct 2017
Anish Shrestha
@annshress
Oct 19 2017 02:36
Is there some two scoops of when to use afunctional or a class-based view
???
matrixbot
@matrixbot
Oct 19 2017 03:52
@danh:matrix.org how can i confirm a user email address from command line (django shell) made with django-allauth ?
Satyam Kumar
@SatyamK23
Oct 19 2017 10:22
Can anyone explain def save(self, *args, **kwargs) in Model documentation?
emihir0
@emihir0
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'); obj.save(). 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
@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!
John
@flyboy1565
Oct 19 2017 23:31
@Wahtdb_twitter , appears that link is broen
broken*