Sfoglia il codice sorgente

Updated documentation to make it gramatically correct

master
David Winterbottom 14 anni fa
parent
commit
1438a63c20
4 ha cambiato i file con 250 aggiunte e 23 eliminazioni
  1. 9
    12
      README.rst
  2. 25
    7
      docs/source/index.rst
  3. 0
    4
      examples/vanilla/settings.py
  4. 216
    0
      examples/vanilla/settings_quickstart.py

+ 9
- 12
README.rst Vedi File

@@ -1,15 +1,12 @@
1
-Django-Oscar - Flexible e-commerce on Django
2
-============================================
1
+Django-Oscar - Flexible e-commerce on Django 1.3
2
+================================================
3 3
 
4
-django-oscar is a flexible ecommerce platform, designed to build domain-driven
5
-ecommerce sites to be constructed.  It is not supposed to be a framework that can
6
-be downloaded and fully set up by simply adjusting a configuration file: there
7
-will always be some developer work required to make sure the models match those
8
-from your domain - this is the nature of domain modelling.
4
+django-oscar is a ecommerce framework for Django 1.3 for building domain-driven
5
+ecommerce sites.  It is structured in way that lets any part of the core
6
+ecommerce functionality be customised to suit the needs of your project.    
9 7
 
10
-However, a small amount of work up front in determine the right models for your
11
-shop can really pay off in terms of building a high-quality application that
12
-is a pleasure to work with and maintain.
8
+It is currently in vigorous early development, but should stabilise over the
9
+summer of 2011.
13 10
 
14
-See the ``*.rst`` files within ``docs/source`` for documentation or visit
15
-http://django-oscar.readthedocs.org/en/latest/
11
+Browse the ``*.rst`` files within ``docs/source`` for documentation or visit
12
+http://django-oscar.readthedocs.org/en/latest/ for HTML versions.

+ 25
- 7
docs/source/index.rst Vedi File

@@ -7,18 +7,36 @@
7 7
 Welcome to the documentation for django-oscar
8 8
 =============================================
9 9
 
10
-django-oscar is a flexible e-commerce platform for Django, designed to build domain-driven
11
-ecommerce sites.  It differs from other e-commerce projects in that the core of django-oscar is kept
12
-quite small but extensible.  Any class within oscar can be subclassed and extended to customise
13
-the functionality available.  While this means that more work is required up-front to 
14
-set up the model, form and utility classes, the resulting project should be
15
-a much better representation of the domain at hand.
10
+django-oscar is a ecommerce framework for Django 1.3 for building domain-driven
11
+ecommerce sites.  It is structured in way that lets any part of the core
12
+ecommerce functionality be customised to suit the needs of your project.    
16 13
 
17 14
 It is developed by Tangent Labs, a London-based digital agency, and is based on
18 15
 their existing Taoshop PHP platform which currently powers several large-scale ecommerce sites.  
19 16
 
20 17
 It is still in early development, but a stable release is planned for early summer 2011.
21
-The source is on Github: https://github.com/tangentlabs/django-oscar
18
+The source is on Github: https://github.com/tangentlabs/django-oscar - all contributions welcome.
19
+
20
+Quick start
21
+===========
22
+
23
+We can do this quickly.  Create a virtualenv and install django-oscar::
24
+
25
+    mkvirtualenv --no-site-packages vanilla
26
+    pip install -e git+git://github.com/tangentlabs/django-oscar.git#egg=django-oscar
27
+
28
+Take a copy of the example vanilla site, and copy the quickstart settings into place::
29
+
30
+    cp -r ~/.virtualenvs/myshop/lib/python2.6/site-packages/src/examples/vanilla/ /tmp/vanilla
31
+    cd /tmp/vanilla
32
+    cp settings_quickstart.py settings.py
33
+
34
+Import the sample products and images::
35
+
36
+    python manage.py import_catalogue ~/.virtualenvs/myshop/src/django-oscar/examples/sample-data/books-catalogue.csv
37
+    python manage.py import_images ~/.virtualenvs/myshop/src/django-oscar/examples/sample-data/book-images.tar.gz
38
+
39
+And there you have it: a fully functional ecommerce site with a product range of 100 popular books.
22 40
 
