1. Create a forms directory2. Create ../forms/__init__.py3. Move your forms.py 
into the forms directory4. In ./__init__.py write from .forms import (  
FormThis,  FormThat,  EtcForm,)This gives you unchanged forms calling from 
wherever ... from appname.forms import etc5. When all that is working split 
your 3k forms.py into appropriately named smaller files each containing the 
form class or classes you prefer and adjust the ./__init__.py imports 
accordinglyYou might encounter occasional circular imports but you should get 
the hang of it soon enough.CheersMike--(Unsigned mail from my phone)
-------- Original message --------From: Julio Cojom <jul.alejand...@gmail.com> 
Date: 31/8/22  03:42  (GMT+10:00) To: django-users@googlegroups.com Subject: 
What do you do with large project and forms? I have a large project and 
forms.py per app is bigger than I thought with 3k+ lines in each file, I'm 
looking for options to make a good scalation structure, does anyone have 
experience with this? What do you do to organize your forms in your projects?



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHRQUHnd2zdPeaOmw2VzWhP2y1xN%3Dv2Z%2BQ%2B%2BsSw1B10AuxEnjA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/630ea50d.620a0220.480de.4507SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Reply via email to