363 Commits

Author SHA1 Message Date
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