23 41
 Getting started:
24 42
 

+ 0
- 4
examples/vanilla/settings.py Vedi File

@@ -1,9 +1,5 @@
1
-# -*- coding: utf-8 -*-
2 1
 import os
3 2
 
4
-LOCALE = 'en_IN.UTF-8'
5
-CURRENCY_SYMBOL = '₹'
6
-
7 3
 # Django settings for oscar project.
8 4
 PROJECT_DIR = os.path.dirname(__file__)
9 5
 location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x)

+ 216
- 0
examples/vanilla/settings_quickstart.py Vedi File

@@ -0,0 +1,216 @@
1
+import os
2
+
3
+PROJECT_DIR = os.path.dirname(__file__)
4
+location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x)
5
+
6
+DEBUG = True
7
+TEMPLATE_DEBUG = True
8
+SQL_DEBUG = True
9
+
10
+ADMINS = (
11
+    # ('Your Name', 'your_email@domain.com'),
12
+)
13
+EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
14
+
15
+MANAGERS = ADMINS
16
+
17
+DATABASES = {
18
+    'default': {
19
+        'ENGINE': 'django.db.backends.sqlite3', 
20
+        'NAME': '/tmp/oscar_vanilla',     
21
+        'USER': '',                           
22
+        'PASSWORD': '',                      
23
+        'HOST': '',                     
24
+        'PORT': '',                      
25
+    }
26
+}
27
+
28
+
29
+
30
+# Local time zone for this installation. Choices can be found here:
31
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32
+# although not all choices may be available on all operating systems.
33
+# On Unix systems, a value of None will cause Django to use the same
34
+# timezone as the operating system.
35
+# If running in a Windows environment this must be set to the same as your
36
+# system time zone.
37
+TIME_ZONE = 'Europe/London'
38
+
39
+# Language code for this installation. All choices can be found here:
40
+# http://www.i18nguy.com/unicode/language-identifiers.html
41
+LANGUAGE_CODE = 'en-us'
42
+
43
+SITE_ID = 1
44
+
45
+# If you set this to False, Django will make some optimizations so as not
46
+# to load the internationalization machinery.
47
+USE_I18N = True
48
+
49
+# If you set this to False, Django will not format dates, numbers and
50
+# calendars according to the current locale
51
+USE_L10N = True
52
+
53
+# Absolute path to the directory that holds media.
54
+# Example: "/home/media/media.lawrence.com/"
55
+MEDIA_ROOT = location("assets")
56
+
57
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
58
+# trailing slash if there is a path component (optional in other cases).
59
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
60
+MEDIA_URL = '/media/'
61
+
62
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
63
+# trailing slash.
64
+# Examples: "http://foo.com/media/", "/media/".
65
+ADMIN_MEDIA_PREFIX = '/media/admin/'
66
+
67
+# Make this unique, and don't share it with anybody.
68
+SECRET_KEY = '$)a7n&o80u!6y5t-+jrd3)3!%vh&shg$wqpjpxc!ar&p#!)n1a'
69
+
70
+# List of callables that know how to import templates from various sources.
71
+TEMPLATE_LOADERS = (
72
+    'django.template.loaders.filesystem.Loader',
73
+    'django.template.loaders.app_directories.Loader',
74
+)
75
+
76
+TEMPLATE_CONTEXT_PROCESSORS = (
77
+    "django.contrib.auth.context_processors.auth",
78
+    "django.core.context_processors.request",
79
+    "django.core.context_processors.debug",
80
+    "django.core.context_processors.i18n",
81
+    "django.core.context_processors.media",
82
+    "django.core.context_processors.static",
83
+    "django.contrib.messages.context_processors.messages",
84
+    # Oscar specific
85
+    'oscar.apps.search.context_processors.search_form',
86
+    'oscar.apps.promotions.context_processors.promotions',
87
+    'oscar.apps.promotions.context_processors.merchandising_blocks',
88
+) 
89
+
90
+MIDDLEWARE_CLASSES = (
91
+    'django.middleware.common.CommonMiddleware',
92
+    'django.contrib.sessions.middleware.SessionMiddleware',
93
+    'django.middleware.csrf.CsrfViewMiddleware',
94
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
95
+    'django.contrib.messages.middleware.MessageMiddleware',
96
+    'django.middleware.transaction.TransactionMiddleware',
97
+    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
98
+    # Oscar specific
99
+    'oscar.apps.basket.middleware.BasketMiddleware'
100
+)
101
+
102
+INTERNAL_IPS = ('127.0.0.1',)
103
+
104
+ROOT_URLCONF = 'urls'
105
+
106
+TEMPLATE_DIRS = (
107
+    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
108
+    # Always use forward slashes, even on Windows.
109
+    # Don't forget to use absolute paths, not relative paths.
110
+)
111
+
112
+# A sample logging configuration. The only tangible logging
113
+# performed by this configuration is to send an email to
114
+# the site admins on every HTTP 500 error.
115
+# See http://docs.djangoproject.com/en/dev/topics/logging for
116
+# more details on how to customize your logging configuration.
117
+LOGGING = {
118
+    'version': 1,
119
+    'disable_existing_loggers': False,
120
+    'formatters': {
121
+        'verbose': {
122
+            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
123
+        },
124
+        'simple': {
125
+            'format': '%(levelname)s %(message)s'
126
+        },
127
+    },
128
+    'handlers': {
129
+        'null': {
130
+            'level':'DEBUG',
131
+            'class':'django.utils.log.NullHandler',
132
+        },
133
+        'console':{
134
+            'level':'DEBUG',
135
+            'class':'logging.StreamHandler',
136
+            'formatter': 'verbose'
137
+        },
138
+        'file': {
139
+             'level': 'INFO',
140
+             'class': 'logging.FileHandler',
141
+             'filename': '/tmp/oscar.log',
142
+             'formatter': 'verbose'
143
+        },
144
+        'mail_admins': {
145
+            'level': 'ERROR',
146
+            'class': 'django.utils.log.AdminEmailHandler',
147
+        },
148
+    },
149
+    'loggers': {
150
+        'django': {
151
+            'handlers':['null'],
152
+            'propagate': True,
153
+            'level':'INFO',
154
+        },
155
+        'django.request': {
156
+            'handlers': ['mail_admins'],
157
+            'level': 'ERROR',
158
+            'propagate': False,
159
+        },
160
+        'oscar.checkout': {
161
+            'handlers': ['console'],
162
+            'propagate': True,
163
+            'level':'INFO',
164
+        },
165
+        'django.db.backends': {
166
+            'handlers':['null'],
167
+            'propagate': False,
168
+            'level':'DEBUG',
169
+        },
170
+    }
171
+}
172
+
173
+
174
+INSTALLED_APPS = (
175
+    'django.contrib.auth',
176
+    'django.contrib.contenttypes',
177
+    'django.contrib.sessions',
178
+    'django.contrib.sites',
179
+    'django.contrib.messages',
180
+    'django.contrib.admin',
181
+    'django.contrib.flatpages',
182
+    # External dependencies
183
+    'haystack',
184
+    'sorl.thumbnail',
185
+    # Apps from oscar
186
+    'oscar',
187
+    'oscar.apps.analytics',
188
+    'oscar.apps.discount',
189
+    'oscar.apps.order',
190
+    'oscar.apps.checkout',
191
+    'oscar.apps.shipping',
192
+    'oscar.apps.order_management',
193
+    'oscar.apps.product',
194
+    'oscar.apps.basket',
195
+    'oscar.apps.payment',
196
+    'oscar.apps.offer',
197
+    'oscar.apps.address',
198
+    'oscar.apps.partner',
199
+    'oscar.apps.image',
200
+    'oscar.apps.customer',
201
+    'oscar.apps.promotions',
202
+    'oscar.apps.reports',
203
+    'oscar.apps.search',
204
+    'oscar.apps.product.reviews',
205
+    'oscar.apps.payment.datacash',
206
+)
207
+
208
+LOGIN_REDIRECT_URL = '/accounts/profile/'
209
+APPEND_SLASH = True
210
+
211
+# Oscar settings
212
+from oscar.defaults import *
213
+
214
+# Haystack settings
215
+HAYSTACK_SITECONF = 'oscar.search_sites'
216
+HAYSTACK_SEARCH_ENGINE = 'dummy'

Loading…
Annulla
Salva