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

Fixes and infrastructure support #14

Merged
merged 6 commits into from May 9, 2014
Merged

Fixes and infrastructure support #14

merged 6 commits into from May 9, 2014

Conversation

Hwesta
Copy link
Contributor

@Hwesta Hwesta commented May 8, 2014

Several fixes/updates that are useful to multiple dev branches.

  • custom endpoint decorator, to reduce boilerplate
  • Packages.misc_attributes
  • Package.extract_file can extract the entire package

resource.is_authenticated(request)
resource.throttle_check(request)

# Get object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely like standardizing this.

Hwesta added 6 commits May 8, 2014 11:37
All buttons have class 'btn' on them, so they are styled by bootstrap,
instead of being browser default.  Submit and related 'default' actions
are 'btn-primary' (colored blue).
We have several custom endpoints that implement the same boilerplate
logic.  Add a decorator that implements that, such as checking allowed
methods, authentication, fetching the detail resource, deserializing
the body and providing it to the endpoint as a bundle.
Custom endpoints should use new decorator to reduce boilerplate code
and return useful errors if the requested object doesn't exist.
Extract_file now takes an optional extract path which defaults to a
temp directory, and omitting the relative path extracts the whole
package.
Misc fixes: rename PACKAGE_TYPE_[EXTRACTABLE|DELETABLE] to
PACKAGE_TYPE_CAN_[EXTRACT|DELETE] to make easier to extend with other
categories.  Import locations.forms module, instead of each form
separately, so it is easier to add new forms, similarly for models in
forms.py
Package has JSONField that stores misc attributes than need to be tracked,
but are not common enough to deserve their own fields. Update migration.
@qubot qubot merged commit d9c4f41 into qa/0.x May 9, 2014
@qubot qubot deleted the dev/issue-xxxx-support branch May 9, 2014 17:49
@mistydemeo
Copy link
Contributor

💖

@Hwesta Hwesta modified the milestone: 0.5.0 and earlier Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants