57 Commits

Author SHA1 Message Date
Elrond
7cbddc96a8 Enable mongokit's "Dot notation"
mongokit documents can allow to use x.FIELD instead of
x["FIELD"].
First it looks a lot more pythonic.
Second it might allow us an easier migration path towards
an sqlalchemy database backend.

Docs: http://namlook.github.com/mongokit/tutorial.html#dot-notation
2011-11-15 11:32:13 +01:00
Christopher Allan Webber
ee91c2b88d Merge remote-tracking branch 'remotes/nyergler/pep8-ification'
Conflicts:
	mediagoblin/db/migrations.py
	mediagoblin/db/models.py
	mediagoblin/user_pages/views.py
	mediagoblin/util.py
2011-11-13 20:23:26 -06:00
Nathan Yergler
243c3843bd Whitespace and formatting cleanup.
* Removed trailing whitespace
* Line length < 80 where possible
* Honor conventions on number of blank lines
* Honor conventions about spaces around :, =
2011-10-01 15:10:02 -07:00
Aaron Williamson
152a3bfaa3 Finished splitting util.py into separate files. 2011-10-01 18:05:44 -04:00
Aaron Williamson
ae3bc7fabf Moved common, translation, template, and url code out of util.py and into tools/[file].py 2011-10-01 09:31:42 -04:00
Christopher Allan Webber
f373599bd7 Merge branch 'gullydwarf-cfdv-f357_lost_password_functionality'
Conflicts:
	mediagoblin/auth/routing.py
2011-09-08 08:12:43 -05:00
Will Kahn-Greene
12a100e4d8 508. Updates copyright/license information 2011-09-01 20:50:19 -04:00
Caleb Forbes Davis V
6503073508 oops, uses Alejandro's fp_verification_key. my bad. 2011-08-28 21:13:07 -05:00
Alejandro Villanueva
25ba955e20 Adding fotgot password functionality 2011-08-28 20:08:14 -05:00
Christopher Allan Webber
6ee9c71902 Method to get the failure exception object for a MediaEntry, if appropriate. 2011-08-14 07:55:08 -05:00
Christopher Allan Webber
6c50c21068 Add fail_error and fail_metadata fields to MediaEntry and relevant migration 2011-08-13 07:48:34 -05:00
Christopher Allan Webber
ba4858c5b4 Merge branch 'master' into processing
Conflicts:
	mediagoblin/db/migrations.py
2011-08-11 22:54:11 -05:00
Christopher Allan Webber
852d5bb238 Merge branch 'master' into processing 2011-08-10 19:53:37 -05:00
Caleb Forbes Davis V
84abd2bbc4 Bug #372 - MediaEntry.thumbnail_file not used
- deleted the thumbnail_file from the media_entries collection
- added a migration to remove the field from previous db versions
2011-08-10 12:48:23 -05:00
Christopher Allan Webber
3cdf366acf Merge branch 'remotes/gullydwarf-cfdv/f360_tagging' (early part) into mergetags
Conflicts:
	mediagoblin/config_spec.ini
	mediagoblin/edit/views.py
	mediagoblin/util.py
2011-07-30 13:09:01 -05:00
Caleb Forbes Davis V
0712a06dc6 changes tags to a list of dicts in the db, adding tag slugs
- adds a function to convert the tag list of dicts to a text string
  properly delimited for loading into forms
- tag string conversion function updated to generate list of dicts
- updates all mentions of the conversion of the string to the tags db
  object
- adds a tags template utility and updates the media template accordingly
2011-07-27 14:51:57 -05:00
Christopher Allan Webber
6b9ee0ca13 Store the task id of a processing action in the database. 2011-07-24 23:12:46 -05:00
Christopher Allan Webber
e83dc091cc docstring for MediaComment's structure 2011-07-17 17:06:06 -05:00
Christopher Allan Webber
080a81ec48 Described the MediaEntry structure in the docstring. 2011-07-17 16:51:36 -05:00
Christopher Allan Webber
16bcd1e714 Docstring for the User model's various schema fields 2011-07-17 15:49:49 -05:00
Christopher Allan Webber
5f72a4c331 Merge remote branch 'remotes/jwandborg/feature_400-resize_images_to_fit_page'
Conflicts:
	mediagoblin/db/migrations.py
	mediagoblin/db/models.py
	mediagoblin/process_media/__init__.py
	mediagoblin/templates/mediagoblin/user_pages/media.html
	mediagoblin/util.py
2011-07-16 16:28:12 -05:00
Christopher Allan Webber
fb5075e6b2 Merge remote branch 'remotes/aaronw/feature410_markdown_bio' 2011-07-13 23:19:46 -05:00
Christopher Allan Webber
c2ddd85e4a Removing old style migrations... not in use anymore 2011-07-11 21:09:36 -05:00
Aaron Williamson
4c465852d1 Markdown-enable user bio (Feature 410) 2011-07-10 22:28:48 -04:00
Christopher Allan Webber
e6fd112d42 This should actually fix the next and previous buttons now. Sorry I borked the merge! 2011-07-07 08:22:12 -05:00
Christopher Allan Webber
b27ec16786 Merge remote branch 'remotes/gullydwarf-cfdv/f423_match_image_ordering_between_scroll_and_gallery'
Conflicts:
	mediagoblin/db/models.py
