337 Commits

Author SHA1 Message Date
Christopher Allan Webber
2527754202 Documenging index utils and adjusting how remove_deprecated_indexes gets arguments
More specifically, we now just take a dictionary of lists, like:
   {'collection': ['index_identifier1', 'index_identifier2']}

Previously we took something with more info like in add_new_indexes,
but that extra info isn't really necessary.
2011-06-27 20:48:35 -05:00
Christopher Allan Webber
1f7749995d Documentation updates to indexes.py's docstring
Includes information on how to deprecate indexes.
2011-06-27 20:40:31 -05: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
Christopher Allan Webber
0f3167c9f0 Tools to add / remove indexes from collections 2011-06-27 16:56:12 -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
Christopher Allan Webber
ca5d2c51b6 Store the collection information in the ACTIVE_INDEXES keys 2011-06-26 21:51:38 -05:00
Christopher Allan Webber
3cd6ea5b17 A base set of indexes for us to use with our new indexing tool. 2011-06-26 21:10:16 -05:00
Christopher Allan Webber
cf383901a9 Merge remote branch 'remotes/elrond/idea/invalidid' 2011-06-22 09:52:13 -05:00
Christopher Allan Webber
3208bea54c Merge remote branch 'refs/remotes/gullydwarf-cfdv/is315' 2011-06-21 23:22:16 -05: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
Christopher Allan Webber
a2c37d0a78 Only migrate to description_html if description also exists. 2011-06-20 21:02:46 -05:00
cfdv
17bb7c388b removes unecessary dependence on existence of username for User migration01, + fix whitespace issues 2011-06-20 19:28:02 -05:00
cfdv
e36ecab093 adds accommmodations for migration of fields in User: bio and url 2011-06-20 13:07:15 -05:00
cfdv
78c0744077 Merge remote-tracking branch 'origin/master' into is315 2011-06-20 12:50:44 -05:00
Christopher Allan Webber
a01d04a017 Provide a migration to add description_html to MediaEntries that don't have it 2011-06-19 20:42:48 -05:00
Elrond
3efdd97c2e Move InvalidId to db.util
Instead of import InvalidId from the low level bson module,
first import it in our db.util wrapper and second import it
from pymongo.errors.
2011-06-20 00:09:40 +02: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
Christopher Allan Webber
b1ae76aea0 Add an index on MediaEntries making sure slugs + uploader combos are unique 2011-05-30 18:06:12 -05:00
Jakob Kramer
db5912e358 remove all 'username_repr' stuff 2011-05-29 19:49:25 +02:00
Jakob Kramer
ce72a1bb15 this should fix #354 2011-05-29 19:15:46 +02:00
Christopher Allan Webber
16509be160 Update all the views so that they use the uploader reference instead
of uploader embedding
2011-05-22 16:06:45 -05:00
Christopher Allan Webber
757f37a52d User migration works (but the rest of the system isn't updated for new user setup yet) 2011-05-22 10:52:53 -05:00
Christopher Allan Webber
6926b23d43 Added a url_for_self method for generating mediaentry links
This allows for optionally making the url based off of slugs or ids
2011-05-20 18:16:10 -05:00
Elrond
a67fec8177 Factor out most of the database connection into db/open.py
I needed to split the db connection/opening into open.py,
due to an import loop:
- util.py needs db/util.py:ObjectId
- db/util.py would need db/models.py
- db/models.py needs util.py:slugify
2011-05-19 01:35:02 +02:00
Christopher Allan Webber
3262ad1dbb Renaming connect_database to connect_database_from_config and using in from_celery 2011-05-18 08:44:57 -05:00
Christopher Allan Webber
468bc8afce Need to import asint for users who specify ports via config file 2011-05-18 08:39:09 -05:00
Christopher Allan Webber
1815f5ce2e Adding copyright headers and explaining why these unused imports are here 2011-05-18 08:37:48 -05:00
Elrond
254bc43174 Move ObjectId, DESCENDING to db.util
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.
2011-05-18 11:32:29 +02:00
Elrond
a4bae8700e Move "connect to database" into db/util.py 2011-05-18 01:03:40 +02:00
Elrond
0f18ed8f5e Move models into new db/ directory
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.
2011-05-18 00:44:10 +02:00