On Thursday, May 1, 2014 8:59:25 AM UTC-7, Cezar Jenkins wrote:
>
>
> As you can guess, the views.py file is pretty big and I want to refactor 
> this out. Currently I have a few options in front of me, the one I'm 
> leaning towards is to put an 'api/v1' package into each app and use the api 
> app to tie all the urls together and hold views that don't fall into an app.
>
>
>
Hmm, I think the convention is to keep api code with each of your apps, so 
there shouldn't be a danger of anything getting too big / unwieldy:

apps
-- app1
----models.py
----views.py
----apiviews.py
----serializers.py
-- app2
----models.py
----views.py
----apiviews.py
----serializers.py

etc. import statements throughout the project are nice and readable. Works 
well for our (very large) project anyway.

./s

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eeeb2695-db81-42f6-9594-1d83d86641df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to