forked from pinax/pinax
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.txt
124 lines (77 loc) · 4.02 KB
/
install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Installation
============
This covers installation from a release bundle. For information on installing
a development version, see http://pinaxproject.com/docs/dev/contributing.html.
The release bundle has almost everything you need to get Pinax up and running.
The only things not included are `Python`_ itself, the `Python Imaging Library`_
(PIL) and a database such as SQLite (which is included in Python 2.5+).
For more information on installing PIL, see :ref:`ref-pil`.
.. note::
If you are on Mac OS X, make sure you have the Apple developer tools
installed before proceeding with Pinax installation.
Installing Pinax
----------------
Pinax makes use of Python virtual environments (or virtualenvs) to isolate
the various packages it uses from the rest of your system. Pinax comes with a
script that will create the virtualenv for you and install Django and the
various applications and libraries that make up Pinax.
To run this script, extract the release bundle, cd into it and run::
$ python scripts/pinax-boot.py <path-to-virtual-env-to-create>
This will set up the virtualenv and install everything.
For example, if you wanted to create your environment in a directory parallel
to where you extracted the bundle you could run::
$ python scripts/pinax-boot.py ../pinax-env
If you use virtualenvwrapper_ (which we recommend), this would become::
$ python scripts/pinax-boot.py $WORKON_HOME/pinax-env
Activating the virtualenv
-------------------------
Any time you work on a project involving Pinax, you will want to activate
the virtualenv.
This is done with::
$ source <path-to-virtual-env-created>/bin/activate
or, in our example above using ``../pinax-env``::
$ source ../pinax-env/bin/activate
On Windows you would run::
$ ..\pinax-env\Scripts\activate.bat
With virtualenvwrapper, this becomes::
$ workon pinax-env
which you can run from anywhere on your filesystem.
Note that you will develop your Pinax-based project in a directory outside
your virtualenv. As long as the virtualenv is active, your project will have
access to all of the apps and libraries Pinax provides.
Starting a new Pinax project
----------------------------
The recommended way to start a new Pinax-based project is to clone one of the
existing projects. This is done via the ``pinax-admin clone_project``
command which you can run once you are in your Pinax virtual-env.
You can get a list of available projects with::
(pinax-env)$ pinax-admin clone_project -l
This will show you a list of projects that you can base your new project on.
Just as quick demonstration, let's start with the social_project. cd into the
directory you'd like to create your new project in and run::
(pinax-env)$ pinax-admin clone_project social_project mysite
This will create a new Pinax project called 'mysite' in your current working
directory.
.. note::
We recommend you don't clone projects into the ``pinax-env`` (the virtual
environment) directory. This directory is best left for only the
environment isolated away from your project. This enables you to:
* version your project separately from your Pinax environment
* blow away / upgrade your Pinax environment / try different Pinax versions,
etc without affecting your project
Lastly, let's get it running::
(pinax-env)$ cd mysite/
(pinax-env)$ python manage.py syncdb
(pinax-env)$ python manage.py runserver
Point your browser at http://localhost:8000/ and you should see the Pinax
default homepage!
Note that mail and some notifications are queued rather than delivered
immediately. See :ref:`ref-sending-mail-and-notices` for details.
What's next?
------------
Look at our :doc:`customization <customization>` documentation to learn how you
might customize your cloned project. If you are ready to deploy your project
check out the :doc:`deployment <deployment>` documentation.
.. _Python: http://python.org
.. _`Python Imaging Library`: http://www.pythonware.com/products/pil/
.. _`virtualenvwrapper`: http://www.doughellmann.com/projects/virtualenvwrapper/