Posts

Showing posts from May, 2021

Tips for Django

* DJANGO GROUPS - A group describes a group of users. One user can be part of many groups and one group can have many users. Groups can use of labeling users.   * get_user_model is more convenient than simple User model, it return currently active user model. * ResizedImageField :-  It resizes images when uploaded and stores them for you. * *args are used when we don't know how many parameters we have to pass, args store all the input in the form of a list. * **Kwargs are used when we don't know how many parameters we have to pass, **kwargs store all the input in the form of dictonary. * We can override the delete method tooo in our django models. * you can remove the default Group model in Django admin panel by using  admin.site.unregister(Group) * signal.py file :- basically this tells us as soon as an instance of the model is created call this function like that thing, there are four types of signals: - pre save , post save, pre delete and post delete. * Get Absol...