aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit
Commit message (Collapse)AuthorAgeFilesLines
* moved change pass to a seperate view and fixed issues 709Rodney Ewing2013-05-203-23/+50
|
* Create redir_obj and use it around.Elrond2013-04-281-6/+4
| | | | | | | | This is a shortcut function to redirect to the main page for an object. Objects currently supported: media entries and collections. And go around and replace various places to use this.
* No lazy_* needed here; Add ReallyLazyProxy.__repr__.Elrond2013-04-251-1/+1
| | | | | | | | | | | | One should use lazy_* only if you have a good reason. This one found by our unit tests! For example add_message adds the message to the session, the session needs to be serialized (with json) and well, LazyProxy is not serializable. To aid in debugging, gave our ReallyLazyProxy a __repr__.
* Fix-bug-667-Use-lazy_pass_to_ugettext-for-forms.Aditi Mittal2013-04-242-2/+2
|
* Use GenerateSlugMixin for collections.Elrond2013-04-061-1/+1
| | | | | Use the new way of generating slugs also for collections. Also drop the dummy_db arg to check_collection_slug_used.
* Use WTForms data field in edit/views.pyHans Lo2013-03-271-16/+16
|
* Use the media id for attachmemt editing.Elrond2013-02-241-2/+2
| | | | And remove some stray white space from the output.
* removed unused import cgi.FieldStorageAndrás Veres-Szentkirályi2013-02-221-1/+0
|
* user.get('moo') -> user.mooSebastian Spaeth2013-01-221-4/+4
| | | | | | | User fields are always existent, so there is no need to .get() them, just use them directly. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' ↵Christopher Allan Webber2013-01-222-36/+44
|\ | | | | | | into mergetest
| * Add a license preference fieldMark Holmquist2013-01-172-36/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | This feature is absolutely necessary. Now a user can simply define their default license and quickly go through a form, as opposed to stopping to click on the select and choosing the same option over and over again. Also added DB migration for the field, so that's working now, too. Rebased by Sebastian and made the default value to be unicode. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Sanitize slug input on media editSebastian Spaeth2013-01-181-7/+6
|/ | | | | | | | | Previously we allowed EVERYTHING, even slashes as slug when editing the media. Make sure we slugify the input to sanitize it. (+ string formdata is unicode, so there is no need to convert it) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Allowing to delete a user account (#302)Sebastian Spaeth2013-01-172-0/+33
| | | | | | | | | | | | | Add a "Delete user account" template and link to it from the user account settings page. Create a delete_account function and fill in most blanks. We can now successfully delete our own account. Thanks to Elrond for catching a stray csrf_exempt in a previous iteration of this patch. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge remote-tracking branch 'refs/remotes/elrond/misc/use_media_id'Christopher Allan Webber2013-01-161-1/+2
|\
| * Start to use the media_id in "admin" URLs.Elrond2013-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | We have a bunch of URLs that are more for internal use. At least they're definitely not intended to be posted somewhere for long term useage. When those things affect a media, it's much better to reference the media by its id. This can't change, ever. This is better for races. Like someone posting a comment while the owner corrects a typo in the slug.
* | Simplify check_media_slug_usedSebastian Spaeth2013-01-151-2/+2
|/ | | | | | | Remove the unused dummy_db argument and generally make the function readable. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Enable /u/USERNAME/edit/ pattern #588Sebastian Spaeth2013-01-092-10/+20
| | | | | | | | Transition from the inconsistent /edit/profile/?username=FOO to the nicer /u/FOO/edit/. The old pattern will still work and redirects to the new URL. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move things from routing.py to tools/routing.pyElrond2012-12-231-1/+1
| | | | | | | This stops a cyclic import. Move add_route, mount and endpoint_to_controller into tools/routing.py and change all callers.
* Convert return HttpException to raise HttpExceptionSebastian Spaeth2012-12-231-2/+2
| | | | | | controllers (view function) raise HttpException's and do not return them. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* webob.HTTPFound --> MG.tools.redirectSebastian Spaeth2012-12-211-5/+4
| | | | | | Transition away from webob. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Transition webob.HttpForbidden to webob's exceptions ForbiddenSebastian Spaeth2012-12-211-2/+3
| | | | Also the BadRequest exception.
* Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | | We were refering to model._id in most of the code base as this is what Mongo uses. However, each use of _id required a) fixup of queries: e.g. what we did in our find() and find_one() functions moving all '_id' to 'id'. It also required using AliasFields to make the ._id attribute available. This all means lots of superfluous fixing and transitioning in a SQL world. It will also not work in the long run. Much newer code already refers to the objects by model.id (e.g. in the oauth plugin), which will break with Mongo. So let's be honest, rip out the _id mongoism and live with .id as the one canonical way to address objects. This commit modifies all users and providers of model._id to use model.id instead. This patch works with or without Mongo removed first, but will break Mongo usage (even more than before) I have not bothered to fixup db.mongo.* and db.sql.convert (which converts from Mongo to SQL) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fix translations around.Elrond2012-12-031-1/+1
| | | | | | | This includes: - Mark more strings for translation - Don't mark html-only nonsense for translation - Mark a better part for translation.
* Merge remote-tracking branch ↵Christopher Allan Webber2012-11-131-2/+1
|\ | | | | | | 'refs/remotes/spaetz/trac_475_email_notification_checkbox'
| * Don't put checkbox text on separate line (#475)LotusEcho2012-11-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually render the "notify me" checkbox line in the account settings to not put the form label as a heading but in the same line as the checkbox. Edit forms.py to use the label attribute for the caption. Original patch modified by Sebastian Spaeth to 1) not translate the checkbox label in the template, it is translated in forms.py already. 2) Simplify the HTML, manually constructing the <label> tag is not necessary, WTforms does it automatically. Author: LotusEcho <Emma.C.Echo@gmail.com> Modified-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Fixed attachmentsJoar Wandborg2012-10-231-12/+11
| |
* | Switched most stuff over from RoutesJoar Wandborg2012-10-141-9/+5
| | | | | | | | | | | | | | | | | | | | Removed the Routes routing functionality and replaced it with werkzeug.routes. Most views are functional. Known issues: - Translation integration with the request object is not yet figured out. This breaks 404 pages.
* | Replaced all request.POST with request.form, ...Joar Wandborg2012-09-291-30/+30
| | | | | | | | | | - Fixed error handling in OAuth plugin - Changed request.POST file fields to request.files
* | Too much was marked for translation this gettext message.Christopher Allan Webber2012-09-241-1/+3
|/ | | | Thanks for catching AVRS!
* Removed unnecessary reference to may_edit_collection in edit views.pyAaron Williamson2012-09-181-1/+1
|
* Added basic collection functionalityAaron Williamson2012-09-183-4/+76
|
* Edit comment-notification textJef van Schendel2012-07-201-2/+2
|
* Added some security checks to attachment upload, it's still notJoar Wandborg2012-06-241-2/+29
| | | | waterproof.
* Merge remote-tracking branch ↵Joar Wandborg2012-06-102-33/+45
|\ | | | | | | | | | | | | 'is_derek/bug405_email_notifications_for_comments' into notifications-merge Conflicts: mediagoblin/db/mongo/migrations.py
| * Updates to send email comments, included translation, better validation.Derek Moore2012-03-252-43/+39
| |
| * These are changes for issue #405, add email comment notification.Derek Moore2012-03-152-19/+34
| |
* | Fix problems from pyflakes outputWill Kahn-Greene2012-06-031-7/+1
| |
* | use _ function on some now untranslatable stringsJakob Kramer2012-04-191-1/+1
|/
* Changed from key-notation to dot-notation in edit_profileJoar Wandborg2012-03-081-1/+1
|
* Generic check_media_slug_used db utility.Elrond2012-03-051-5/+4
| | | | | | | | In two cases (generating a new slug and editing the slug) it is nice to know in advance (before the db gets angry) that the slug is used/free. So created a db utility function to check for this on mongo and sql: check_media_slug_used()
* Attachment support in the SQL backendElrond2012-02-281-1/+1
| | | | | | | | | attachments working with the sql backend. - SQL Schema for attachment files, ordering attachments by their name, not by the submission order (as earlier). - Dot-Notation for attachments, where missing. - convert existing attachments over from mongo -> sql
* Drop pre-rendered html: MediaEntry.description_htmlElrond2012-02-181-4/+1
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaEntry.description_html part.
* Drop pre-rendered html: User.bio_htmlElrond2012-02-181-2/+0
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the User.bio_html part.
* It's 2012 all up in hereChristopher Allan Webber2012-02-025-5/+5
|
* Nearly complete support for TagsElrond2012-01-281-1/+1
| | | | | | | | | | | These changes allow all of the rest of the code to use tags in sql as they were used on mongo. It's not efficient at all, as changing tags usually means to remove all old tags and adding all new. The only problem here is: Old slugs for tags are not removed, because they're shared across all MediaTags and dropping orphans is not always easy.
* Oops, I broke teh all rights reserved ;)Christopher Allan Webber2012-01-211-1/+1
|
* License "all rights reserved" default should be None/NULL, not empty stringChristopher Allan Webber2012-01-211-1/+1
|
* Fix unit tests with new license supportElrond2012-01-212-3/+2
| | | | | Make the license field in the forms optional and let them properly be defaulted to "".
* Minor formatting and syntax fix.Aaron Williamson2012-01-181-1/+2
|
* Fixed a syntax error in edit/views and added back in some missing license ↵Aaron Williamson2012-01-171-2/+2
| | | | stuff from models