Re: Folder structure for a Django project that has multi functional module.

2021-05-11 Thread Ammar Mohammed
Separating every functional module is the right way ! You should build your website on a base module using oop and structural method. Good luck On Wed, May 12, 2021, 06:43 Salima Begum wrote: > Hi, > We initially developed our project with the following folder structure; > > [image: old_folder

Folder structure for a Django project that has multi functional module.

2021-05-11 Thread Salima Begum
Hi, We initially developed our project with the following folder structure; [image: old_folder_structure.PNG] As shown in the above image we have developed and integrated everything into a few files. Since the functionality is growing we are planning to separate each functional module as an indiv

Re: Validate UserChangeForm from admin site

2021-05-11 Thread Sharif Mehedi
You can do something like:IN:class CustomUserCreationForm(forms.ModelForm):     def clean(self):    cleaned_data = super().clean()    # put your custom validator here! On Tuesday, May 11, 2021, 6:53:24 PM GMT+6, Ayush Bisht wrote: # admin.pyclass CustomUserAdmin(UserAdmi

Validate UserChangeForm from admin site

2021-05-11 Thread Ayush Bisht
# admin.py class CustomUserAdmin(UserAdmin): model = CustomUser add_form = CustomUserCreationForm fieldsets = ( *UserAdmin.fieldsets, ( 'User type',{ 'fields' : ( 'is_admin', 'is_doctor', 'i