Bläddra i källkod

Fixed the 'contribute' makefile target.

This makes it much easier to get started when contributing.  The docs
are also updated.
master
David Winterbottom 13 år sedan
förälder
incheckning
591d950bd5
4 ändrade filer med 20 tillägg och 24 borttagningar
  1. 2
    3
      Makefile
  2. 10
    6
      docs/source/getting_started.rst
  3. 7
    14
      docs/source/take_a_peek.rst
  4. 1
    1
      sandbox/settings.py

+ 2
- 3
Makefile Visa fil

@@ -1,7 +1,6 @@
1
-sandbox:
1
+contribute:
2 2
 	# Create a sandbox installation for playing around with oscar.
3
-	mkvirtualenv oscar
4
-	python setup.up develop
3
+	python setup.py develop
5 4
 	pip install -r requirements.txt
6 5
 	# Create database
7 6
 	sandbox/manage.py syncdb --noinput

+ 10
- 6
docs/source/getting_started.rst Visa fil

@@ -8,14 +8,14 @@ scratch and have decided to use Oscar.  Let's call this shop 'frobshop'
8 8
 .. tip::
9 9
 
10 10
     You can always review the set-up of the `Sandbox site`_ in case you have
11
-    trouble following the below instructions.
11
+    trouble with the below instructions.
12 12
 
13 13
 .. _`Sandbox site`: https://github.com/tangentlabs/django-oscar/tree/releases/0.2/sandbox
14 14
 
15 15
 Install by hand
16 16
 ===============
17 17
 
18
-Install oscar (which will install Django as a dependency), then create the
18
+Install Oscar (which will install Django as a dependency), then create the
19 19
 project::
20 20
 
21 21
     pip install django-oscar
@@ -27,7 +27,7 @@ Settings
27 27
 --------
28 28
 
29 29
 Now edit your settings file ``frobshop.frobshop.settings.py`` to specify a
30
-database (we use sqlite for simplicity)::
30
+database (we use SQLite for simplicity)::
31 31
 
32 32
     DATABASES = {
33 33
         'default': {
@@ -85,6 +85,9 @@ Oscar currently uses Haystack for search so you need to specify::
85 85
     HAYSTACK_SITECONF = 'oscar.search_sites'
86 86
     HAYSTACK_SEARCH_ENGINE = 'dummy'
87 87
 
88
+When moving towards production, you'll obviously need to switch to a real search
89
+backend.
90
+
88 91
 The last addition to the settings file is to import all of Oscar's default settings::
89 92
 
90 93
     from oscar.defaults import *
@@ -116,7 +119,7 @@ Install using Tangent's boilerplate django project
116 119
 ==================================================
117 120
 
118 121
 The easiest way to get started is to use Tangent's `template django project`_
119
-although it is tailored to an Agency structure which may not suit everyone.
122
+although it is tailored to an agency structure which may not suit everyone.
120 123
 
121 124
 .. _`template django project`: https://github.com/tangentlabs/tangent-django-boilerplate
122 125
 
@@ -151,7 +154,8 @@ follows Tangent's conventions.  The structure is::
151 154
         deploy-to-stage.sh
152 155
         deploy-to-prod.sh
153 156
 
154
-Replace a few files with Oscar-specific versions::
157
+Replace a few files with Oscar-specific versions (the templated project can be
158
+used for non-Oscar projects too)::
155 159
 
156 160
     mv frobshop/www/urls{_oscar,}.py
157 161
     mv frobshop/www/deploy/requirements{_oscar,}.py
@@ -173,4 +177,4 @@ Next steps
173 177
 ==========
174 178
 
175 179
 The next step is to implement the business logic of your domain on top of
176
-Oscar.
180
+Oscar.  The fun part.

+ 7
- 14
docs/source/take_a_peek.rst Visa fil

@@ -10,10 +10,10 @@ Browse the sandbox site
10 10
 There is a demo Oscar site, built hourly from HEAD of the master branch (unstable):
11 11
 http://sandbox.oscar.tangentlabs.co.uk
12 12
 
13
-It is intended to be a vanilla install of oscar, using the default templates and
13
+It is intended to be a vanilla install of Oscar, using the default templates and
14 14
 styles.  This is the blank canvas upon which you an build your application.
15 15
 
16
-It only has two customisations on top of oscar's core:
16
+It only has two customisations on top of Oscar's core:
17 17
 
18 18
 * Two shipping methods are specified so that the shipping method step of
19 19
   checkout is not skipped.  If there is only one shipping method (which is true of core
@@ -35,19 +35,12 @@ Install Oscar and its dependencies within a virtualenv::
35 35
     git clone git://github.com/tangentlabs/django-oscar.git
36 36
     cd django-oscar
37 37
     mkvirtualenv oscar
38
-    python setup.py develop
39
-    pip install -r requirements.txt
38
+    make contribute
40 39
 
41
-Create a SQLite database and load some sample products and required fixtures::
40
+This will install all dependencies required for developing Oscar and create a
41
+simple database populated with products.
42 42
 
43
-    cd sandbox
44
-    ./manage.py syncdb --noinput
45
-    ./manage.py migrate 
46
-    ./manage.py oscar_import_catalogue data/books-catalogue.csv 
47
-    ./manage.py oscar_import_catalogue_images data/books-images.tar.gz 
48
-    ./manage.py loaddata countries.json fixtures/pages.json 
49
-
50
-Now you can browse a sample Oscar site using Django's development server::
43
+You can then browse a sample Oscar site using Django's development server::
51 44
 
52 45
     ./manage.py runserver
53 46
 
@@ -61,7 +54,7 @@ as they are domain-specific.  For instance:
61 54
 I've found a problem!
62 55
 ---------------------
63 56
 
64
-Please `report them in Github's issue tracker`_.
57
+Good for you - please `report them in Github's issue tracker`_.
65 58
 
66 59
 .. _`report them in Github's issue tracker`: https://github.com/tangentlabs/django-oscar/issues
67 60
 

+ 1
- 1
sandbox/settings.py Visa fil

@@ -20,7 +20,7 @@ MANAGERS = ADMINS
20 20
 DATABASES = {
21 21
     'default': {
22 22
         'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
23
-        'NAME': 'db.sqlite',                      # Or path to database file if using sqlite3.
23
+        'NAME': os.path.join(os.path.dirname(__file__), 'db.sqlite'),                      # Or path to database file if using sqlite3.
24 24
         'USER': '',                      # Not used with sqlite3.
25 25
         'PASSWORD': '',                  # Not used with sqlite3.
26 26
         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.

Laddar…
Avbryt
Spara