]> git.parisson.com Git - telemeta.git/commitdiff
update sandbox example (with sqlite3), cleanup, go to 0.9.8
authoryomguy <yomguy@parisson.com>
Tue, 21 Jun 2011 09:36:43 +0000 (11:36 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 21 Jun 2011 09:36:43 +0000 (11:36 +0200)
example/sandbox/__init__.py [new file with mode: 0644]
example/sandbox/manage.py [new file with mode: 0755]
example/sandbox/settings.py
telemeta/__init__.py
telemeta/models/system.py

diff --git a/example/sandbox/__init__.py b/example/sandbox/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/example/sandbox/manage.py b/example/sandbox/manage.py
new file mode 100755 (executable)
index 0000000..bcdd55e
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+from django.core.management import execute_manager
+try:
+    import settings # Assumed to be in the same directory.
+except ImportError:
+    import sys
+    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__)
+    sys.exit(1)
+
+if __name__ == "__main__":
+    execute_manager(settings)
index 56fc003ada942c4022a3eb9519b8671b752aea7b..18ef40c1b4a77268911e0af8cbfb5a18996a12ef 100644 (file)
@@ -1,6 +1,8 @@
 # -*- coding: utf-8 -*-
 # Django settings for sandbox project.
 
+import os.path
+
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
@@ -12,11 +14,10 @@ MANAGERS = ADMINS
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-#        'OPTIONS': { 'init_command': 'SET storage_engine=INNODB', },
-        'NAME': 'telemeta',                      # Or path to database file if using sqlite3.
-        'USER': '******',                      # Not used with sqlite3.
-        'PASSWORD': '************',                  # Not used with sqlite3.
+        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+        'NAME': 'sandbox.db',                      # Or path to database file if using sqlite3.
+        'USER': '',                      # Not used with sqlite3.
+        'PASSWORD': '',                  # Not used with sqlite3.
         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
     }
@@ -50,7 +51,7 @@ USE_L10N = True
 
 # Absolute path to the directory that holds media.
 # Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = '/home/dev/telemeta/sandboxes/sandbox_generic/media/'
+MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media/')
 
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash if there is a path component (optional in other cases).
@@ -60,10 +61,10 @@ MEDIA_URL = ''
 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 # trailing slash.
 # Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = 'http://wm22.parisson.com/django/media/'
+ADMIN_MEDIA_PREFIX = 'http://localhost/django/media/'
 
 # Make this unique, and don't share it with anybody.
-SECRET_KEY = '***************************************'
+SECRET_KEY = 'a8l7%06wr2k+3=%#*#@#rvop2mmzko)44%7k(zx%lls^ihm9^5'
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
@@ -82,13 +83,13 @@ MIDDLEWARE_CLASSES = (
     'django.middleware.locale.LocaleMiddleware',
 )
 
-ROOT_URLCONF = 'sandbox_generic.urls'
+ROOT_URLCONF = 'sandbox.urls'
 
 TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    '/home/dev/telemeta/sandboxes/sandbox_generic/templates/',
+    '',
 )
 
 INSTALLED_APPS = (
@@ -107,20 +108,15 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.contrib.auth.context_processors.auth',
 )
 
-#LOCALE_PATHS = (
-    #'/home/dev/telemeta/telemeta/telemeta/locale',
-#)
-
-TELEMETA_ORGANIZATION = 'CREM'
-TELEMETA_SUBJECTS = ('Ethnomusicology', 'Research')
+TELEMETA_ORGANIZATION = 'Parisson'
+TELEMETA_SUBJECTS = ('Test', 'Sandbox')
 TELEMETA_GMAP_KEY = 'ABQIAAAArg7eSfnfTkBRma8glnGrlxRVbMrhnNNvToCbZQtWdaMbZTA_3RRGObu5PDoiBImgalVnnLU2yN4RMA'
 TELEMETA_DOWNLOAD_ENABLED = True
 TELEMETA_STREAMING_FORMATS = ('mp3', 'ogg')
 TELEMETA_PUBLIC_ACCESS_PERIOD = 51
 AUTH_PROFILE_MODULE = 'telemeta.userprofile'
 
-TELEMETA_OAI_HOST = 'telemeta.wm22.parisson.org'
-TELEMETA_OAI_REPOSITORY_NAME = "University of Paris 10. CNRS. Research Centre of Ethnomusicology (CREM). Sound archives"
+TELEMETA_OAI_REPOSITORY_NAME = "Telemeta TEST sandbox"
 
 LOGIN_URL = '/login'
 LOGIN_REDIRECT_URL = '/'
index d023d9a514e17341e568cd432483a76de5612f2b..3f685b80c57864b3dddbae82098d889aba40240b 100644 (file)
@@ -12,7 +12,7 @@ U{http://telemeta.org}
 """
 
 __docformat__ = 'epytext en'
-__version__ = '0.9.6'
+__version__ = '0.9.8'
 __url__ = 'http://telemeta.org'
 __copyright__ = '(C) 2007-2011 Parisson'
 __license__ = 'CeCILL-2'
index 17111759919f36a488966f9674d269b7946f966a..f6a892e56010d0e2f37821bea31d493a97138d75 100644 (file)
@@ -74,24 +74,6 @@ class Revision(ModelCore):
         db_table = 'revisions'
 
 
-class OldUser(ModelCore):
-    "Telemeta user (NOT USED ANYMORE !)"
-    LEVEL_CHOICES = (('user', 'user'), ('maintainer', 'maintainer'), ('admin', 'admin'))
-
-    username   = CharField(_('username'), primary_key=True, max_length=64, required=True)
-    level      = CharField(_('level'), choices=LEVEL_CHOICES, max_length=32, required=True)
-    first_name = CharField(_('first name'))
-    last_name  = CharField(_('last name'))
-    phone      = CharField(_('phone'))
-    email      = CharField(_('email'))
-
-    class Meta(MetaCore):
-        db_table = 'users'
-
-    def __unicode__(self):
-        return self.username
-
-
 class UserProfile(django.db.models.Model):
     "User profile extension"