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