Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest: change autodiscover to search for a different submodule #12

Closed
sheppard opened this issue Jan 23, 2014 · 1 comment
Closed

rest: change autodiscover to search for a different submodule #12

sheppard opened this issue Jan 23, 2014 · 1 comment
Milestone

Comments

@sheppard
Copy link
Member

Currently, wq.db.rest.app.autodiscover() searches for myapp.views (and myapp.serializers) to ensure registration methods are called. The choice of views makes some sense as much of the view logic is handled automatically by the router. However, it makes things a bit messy whenever one needs to actually define custom views. It would probably be best to recommend a separate namespace for registration: myapp.rest, myapp.app, or myapp.routes being some possibilities.

@sheppard sheppard changed the title change autodiscover to search for a different submodule rest: change autodiscover to search for a different submodule Mar 17, 2014
@sheppard sheppard added the rest label Mar 17, 2014
@sheppard
Copy link
Member Author

sheppard commented May 7, 2014

Partially completed in #5 with the inclusion of */rest.py in the autodiscover path. All internal apps now use rest.py to register with the router. The next step is to remove */views.py and */serializers.py from the search path; this will be done in 0.7.

sheppard added a commit to wq/wq that referenced this issue May 7, 2014
sheppard added a commit to powered-by-wq/vera that referenced this issue Oct 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant