RE: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Mike Dewhirst
I like the following method because it lets me start a project with a single file of views per app and then later when it grows, split it into named files in a 'views' directory - without needing to adjust other code which imports them.1. Create a views directory in the app dir2. Create

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Asim Sulehria
You are welcome On Mon, Sep 18, 2023 at 6:00 PM 'Simon Connah' via Django users < django-users@googlegroups.com> wrote: > Thank you! That got it working! > > --- Original Message --- > On Monday, September 18th, 2023 at 13:34, Asim Sulehria < > de.asimha...@gmail.com> wrote: > > You can

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread 'Simon Connah' via Django users
Thank you! That got it working! --- Original Message --- On Monday, September 18th, 2023 at 13:34, Asim Sulehria wrote: > You can just directly declare an array of URL Patterns in a separate file and > then import that file in the url files you want to make the main urls file > >

Re: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Asim Sulehria
You can just directly declare an array of URL Patterns in a separate file and then import that file in the url files you want to make the main urls file On Mon, Sep 18, 2023 at 5:28 PM 'Simon Connah' via Django users < django-users@googlegroups.com> wrote: > Hi, > > I have an app which has a lot