aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/views.py
Commit message (Collapse)AuthorAgeFilesLines
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-1/+1
|
* Use request.db to do a query to support a global-free view :)Christopher Allan Webber2014-12-031-1/+1
|
* Have the hook handle happen in the root_view proxy view itselfChristopher Allan Webber2014-01-141-2/+10
| | | | | | This way it isn't set in stone at a module level, especially if this gets imported before the whole application inits, or if run during tests and possibly imported multiple times.
* This is a very minor change that makes it possible for plugins to provide antilly-Q2014-01-101-1/+4
| | | | alternative to the default root_view.
* Make showing the Terms of Service a user option, and move it to the footer.Christopher Allan Webber2013-10-111-1/+4
| | | | This commit sponsored by Gjalt-Jorn Peters. Thank you!
* This should be my final code update before I am ready for review! Basically, intilly-Q2013-09-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this update I finished the search/sort function on the Reports Panel. I also finished the Terms of Service and made the decision to remove the meta portion of the site I had planned to create. I decided that the features involved were just unnecessary at this point. I also dropped the User status column and added a migration to establish default privileges (and create the privilege foundat- -ions. I fixed a few small errors that were left over as well, in the implemen- tation and in the tests. Next, I just need to await code review and work on the documentation for these new features. I also need to supervise a new merge to master. =============================================================================== Dropped the vestigial 'status' column =============================================================================== --\ mediagoblin/db/migrations.py --\ mediagoblin/db/models.py --| Also added in comments describing the current situation with the `is_admin` | and `email_verified` columns, where they are 100% vestigial but cannot be | dropped. =============================================================================== Wrote necessary migrations to set up Privilege foundations and give users the necessary privileges on an older implementation of mediagoblin that is migrating into this update =============================================================================== --\ mediagoblin/db/migrations.py =============================================================================== Deleted the meta pages =============================================================================== --\ Deleted mediagoblin/meta/__init__.py --\ Deleted mediagoblin/meta/routing.py --\ Deleted mediagoblin/meta/views.py --\ Deleted mediagoblin/templates/mediagoblin/meta/code_of_conduct.html --\ Deleted mediagoblin/templates/mediagoblin/meta/reports_details.html --\ Deleted mediagoblin/templates/mediagoblin/meta/reports_panel.html ---------------------------------------------------------------- Moved the terms of service to /terms_of_service ---------------------------------------------------------------- --\ Moved mediagoblin/templates/mediagoblin/meta/terms_of_service.html -> mediagoblin/templates/mediagoblin/terms_of_service.html --| I decided that terms of service were really the only necessary part of my | planned "meta" pages, so I moved it instead to its own singular page --\ mediagoblin/routing.py --\ mediagoblin/static/css/base.css --\ mediagoblin/templates/mediagoblin/base.html --\ mediagoblin/views.py =============================================================================== Simplified & Finished the Reports Panel Searching =============================================================================== --\ mediagoblin/moderation/forms.py --\ mediagoblin/moderation/tools.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/moderation/user.html =============================================================================== Fixed Small Errors =============================================================================== --\ mediagoblin/templates/mediagoblin/user_pages/user.html --\ mediagoblin/tests/test_moderation.py --\ mediagoblin/tests/tools.py ===============================================================================
* Whew. This is a big update. I did some significant keeping work. I moved all oftilly-Q2013-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the folders and enpoints labeled 'admin' to the more accurate term of 'moderat- ion.' I also created the ability for admins and moderators to add or remove pr- ivileges or to ban a user in response to a report. This also meant implementing the UserBan class in various places. I also had to add a column called result to the ReportBase table. This allows the moderator/admin to leave comments when they respond to a report, allowing for archiving of what responses they do/n't take. --\ mediagoblin/db/migrations.py --| Added result column to ReportBase --\ mediagoblin/db/models.py --| Added result column to ReportBase --| Added documentation to tables I had made previously --\ mediagoblin/decorators.py --| Editted the user_has_privilege decorator to check whether a user has been | banned or not --| Created a seperate user_not_banned decorator to prevent banned users from | accessing any pages --| Changed require_admin_login into require_admin_or_moderator login --\ mediagoblin/gmg_commands/users.py --| Made the gmg command `adduser` create a user w/ the appropriate privileges --\ mediagoblin/moderation/routing.py << formerly mediagoblin/admin/routing.py --| Renamed all of the routes from admin -> moderation --\ mediagoblin/routing.py --| Renamed all of the routes from admin -> moderation --\ mediagoblin/moderation/views.py << formerly mediagoblin/admin/views.py --| Renamed all of the routes & functions from admin -> moderation --| Expanded greatly on the moderation_reports_detail view and functionality --| Added in the give_or_take_away_privilege form, however this might be a use- | -less function which I could remove (because privilege changes should happe- | n in response to a report so they can be archived and visible) --\ mediagoblin/static/css/base.css --| Added in a style for the reports_detail page --\ mediagoblin/templates/mediagoblin/base.html --| Renamed all of the routes from admin -> moderation --\ mediagoblin/templates/mediagoblin/moderation/report.html --| Added form to allow moderators and admins to respond to reports. --\ mediagoblin/templates/mediagoblin/moderation/reports_panel.html --| Fixed the table for closed reports --\ mediagoblin/templates/mediagoblin/moderation/user.html --| Added in a table w/ all of the user's privileges and the option to add or | remove them. Again, this is probably vestigial --| Renamed all of the routes from admin -> moderation --\ mediagoblin/templates/mediagoblin/moderation/user_panel.html --| Renamed all of the routes from admin -> moderation --\ mediagoblin/tools/response.py --| Added function render_user_banned, this is the view function for the redir- | -ect that happens when a user tries to access the site whilst banned --\ mediagoblin/user_pages/forms.py --| Added important translate function where I had text --\ mediagoblin/user_pages/lib.py --| Renamed functiion for clarity --\ mediagoblin/user_pages/views.py --| Added the user_not_banned decorator to every view --\ mediagoblin/views.py --| Added the user_not_banned decorator --\ mediagoblin/moderation/forms.py --| Created this new file --\ mediagoblin/templates/mediagoblin/banned.html --| Created this new file --| This is the page which people are redirected to when they access the site | while banned
* Move db.sql.models* to db.models*Sebastian Spaeth2013-01-071-1/+1
|
* Remove mediagoblin.db.sql.fake.DESCENDINGSebastian Spaeth2013-01-071-3/+3
| | | | | | | | This is the last remnant that requires us to keep db.sql.fake.py. Use ModelName.desc() or sqlalchemy.sql.expression.desc(column) to achieve descending sorts. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* It's 2012 all up in hereChristopher Allan Webber2012-02-021-1/+1
|
* Bug 681 - Comments from reviewing the new video mergeJoar Wandborg2011-12-061-5/+1
| | | | | | | | | | | | in mediagoblin.media_types and submodules - Moved VideoThumbnailer.errors initialization to VideoThumbnailer.__init__ - Cleaned up the image.processing imports - Removed default ``None`` from get_media_manager(_media_type) in mediagoblin.views - Removed media_types import - Removed sys import, and passing of sys to root.html template
* Merge branch 'video_gstreamer-only'Joar Wandborg2011-11-211-2/+6
|\ | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py mediagoblin/submit/views.py
| * Multimedia refractoring, and added video thumbnail supportJoar Wandborg2011-10-051-2/+6
| |
* | Merge remote-tracking branch 'remotes/nyergler/pep8-ification'Christopher Allan Webber2011-11-131-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py mediagoblin/db/models.py mediagoblin/user_pages/views.py mediagoblin/util.py
| * | Whitespace and formatting cleanup.Nathan Yergler2011-10-011-0/+1
| |/ | | | | | | | | | | | | * Removed trailing whitespace * Line length < 80 where possible * Honor conventions on number of blank lines * Honor conventions about spaces around :, =
* / Finished splitting util.py into separate files.Aaron Williamson2011-10-011-1/+2
|/
* 508. Updates copyright/license informationWill Kahn-Greene2011-09-011-1/+1
|
* Make index page paginatedChristopher Allan Webber2011-08-011-5/+11
|
* Updated spacings in code for better readabilityRasmus Larsson2011-07-091-1/+1
|
* Added configuration variable to toggle registrations, if disabled the ↵Rasmus Larsson2011-07-091-1/+3
| | | | registration page redirects to index and no link to register is shown
* Made a simple template rendering view and switched a bunch of code over to ↵Christopher Allan Webber2011-06-051-2/+11
| | | | using it
* I have a strong preference for aligning all parameters in a function call.Christopher Allan Webber2011-06-051-1/+2
|
* Reformat render_to_response callsElrond2011-06-051-3/+3
| | | | | Just a simple indentation and ordering change, no functional change.
* Create render_to_reponse and use it everywhere.Elrond2011-06-051-6/+3
| | | | Just a shortcut for Response(render_template(...))
* Moving all views over to using util.render_template()!Christopher Allan Webber2011-06-041-5/+5
|
* Clean unused imports (found by pyflakes).Elrond2011-05-181-7/+2
|
* Move ObjectId, DESCENDING to db.utilElrond2011-05-181-2/+1
| | | | | | We used to import those from pymongo and mongokit directly. We should import them from a single place. So let's try db.util for this.
* Move models into new db/ directoryElrond2011-05-181-1/+1
| | | | | | | | The database is a central point of interest/discussion. Represent that by its own directory. This will surely become more interesting when we have migrations for example.
* Show images in reverse submit orderSebastian Spaeth2011-05-161-1/+2
| | | | | | | Fixes bug #327. Just do a .sort('created', DESCENDING) on Media when showing them to show the latest first. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Generate unique slugs for newly submitted images.Aaron Williamson2011-05-131-0/+1
|
* Removing this horrifying submission test stuff from way back whenChristopher Allan Webber2011-05-101-45/+0
|
* Implement simple media detail pageSebastian Spaeth2011-05-101-2/+2
| | | | | | | | | | | | | | | | | This patch creates a "homepage" for each media. The URL is /u/<username>/m/<objID>. On it we display the media and some details. It is ugly and lacking some stuff but it works. The only thing left to do is to throw an 404 error if the <username> and the media uploader don't correspond. - Also create a user "home page" while at it. It is merely a place holder for now though. - Link from the entries on the homepage, to the media pages, so we actually find them. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Actually display submitted stuff on the mainpage. Crappy, but working!Christopher Allan Webber2011-05-061-1/+5
|
* Adds initial root pageWill Kahn-Greene2011-04-301-1/+5
| | | | | This adds an initial root page that's ugly as sin, but makes it easier to test what exists so far (e.g. register, login, submit pictures).
* Changes Mediagoblin -> MediaGoblin.Will Kahn-Greene2011-04-131-1/+1
|
* Where did this o come from.Christopher Allan Webber2011-04-021-1/+1
|
* Added copyright noticesMatt Lee2011-03-271-0/+16
|
* A testing submit view that doesn't work but is getting closer to working.Christopher Allan Webber2011-03-271-4/+16
|
* Still totally useless but at least it writes to the databaseChristopher Allan Webber2010-07-181-1/+7
|
* Starting with the test submit view using wtformsChristopher Allan Webber2010-07-181-0/+32
|
* Initial mediagoblin structureChristopher Allan Webber2010-07-171-0/+4