-
Notifications
You must be signed in to change notification settings - Fork 1
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
Parse all useful information from dataporten #14
Comments
Should use a json dump for test driving |
Use proxy model? Probably not, as we would want access to EDIT: Actually both, see below! |
Solution: Here is how to replace the class type of request.user with the proxy class: stack overflow. This is the way to go! The monkey patch needs to be applied before the view is called, i.e. before |
So the middleware uses a proxy model which expands |
This api will often be used in order to retrieve a set of course codes of particular interest. Such a course code will then be used like this: |
If a large chunk of the dataporten groups data ends up only being used in templates, rather than in view logic, it might be worth considering pulling this logic into a custom context processor. |
Should create a class which receives the JSON from the groups API, and delegates the respective groups to their respective parsers. For instance |
Should be easy to add an extra predicate to |
A
It should be initialized with a |
Maybe look at Django REST framework to parse the JSON objects. A lot of built-in functionality, maybe overkill tho. |
Spring/year implementation is interesting: https://stackoverflow.com/questions/7727801/how-to-define-range-of-months-for-any-year-on-django-model . |
For caching we can use: |
Now we are only missing:
And then we are done! |
Parents should also be linked by the GroupManager. |
API:
from dataporten.groups import active_courses
The text was updated successfully, but these errors were encountered: