summaryrefslogtreecommitdiff
path: root/example_project
diff options
context:
space:
mode:
Diffstat (limited to 'example_project')
-rw-r--r--example_project/.gitignore1
-rw-r--r--example_project/__init__.py14
-rwxr-xr-xexample_project/generate_fixture.sh3
-rwxr-xr-xexample_project/manage.py11
-rw-r--r--example_project/urls.py19
5 files changed, 48 insertions, 0 deletions
diff --git a/example_project/.gitignore b/example_project/.gitignore
new file mode 100644
index 000000000..fce19e421
--- /dev/null
+++ b/example_project/.gitignore
@@ -0,0 +1 @@
+settings.py
diff --git a/example_project/__init__.py b/example_project/__init__.py
new file mode 100644
index 000000000..a23b98e09
--- /dev/null
+++ b/example_project/__init__.py
@@ -0,0 +1,14 @@
+# force the retranslation of generated strings and external module
+from django.utils.translation import ugettext as _
+_(u"username")
+_(u"email address")
+_(u"warehouse")
+_(u"New warehouse")
+_(u"warehouse")
+_(u"New organization")
+_(u"New person")
+_(u"New author")
+if settings.XHTML2ODT_PATH:
+ import sys
+ sys.path.append(settings.XHTML2ODT_PATH)
+ from xhtml2odt import xhtml2odt
diff --git a/example_project/generate_fixture.sh b/example_project/generate_fixture.sh
new file mode 100755
index 000000000..a69a9c836
--- /dev/null
+++ b/example_project/generate_fixture.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "Generate initial_data"
+./manage.py dumpdata --indent 1 ishtar_base.OrganizationType ishtar_base.PersonType ishtar_base.AuthorType ishtar_base.SourceType ishtar_base.FileType ishtar_base.PermitType ishtar_base.SaisineType ishtar_base.OperationType ishtar_base.RemainType ishtar_base.Period ishtar_base.DatingType ishtar_base.DatingQuality ishtar_base.Unit ishtar_base.ActivityType ishtar_base.IdentificationType ishtar_base.MaterialType ishtar_base.WarehouseType ishtar_base.ActType ishtar_base.ContainerType ishtar_base.TreatmentType > fixtures/initial_data.json && echo "Done"
diff --git a/example_project/manage.py b/example_project/manage.py
new file mode 100755
index 000000000..bcdd55e27
--- /dev/null
+++ b/example_project/manage.py
@@ -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)
diff --git a/example_project/urls.py b/example_project/urls.py
new file mode 100644
index 000000000..ea54a61e1
--- /dev/null
+++ b/example_project/urls.py
@@ -0,0 +1,19 @@
+from django.conf.urls.defaults import *
+
+from django.contrib.auth.models import User
+from django.contrib import admin
+admin.autodiscover()
+#admin.site.unregister(User)
+
+from settings import URL_PATH
+
+BASE_URL = r'^' + URL_PATH
+
+urlpatterns = patterns('',
+ (BASE_URL + 'accounts/', include('registration.urls')),
+ (BASE_URL + r'admin/', include(admin.site.urls)),
+ ('', include('ishtar_common.urls')),
+)
+urlpatterns += patterns('ishtar_common.views',
+ url(BASE_URL + '$', 'index', name='start'),
+ )