Mercurial > agora
annotate manage.py @ 209:4033ebe1867f
Add ability to download files
This makes use of a new model (BundleVersion) to keep track of the
locations on disk of the original uploads for each version. This will
require some manual processing to get it working for existing bundles,
since the information needed isn't being stored at the moment.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Sun, 17 Feb 2013 14:57:39 -0500 |
parents | 448f907a9d7e |
children |
rev | line source |
---|---|
0
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
1 #!/usr/bin/python |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
2 from django.core.management import execute_manager |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
3 try: |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
4 import settings # Assumed to be in the same directory. |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
5 except ImportError: |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
6 import sys |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
7 sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
8 sys.exit(1) |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
9 |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
10 if __name__ == "__main__": |
448f907a9d7e
Initial Agora Octave commit
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
11 execute_manager(settings) |