You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
sheppard
changed the title
change autodiscover to search for a different submodule
rest: change autodiscover to search for a different submodule
Mar 17, 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.
Currently,
wq.db.rest.app.autodiscover()
searches formyapp.views
(andmyapp.serializers
) to ensure registration methods are called. The choice ofviews
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
, ormyapp.routes
being some possibilities.The text was updated successfully, but these errors were encountered: