Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V0.2 Minification + App compilation directly from appadmin interface …
…(on state tab)
- Loading branch information
Showing
48 changed files
with
229 additions
and
288,925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
|
||
# | ||
# Web2Py Template | ||
# | ||
# Including CSS/JS Minification, logger and other things | ||
# | ||
+------------ Web2Py Template -----------+ | ||
|
||
|
||
### Add JS and CSS files on models/minification.py. | ||
This Web2Py application template include : | ||
|
||
Actually there are : | ||
+++++++++++++ CSS/JS combination/minification + App compilation directly on 'appadmin' | ||
|
||
1# Include all your JS and CSS files in models/extra.py | ||
|
||
js_files = [ | ||
URL('static', 'js/jquery-1.5.2.js'), | ||
URL('static', 'js/main.js') | ||
URL('static', 'js/main.js'), | ||
URL('static', 'js/shit.js') | ||
] | ||
css_files = [ | ||
URL('static', 'css/base.css') | ||
] | ||
|
||
An example of working inclusion is in views/layouts/layout.html : | ||
|
||
{{# Js files are included from db/minification.py }} | ||
{{for _item in js_files or []:}} | ||
<script src="{{=_item}}"></script> | ||
{{pass}} | ||
|
||
{{# Css files}} | ||
{{for _item in css_files:}} | ||
<link rel="stylesheet" href="{{=_item}}"> | ||
{{pass}} | ||
|
||
|
||
### To differenciate a production environ there is an environ variable to set | ||
|
||
export PRODUCTION='True' | ||
2# Then in the view include | ||
{{include 'layouts/js_css_include_from_extra.html'}} | ||
|
||
|
||
+++++++++++++ A new tree organization | ||
|
||
├── models | ||
│ ├── db_conf.py // Configuration Mail + Auth | ||
│ ├── db.py // Distinction between Prod or not (disbling migration & co) | ||
│ ├── db_tables.py // DB models declaration | ||
│ └── extra.py // File to include (JS and CSS) | ||
└── views | ||
├── appadmin.html | ||
├── default | ||
│ └── index.html | ||
├── __init__.py | ||
└── layouts | ||
├── admin_layout.html | ||
├── layout.html | ||
└── web2py_ajax.htm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 10 additions & 18 deletions
28
databases/c8b669d15150d7109e5f7ab36744a5b7_auth_user.table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,30 @@ | ||
(dp1 | ||
S'username' | ||
S'first_name' | ||
p2 | ||
S'CHAR(128)' | ||
p3 | ||
sS'first_name' | ||
sS'last_name' | ||
p4 | ||
S'CHAR(512)' | ||
S'CHAR(128)' | ||
p5 | ||
sS'last_name' | ||
sS'email' | ||
p6 | ||
S'CHAR(512)' | ||
p7 | ||
sS'registration_id' | ||
sS'reset_password_key' | ||
p8 | ||
S'CHAR(512)' | ||
p9 | ||
sS'email' | ||
sS'password' | ||
p10 | ||
S'CHAR(128) UNIQUE' | ||
S'CHAR(512)' | ||
p11 | ||
sS'reset_password_key' | ||
sS'registration_key' | ||
p12 | ||
S'CHAR(512)' | ||
p13 | ||
sS'password' | ||
p14 | ||
S'CHAR(512)' | ||
p15 | ||
sS'registration_key' | ||
p16 | ||
S'CHAR(512)' | ||
p17 | ||
sS'id' | ||
p18 | ||
p14 | ||
S'INTEGER PRIMARY KEY AUTOINCREMENT' | ||
p19 | ||
p15 | ||
s. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.