Permalink
Browse files

Trying a new route configuration

  • Loading branch information...
1 parent 53540f5 commit bb1640c165b6fa62421a786c0b453811e915a5dd @rochacbruno committed Nov 13, 2011
Showing with 51 additions and 7 deletions.
  1. +33 −0 .gitignore~
  2. +18 −7 controllers/default.py
View
@@ -0,0 +1,33 @@
+*.py[co]
+*.table
+*.db
+*.bak
+*.sqlite
+# Packages
+*.egg
+*.egg-info
+dist
+build
+eggs
+errors
+sessions
+cache
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+#*.mo
+
+#Mr Developer
+.mr.developer.cfg
@@ -1,12 +1,14 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-from movuca import Access, DataBase
-from datamodel.article import Article, ContentType
-db = DataBase()
-auth = Access(db)
-content_type = ContentType(db)
-article = Article(db)
+# from movuca import Access, DataBase
+# from datamodel.article import Article, ContentType
+# db = DataBase()
+# auth = Access(db)
+# content_type = ContentType(db)
+# article = Article(db)
+from gluon.tools import Auth
+auth = Auth(DAL(None))
@auth.requires_login()
@@ -15,11 +17,20 @@ def index():
def articles():
+ from movuca import Access, DataBase
+ from datamodel.article import Article, ContentType
+ db = DataBase()
+ Access(db)
+ ContentType(db)
+ article = Article(db)
return SQLFORM(article.entity, formstyle='divs').process()
def user():
- return dict(form=auth())
+ from movuca import Access, DataBase
+ db = DataBase()
+ access = Access(db)
+ return dict(form=access())
def download():

0 comments on commit bb1640c

Please sign in to comment.