My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
#!/usr/bin/python
# warning there's some names, passwords and most importantly paths in here that you will want to change
# first off you see lots of /home/andy/plone/zinstance....
# thats where my plone site is
# second my db in postgres is called plone (you might want to change that)
import os
os.environ["DJANGO_SETTINGS_MODULE"] = "settings"

def cmd(text):
try:
print text
os.system(text)
except:
print "* command failed"

cmd('dropdb andymckay_djangozen')
cmd('createdb andymckay_djangozen --encoding=UTF-8')

cmd('cd /home/andy/plone/zinstance; bin/instance run parts/productdistros/ContentMirror/ddl.py postgres > mirror.sql')
cmd('psql -h localhost -p 5432 -U andymckay_djangozen andymckay_djangozen < /home/andy/plone/zinstance/mirror.sql')
cmd('python manage.py syncdb --noinput')

# if you had django admin enabled, this is where
# you add users in
# from django.contrib.auth.models import User
# u = User.objects.create(
# username='admin',
# first_name='',
# last_name='',
# email='andy@clearwind.ca',
# is_superuser=True,
# is_staff=True,
# is_active=True)
# u.set_password('admin')
# u.save()

# fixtures
cmd('cd /home/andy/plone/zinstance; bin/instance run parts/productdistros/ContentMirror/bulk.py Plone')

Change log

r98 by andy.glyn.mckay on Mar 30, 2009   Diff
move from clearwind to google
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1376 bytes, 38 lines

File properties

svn:executable
*
Powered by Google Project Hosting