[Chicago] Structuring a large Django API

Adam "Cezar" Jenkins emperorcezar at gmail.com
Thu May 1 18:18:32 CEST 2014


This is also on Stackoverflow:
http://stackoverflow.com/questions/23411571/structuring-a-large-api-in-a-django-project

Right now I have a large project with an equally large API (done using
django rest framework). The current structure is something like this:

api
|-----urls.py
|-----models.py
|
----v1
    |-----views.py
    |-----serializers.py
    |-----permissions.py
    |-----tests.py

etc

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.

Does anyone have any experience with this and could provide guidance?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20140501/b1e08774/attachment.html>


More information about the Chicago mailing list