summaryrefslogtreecommitdiff
path: root/www/py-mezzanine/MESSAGE
blob: 9a1d41824f51e6c17f71d49836edd28ce0fc3571 (plain)
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
===========================================================================
$NetBSD: MESSAGE,v 1.2 2013/01/03 15:31:08 ryoon Exp $

To use Mezzanine, you will need to perform the following steps.

1. If you want to use with PostgreSQL server, install
   databases/postgresql91-server and enable it, then create database.

	$ sudo ${PREFIX}/share/examples/rc.d/pgsql onestart
	$ sudo -u pgsql createuser -P
	Enter name of role to add: YOURUSERNAME
	Enter password for new role: YOURPASSWORD
	Enter it again: YOURPASSWORD
	Shall the new role be a superuser? (y/n) n
	Shall the new role be allowed to create databases? (y/n) y
	Shall the new role be allowed to create more new roles? (y/n) n
	$ createdb dev.db -U YOURUSERNAME

2. Change current directory to somewhere you want to deploy website.

	$ mezzanine-project project_name
	# cd project_name

3. Edit local_settings.py.

DEBUG = True

DATABASES = {
    "default": {
        # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
        "ENGINE": "django.db.backends.postgresql_psycopg2",
        # DB name or path to database file if using sqlite3.
        "NAME": "dev.db",
        # Not used with sqlite3.
        "USER": "YOUUSERNAME",
        # Not used with sqlite3.
        "PASSWORD": "YOURPASSWORD",
        # Set to empty string for localhost. Not used with sqlite3.
        "HOST": "",
        # Set to empty string for default. Not used with sqlite3.
        "PORT": "",
    }
}

4. Create database.

	${PYTHONBIN} manage.py createdb --noinput

5. Run web server

	${PYTHONBIN} manage.py runserver

6. Access http://localhost:8000/admin/ and setup. Username/password are
   admin/default.
===========================================================================