2011-07-06 22:47:33 -05:00
Christopher Allan Webber
d22a9ae86d Merge remote branch 'remotes/gullydwarf-cfdv/f435_limit_prev_next_by_processed' 2011-07-06 22:34:33 -05:00
Caleb Forbes Davis V
b1db2c2e74 slug-style urls in previous and next urls look much better
Bug #434 - identifies media by slug instead of _id in prev/next
2011-07-05 21:40:00 -05:00
Caleb Forbes Davis V
ce2ac48826 f#435 - avoids linking to unprocessed media in prev and next 2011-07-05 21:33:02 -05:00
Caleb Forbes Davis V
77b958018b Feature #423 - gallery and scroll image ordering match 2011-07-04 20:24:57 -05:00
Joar Wandborg
380ac094f6 Removed debug code, erroneously included in my last commit 2011-07-03 06:37:40 +02:00
Joar Wandborg
2c9e635ae2 Feature #400 - Resize images to fit on page - Additions
*   `migrations.py`
    *   Removed empty line
    *   Added empty line
*   `models.py`
    *   Added `MediaEntry.get_display_media()` helper function
*   `process_media.__init__.py`
    *	Updated `process_media_initial()`
    	*   Renamed `main` => `original`.
	*   Added condition to `medium`, it's only created if the original
	    dimensions exceed the MEDIUM_SIZE dimensions.
*   `media.html`
    *	The image tag is now populated by `MediaEntry.get_display_media()`
*   `util.py`
    *	Added `DISPLAY_IMAGE_FETCHING_ORDER`, used by `MediaEntry.get_display_media()`
2011-07-03 05:46:00 +02:00
Christopher Allan Webber
230e1bd770 Merge remote branch 'remotes/gullydwarf-cfdv/f401_prev_next_media_nav'
Conflicts:
	mediagoblin/db/models.py
	mediagoblin/templates/mediagoblin/user_pages/media.html
2011-07-02 21:16:39 -05:00
Caleb Forbes Davis V
9c0fe63fad adds previous and next links in the sidebar
Feature #401 - previous/next navigation on media pages
* media.html includes a new prev_next.html template containing the links
* prev_next.html calls functions added to the media model to retrieve
  the appropriate objects from the database, formatted with urlgen
* a small change to util.py brings ASCENDING into the mix
2011-07-02 06:15:58 -05:00
Joar Wandborg
6f59a3a324 Issue #362 - Simple comments - Changes based on feedback recieved from #mediagoblin
*   `db.models` - Removed `MediaEntry.get_comments()` and replaced it with a helper
    which just returns a cursor for the comments query
*   `media.html` - Added `{% set comment_author = comment.author() %}`
*   `user_pages.views` - media_home() now passes `MediaEntry.get_comments()`
    directly to `Pagination`, handles pagination for comments.
    *   Added `MEDIA_COMMENTS_PER_PAGE` to define the number of comments per page
        in the `media_home()` view.
2011-07-01 15:26:29 +02:00
Christopher Allan Webber
216cd9c85c Merge remote branch 'remotes/jwandborg/feature_362-simple_comments' 2011-06-29 20:27:48 -05:00
Joar Wandborg
47f524f67d Merge branch 'feature_362-simple_comments' 2011-06-29 16:12:33 +02:00
Joar Wandborg
7bd8197f32 Issue #362 - Updated the MediaComment model
*   `MediaComment.get_comments()` now uses pagination
*   `MediaComment.get_comments()` now sorts by `created` DESC
*   `MediaComment.media_entry` is now **required**
*   `MediaComment.media_entry()` now returns parent `MediaEntry`
2011-06-29 01:16:51 +02:00
Christopher Allan Webber
b1db6f20dd Adding our current indexes and removing the index that was in models.py 2011-06-27 16:56:41 -05:00
Joar Wandborg
c11f21ab3c Issue 362 - Add simple comments
*   Added MediaComment database model
    Holds `media_entry` (`ObjectId`), `author` (`ObjectId`), `created`, `content` and `content_html`.
2011-06-27 23:39:40 +02:00
cfdv
0472653ee4 assigns migration steps to User database objects
adds the migration_handler to the User db class, connecting the
migration steps in ../db/migrations.py to the migration code in
gmg_commands
2011-06-20 22:48:25 -05:00
cfdv
78c0744077 Merge remote-tracking branch 'origin/master' into is315 2011-06-20 12:50:44 -05:00
cfdv
630b57a366 baby step towards enabling profile edits
adds
* url and bio fields to database
* form for editing the user profile
* route to the edit profile controller
* view for the profile editing page
* template for the profile editing page
* link to edit profile in the welcome page

still needs
* thorough inspection to see if it makes sense
* tests
* ?
2011-06-18 16:42:22 -05:00
cfdv
279d925e75 adds user bio and website url fields to the database 2011-06-18 15:00:05 -05:00
Joar Wandborg
9e883ed3b2 Merge branch 'master' of http://git.gitorious.org/mediagoblin/mediagoblin 2011-06-15 22:18:24 +02:00
Christopher Allan Webber
6e7ce8d1af mediagoblin.globals->mediagoblin.mg_globals 2011-06-12 17:27:37 -05:00
Joar Wandborg
44e2da2fe6 Added Markdown rendering for media_entry 2011-06-12 03:24:31 +02:00
Christopher Allan Webber
a77d952aa6 No need for a method for generating the verification key as a method
on the class, can just do that in the view
2011-06-02 09:02:13 -05:00
Christopher Allan Webber
d9951a6e03 Merge remote branch 'remotes/aleks/aleks' 2011-05-31 19:17:28 -05:00
Aleksandar Micovic
b93a6a229e Added the ability to regenerate a verification key. 2011-05-31 17:14:23 -04:00