[website] [minor] fixes after moving website module

This commit is contained in:
Anand Doshi 2013-09-12 16:59:12 +05:30
parent 1be5bb7e6a
commit 3b44ce5fb4
3 changed files with 2 additions and 40 deletions

View File

@ -288,7 +288,7 @@ NameVirtualHost *:8080
RewriteCond %%{REQUEST_FILENAME} !-f
RewriteCond %%{REQUEST_FILENAME} !-d
RewriteCond %%{REQUEST_FILENAME} !-l
RewriteRule ^([^/]+)$ /web.py?page=$1 [QSA,L]
RewriteRule ^([^/]+)$ /web.py?page=$1 [QSA,L]
</Directory>
</VirtualHost>""" % (install_path, install_path)

View File

@ -5,44 +5,6 @@ from __future__ import unicode_literals
import webnotes
def pre_import():
webnotes.conn.begin()
make_modules()
make_roles()
webnotes.conn.commit()
def make_modules():
modules = [
"Home", "System", "Utilities", "Website", "Setup",
"Selling", "Buying", "Projects", "Accounts", "Stock",
"Support", "HR", "Manufacturing"]
for m in modules:
doc = webnotes.doc(fielddata = {
"doctype": "Module Def",
"module_name": m,
})
doc.insert()
def make_roles():
roles = [
"Accounts Manager", "Accounts User", "Analytics", "Auditor",
"Blogger", "Customer", "Employee", "Expense Approver",
"HR Manager", "HR User", "Leave Approver", "Maintenance Manager",
"Maintenance User", "Manufacturing Manager", "Manufacturing User",
"Material Manager", "Material Master Manager", "Material User",
"Partner", "Projects User", "Projects Manager", "Purchase Manager", "Purchase Master Manager",
"Purchase User", "Quality Manager", "Sales Manager",
"Sales Master Manager", "Sales User", "Supplier", "Support Manager",
"Support Team", "Website Manager"]
for r in roles:
doc = webnotes.doc(fielddata = {
"doctype":"Role",
"role_name": r
})
doc.insert()
def post_import():
webnotes.conn.begin()

View File

@ -19,7 +19,7 @@ def make_demo_user():
roles = ["Accounts Manager", "Analytics", "Expense Approver", "Accounts User",
"Leave Approver", "Blogger", "Customer", "Sales Manager", "Employee", "Support Manager",
"HR Manager", "HR User", "Maintenance Manager", "Maintenance User", "Material Manager",
"Material Master Manager", "Material User", "Partner", "Manufacturing Manager",
"Material Master Manager", "Material User", "Manufacturing Manager",
"Manufacturing User", "Projects User", "Purchase Manager", "Purchase Master Manager",
"Purchase User", "Quality Manager", "Report Manager", "Sales Master Manager",
"Sales User", "Supplier", "Support Team"]