Permalink
Browse files

paths are fixed

  • Loading branch information...
1 parent 22f7b75 commit 6f782652fa6c9864ac42f9f91f97ca9162654418 demo committed Aug 11, 2012
Showing with 20 additions and 19 deletions.
  1. +20 −19 ovizart/scripts/create_user.py
View
39 ovizart/scripts/create_user.py
@@ -5,37 +5,38 @@
import os
import hashlib
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'../..')))
sys.path[0:0] = [
- '/home/oguz/git/ovizart/eggs/django_tastypie-0.9.11-py2.7.egg',
- '/usr/lib/pymodules/python2.7',
- '/usr/lib/pymodules/python2.7',
- '/usr/lib/pymodules/python2.7',
- '/home/oguz/git/ovizart/eggs/hachoir_regex-1.0.5-py2.7.egg',
- '/home/oguz/git/ovizart/eggs/djangorecipe-1.0-py2.7.egg',
- '/home/oguz/git/ovizart/requirements/django-nonrel',
- '/home/oguz/git/ovizart/eggs/zc.recipe.egg-1.3.2-py2.7.egg',
+ '/home/demo/ovizart/eggs/django_tastypie-0.9.11-py2.7.egg',
+ '/home/demo/ovizart/eggs/hachoir_core-1.3.3-py2.7.egg',
+ '/home/demo/ovizart/eggs/hachoir_parser-1.3.4-py2.7.egg',
+ '/home/demo/ovizart/eggs/hachoir_regex-1.0.5-py2.7.egg',
+ '/home/demo/ovizart/eggs/hachoir_subfile-0.5.3-py2.7.egg',
+ '/home/demo/ovizart/eggs/djangorecipe-1.0-py2.7.egg',
+ '/home/demo/ovizart/requirements/django-nonrel',
+ '/home/demo/ovizart/eggs/zc.recipe.egg-1.3.2-py2.7.egg',
'/usr/lib/python2.7/dist-packages',
- '/usr/lib/python2.7/dist-packages',
- '/home/oguz/git/ovizart/eggs/distribute-0.6.27-py2.7.egg',
- '/home/oguz/git/ovizart/eggs/mimeparse-0.1.3-py2.7.egg',
- '/home/oguz/git/ovizart/parts/django',
- '/home/oguz/git/ovizart',
- '/home/oguz/git/ovizart/ovizart',
- '/home/oguz/git/ovizart/third-party/django-apps',
+ '/home/demo/ovizart/eggs/distribute-0.6.28-py2.7.egg',
+ '/home/demo/ovizart/eggs/python_dateutil-1.5-py2.7.egg',
+ '/home/demo/ovizart/eggs/mimeparse-0.1.3-py2.7.egg',
+ '/home/demo/ovizart/parts/django',
+ '/home/demo/ovizart',
+ '/home/demo/ovizart/ovizart',
+ '/home/demo/ovizart/third-party/django-apps',
]
+
+
os.environ['DJANGO_SETTINGS_MODULE'] = 'ovizart.settings'
from django.contrib.auth.models import User
-from main.models import *
+from ovizart.main.models import *
-u, created = User.objects.get_or_create(username='oguz')
+u, created = User.objects.get_or_create(username='demo')
u.set_password("ozyy4r12")
u.save()
h = hashlib.sha1()
-h.update(u'oguzyarimtepe@gmail.com')
+h.update(u'demo@ovizart.foo.com')
profile, create = UserProfile.objects.get_or_create(user=u, user_email=h.hexdigest())
print "USerProfile create status: %s" % created

0 comments on commit 6f78265

Please sign in to comment.