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
fa92d52fa5
Migration for mediafiles main->original
2011-07-17 08:50:09 -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
5ebe69e5a0
First migration: Add markdown bio!
2011-07-14 00:00:24 -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
c47c37ed95
Merge branch 'master' into f411_new_migrations
...
Conflicts:
mediagoblin/db/open.py
2011-07-13 23:14:42 -05:00
Christopher Allan Webber
59051a23f0
Duplicate migration numbers not allowed, bro
2011-07-13 22:32:51 -05:00
Christopher Allan Webber
511b10efda
We should *raise* MissingCurrentMigration :)
...
Thanks for the catch, Elrond.
2011-07-13 20:58:13 -05:00
Caleb Forbes Davis V
cea8f2b632
adds "state" to tags indices
2011-07-13 12:18:50 -05:00
Caleb Forbes Davis V
1580c7c5ce
adds index for searching across all users' tagged images
2011-07-13 00:22:16 -05:00
Christopher Allan Webber
c2ddd85e4a
Removing old style migrations... not in use anymore
2011-07-11 21:09:36 -05:00
Elrond
39c6b2bdc6
Move db_name default into config_spec.ini
...
The default name of the database ("mediagoblin") was coded
in db/open.py and init/celery/__init__.py.
Instead use the new config system to have this as the
default for the "db_name" config option.
2011-07-11 23:25:15 +02:00
Caleb Forbes Davis V
272469daf5
adds index for tag searches by an uploader
2011-07-10 23:36:21 -05:00
Christopher Allan Webber
0c915735d5
Just making a note of where the new migrations will go!
2011-07-10 22:58:48 -05:00
Christopher Allan Webber
f92bea33c7
give option in connect_database_from_config to connect to a pymongo.Connection
2011-07-10 22:44:20 -05:00
Christopher Allan Webber
dab0d24d98
Made it so that it's migrate_new() which installs the migration
...
version if missing, migrations_to_run just throws an error if not set
2011-07-10 22:02:51 -05:00
Aaron Williamson
4c465852d1
Markdown-enable user bio (Feature 410)
2011-07-10 22:28:48 -04:00
Christopher Allan Webber
0143c5a1e4
No reason to have migration_number optional or default to None
2011-07-10 18:48:09 -05:00
Christopher Allan Webber
9cf8b469e7
Move the call to install_migration_version_if_missing() to migrations_to_run()
...
This means there's a serious side effect of calling this, but there's
no way to get useful data here unless if that's set anyway.
2011-07-10 18:43:08 -05:00
Christopher Allan Webber
1b38cfa3b7
install_migration_version_if_missing() now a separate function
...
Also added it to MigrationManager.migrate_new(), because we'll always
need a migration number when migrating.
2011-07-10 18:27:38 -05:00
Christopher Allan Webber
8569533f21
Make sure all these strings in db/util.py are unicode
2011-07-10 16:23:36 -05:00
Christopher Allan Webber
d0ee0003a2
Simpler run_migrations method.
...
Allows for calbacks, should be useful for printing output and catching
things in tests.
Gets rid of the generator stuff which now that I think of it is a
messy idea.
2011-07-10 15:41:18 -05:00
Christopher Allan Webber
32ae9e1b4e
Making sure migration_number > 0 :)
2011-07-09 18:17:54 -05:00
Christopher Allan Webber
ec86d16a53
run_new_migrations() makes more sense
2011-07-09 17:21:47 -05:00
Christopher Allan Webber
7ecb1b0726
Adjusting documentation in indexes.py also re: more info in deprecation
2011-07-09 16:52:57 -05:00
Christopher Allan Webber
50bb8fe5e4
Changing things back so that we keep information about deprecated
...
indexes around.
2011-07-09 16:51:19 -05:00
Christopher Allan Webber
363fc97259
Some instructions in the RegisterMigration docstring on how to use.
2011-07-09 15:10:47 -05:00
Christopher Allan Webber
dca6406a90
latest_migration now returns migration numbers only, and 0 if no migrations.
2011-07-09 15:07:40 -05:00
Christopher Allan Webber
993f0a9321
Migrating quietly, not iteratively, that comment should say!
2011-07-09 14:51:48 -05:00
Christopher Allan Webber
51dcfb5682
New migration utility code.... I haven't tested this! ;)
...
I think it's looking right though.
- Provides MigrationManager which should have plenty of utilities for
doing migrations hopefully correctly :)
- Provides RegisterMigration which should be able to decorate
migrations and register them in doing so
2011-07-09 14:50:41 -05: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
Christopher Allan Webber
a24dbd451c
Note from Chris Webber prefacing Elrond's DB abstraction idea.
2011-07-02 17:05:13 -05:00
Christopher Allan Webber
c0d532f04e
Merge remote branch 'remotes/elrond/idea/db_doc'
2011-07-02 17:01:43 -05:00
Christopher Allan Webber
2110408f44
Merge remote branch 'remotes/jwandborg/feature_362-simple_comments-acts_on_feedback'
...
Conflicts:
mediagoblin/templates/mediagoblin/user_pages/media.html
2011-07-02 14:39:35 -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
Elrond
3f9d93407b
Document the db submodule a bit
...
Document the ideas behind the db submodule.
And document what that actually means.
2011-06-30 23:27:52 +02:00
Christopher Allan Webber
a98104eb39
Comment indexes
2011-06-30 12:51:32 -05: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