views and manager files according to MVT design pattern

12 views
Skip to first unread message

Alejandro Cuara

unread,
Aug 27, 2019, 4:42:37 PM8/27/19
to Django users
Hi, 
I would like to know if does make sense to split my views.py file into multiple view files 
trying to have a project better organized and the same for my manager.py file because i noticed that
they have grown a lot, from my perspective it make sense to be align better with the MVT design pattern
but I would like to know the recommendation from the official documentation or the experts in this matter.

Thanks in advance.

Mike Dewhirst

unread,
Aug 27, 2019, 6:46:14 PM8/27/19
to django...@googlegroups.com
I'm no expert but I have views in a single file in some apps and in a
views directory and multiple files in other apps. This happened
gradually for me as the views.py file grew.

Nowadays, I move to multiple files earlier than before because it suits
my brain better. And I don't use an IDE but prefer a plain text editor.

It is totally your call in your circumstances.


> Thanks in advance.
> --
> 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...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ec8fb034-dd09-4de2-a61d-29563a671f55%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ec8fb034-dd09-4de2-a61d-29563a671f55%40googlegroups.com?utm_medium=email&utm_source=footer>.

Tosin Ayoola

unread,
Aug 28, 2019, 2:21:14 AM8/28/19
to django...@googlegroups.com
Instead of splitting your view,  why not create a new app that way the project will b manageable 

On Aug 27, 2019 23:45, "Mike Dewhirst" <mi...@dewhirst.com.au> wrote:
On 28/08/2019 4:01 am, Alejandro Cuara wrote:
Hi,
I would like to know if does make sense to split my views.py file into multiple view files
trying to have a project better organized and the same for my manager.py file because i noticed that
they have grown a lot, from my perspective it make sense to be align better with the MVT design pattern
but I would like to know the recommendation from the official documentation or the experts in this matter.


I'm no expert but I have views in a single file in some apps and in a views directory and multiple files in other apps. This happened gradually for me as the views.py file grew.

Nowadays, I move to multiple files earlier than before because it suits my brain better. And I don't use an IDE but prefer a plain text editor.

It is totally your call in your circumstances.


Thanks in advance.
--
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+unsubscribe@googlegroups.com <mailto:django-users+unsubscrib...@googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ed16b7fa-fba1-db43-04c6-7e8bda6fdeaf%40dewhirst.com.au.
Reply all
Reply to author
Forward
0 new messages