Admin dashboard actions
List recent and important items that deserve admin attention.
We do not use the mediadrop.lib.helpers.paginate() decorator because its somewhat incompatible with the way we handle ajax fetching with video_table(). This should be refactored and fixed at a later date.
Return type: | Dict |
---|---|
Returns: |
|
Media Admin Controller
Save action for the AddFileForm.
Creates a new MediaFile from the uploaded file or the local or remote URL.
Parameters: |
|
---|---|
Return type: | JSON dict |
Returns: |
|
Perform bulk operations on media items
Parameters: |
|
---|
Display the media forms for editing or adding.
This page serves as the error_handler for every kind of edit action, if anything goes wrong with them they’ll be redirected here.
Parameters: |
|
---|---|
Returns: |
|
Save action for the EditFileForm.
Changes or deletes a MediaFile.
Parameters: | id (int) – Media ID |
---|---|
Return type: | JSON dict |
Returns: |
|
List media with pagination and filtering.
Parameters: |
|
---|---|
Return type: | dict |
Returns: |
|
Merge in a newly created media item.
Parameters: |
|
---|---|
Returns: | JSON dict |
Save changes or create a new Media instance.
Form handler the edit() action and the MediaForm.
Redirects back to edit() after successful editing and index() after successful deletion.
Save a thumbnail uploaded with ThumbForm.
Parameters: |
|
---|---|
Return type: | JSON dict |
Returns: |
|
Update the publish status for the given media.
Parameters: |
|
---|---|
Return type: | JSON dict |
Returns: |
|
Display the podcast forms for editing or adding.
This page serves as the error_handler for every kind of edit action, if anything goes wrong with them they’ll be redirected here.
Parameters: |
|
---|---|
Returns: |
|
List podcasts with pagination.
Parameters: | page (int) – Page number, defaults to 1. |
---|---|
Return type: | Dict |
Returns: |
|
Save changes or create a new Podcast instance.
Form handler the edit() action and the PodcastForm.
Redirects back to edit() after successful editing and index() after successful deletion.
Save a thumbnail uploaded with ThumbForm.
Parameters: |
|
---|---|
Return type: | JSON dict |
Returns: |
|
Comment Moderation Controller
List comments with pagination and filtering.
Parameters: |
|
---|---|
Return type: | dict |
Returns: |
|
Save an edit from EditCommentForm.
Parameters: | id (int) – Comment ID |
---|---|
Return type: | JSON dict |
Returns: |
|
Approve or delete a comment or comments.
Parameters: |
|
---|---|
Return type: | JSON dict |
Returns: |
|
Admin user actions
Delete a user.
Parameters: | id (int) – User ID. |
---|---|
Returns: | Redirect back to index() after successful delete. |
Display the UserForm for editing or adding.
Parameters: | id (int or "new") – User ID |
---|---|
Return type: | dict |
Returns: |
|
Admin player preference actions
Delete a PlayerPref.
After deleting the PlayerPref, cleans up the players table, ensuring that each Player class is represented–if the deleted PlayerPref is the last example of that Player class, creates a new disabled PlayerPref for that Player class with the default settings.
Parameters: | id (int) – Player ID. |
---|---|
Returns: | Redirect back to index() after successful delete. |
Disable a PlayerPref.
Parameters: | id (int) – Player ID. |
---|---|
Returns: | Redirect back to index() after success. |
Display the PlayerPrefs for editing or adding.
Parameters: | id (int or "new") – PlayerPrefs ID |
---|---|
Return type: | dict |
Returns: |
Enable a PlayerPref.
Parameters: | id (int) – Player ID. |
---|---|
Returns: | Redirect back to index() after success. |
List players.
Return type: | Dict |
---|---|
Returns: |
|
Reorder a PlayerPref.
Parameters: |
|
---|---|
Returns: | Redirect back to index() after success. |
Admin storage engine actions
Delete a StorageEngine.
Parameters: | id (int) – Storage ID. |
---|---|
Returns: | Redirect back to index() after successful delete. |
Disable a StorageEngine.
Parameters: | id (int) – engine ID. |
---|---|
Returns: | Redirect back to index() after success. |
Display the StorageEngine for editing or adding.
Parameters: | id (int or "new") – Storage ID |
---|---|
Return type: | dict |
Returns: |
Enable a StorageEngine.
Parameters: | id (int) – Storage ID. |
---|---|
Returns: | Redirect back to index() after success. |
List storage engines with pagination.
Return type: | Dict |
---|---|
Returns: |
|
Perform bulk operations on media items
Parameters: |
|
---|
Edit a single category.
Parameters: | id – Category ID |
---|---|
Return type: | Dict |
Returns: |
|
Perform bulk operations on media items
Parameters: |
|
---|
Edit a single tag.
Parameters: | id – Tag ID |
---|---|
Return type: | Dict |
Returns: |
|
List tags with pagination.
Parameters: | page (int) – Page number, defaults to 1. |
---|---|
Return type: | Dict |
Returns: |
|
Save changes or create a tag.
See TagForm for POST vars.
Parameters: | id – Tag ID |
---|---|
Return type: | JSON dict |
Returns: |
|
Dumb controller for display and saving basic settings forms.
See mediadrop.lib.base.BaseSettingsController for more details.
Save AdvertisingForm.
Save AnalyticsForm.
Save appearanceForm.
Save CommentsForm.
Save GeneralForm.
Save NotificationsForm.
Save PopularityForm.
Updates the popularity for every media item based on the submitted values.
Save APIForm.
Save SiteMapsForm.
Save UploadForm.