[Hejes-devel] [954] - blog: added ordering for category names
hejes-devel at nytud.hu
hejes-devel at nytud.hu
Wed Sep 25 15:07:56 CEST 2013
Revision: 954
Author: mihaltz
Date: 2013-09-25 15:07:56 +0200 (Wed, 25 Sep 2013)
Log Message:
-----------
- blog: added ordering for category names
- blog: created css rule for "-----" formatting element in MARKMIN (".blog-body blockquote")
Modified Paths:
--------------
trunk/web2py/applications/helyesiras_webdev/controllers/blog.py
trunk/web2py/applications/helyesiras_webdev/databases/blog_categories.table
trunk/web2py/applications/helyesiras_webdev/databases/sql.log
trunk/web2py/applications/helyesiras_webdev/databases/storage.sqlite
trunk/web2py/applications/helyesiras_webdev/languages/hu-hu.py
trunk/web2py/applications/helyesiras_webdev/models/dbblog.py
trunk/web2py/applications/helyesiras_webdev/progress.log
trunk/web2py/applications/helyesiras_webdev/static/css/main.css
trunk/web2py/applications/helyesiras_webdev/views/blog/show.html
Modified: trunk/web2py/applications/helyesiras_webdev/controllers/blog.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/controllers/blog.py 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/controllers/blog.py 2013-09-25 13:07:56 UTC (rev 954)
@@ -26,7 +26,7 @@
"""
try:
# all categories & tags for sidebar
- cats = dbblog().select(dbblog.categories.ALL, orderby=dbblog.categories.id)
+ cats = dbblog().select(dbblog.categories.ALL, orderby=dbblog.categories.ordering)
tags = dbblog().select(dbblog.tags.ALL, orderby=dbblog.tags.name)
# assemble query: posts filtered by category or tag specified via args
query = dbblog.posts.category == dbblog.categories.id
@@ -66,7 +66,7 @@
tags: Rows object with all tag names and ids (for sidebar)
"""
try:
- cats = dbblog().select(dbblog.categories.ALL, orderby=dbblog.categories.id)
+ cats = dbblog().select(dbblog.categories.ALL, orderby=dbblog.categories.ordering)
tags = dbblog().select(dbblog.tags.ALL, orderby=dbblog.tags.name)
slug = request.args(0)
if slug == None: # no arg: redirect to index
@@ -132,5 +132,3 @@
items.append(dict(title=d.entries[i].get('title', '(notitle)'), link=d.entries[i].get('link', 'http://nyest.hu')))
#return dict(feed=items) # uncomment for use case 1
return DIV( *[P( A( x['title'], _href=x['link'], _target='_blank')) for x in items] ) # uncomment for use case 2
-
-
Modified: trunk/web2py/applications/helyesiras_webdev/databases/blog_categories.table
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/databases/blog_categories.table 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/databases/blog_categories.table 2013-09-25 13:07:56 UTC (rev 954)
@@ -1,5 +1,5 @@
(dp1
-S'id'
+S'ordering'
p2
(dp3
S'length'
@@ -7,35 +7,59 @@
I255
sS'unique'
p5
-I00
+I01
sS'sortable'
p6
-I1
+I2
sS'sql'
p7
-S'INT AUTO_INCREMENT NOT NULL'
+S'INT UNIQUE'
p8
sS'notnull'
p9
I00
sS'type'
p10
-g2
-ssS'name'
+S'integer'
p11
-(dp12
-g4
+ssS'id'
+p12
+(dp13
+S'sortable'
+p14
+I1
+sS'sql'
+p15
+S'INT AUTO_INCREMENT NOT NULL'
+p16
+sS'length'
+p17
I255
-sg5
-I01
-sg6
+sS'notnull'
+p18
+I00
+sS'unique'
+p19
+I00
+sS'type'
+p20
+S'id'
+p21
+ssS'name'
+p22
+(dp23
+g14
I2
-sg7
+sg15
S'VARCHAR(255) UNIQUE'
-p13
-sg9
+p24
+sg17
+I255
+sg18
I00
-sg10
+sg19
+I01
+sg20
S'string'
-p14
+p25
ss.
\ No newline at end of file
Modified: trunk/web2py/applications/helyesiras_webdev/databases/sql.log
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/databases/sql.log 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/databases/sql.log 2013-09-25 13:07:56 UTC (rev 954)
@@ -111,3 +111,22 @@
timestamp: 2013-09-24T15:50:40.541866
ALTER TABLE posts ADD author VARCHAR(255);
success!
+timestamp: 2013-09-25T12:34:15.625534
+ALTER TABLE categories ADD order INT UNIQUE;
+timestamp: 2013-09-25T12:39:06.961787
+ALTER TABLE categories ADD order INT UNIQUE;
+timestamp: 2013-09-25T12:39:16.302623
+ALTER TABLE categories ADD order INT UNIQUE;
+timestamp: 2013-09-25T12:40:23.211318
+ALTER TABLE categories ADD order INT;
+timestamp: 2013-09-25T12:40:44.778515
+ALTER TABLE categories ADD order INT;
+timestamp: 2013-09-25T12:42:28.381076
+ALTER TABLE categories ADD order VARCHAR(255) UNIQUE;
+timestamp: 2013-09-25T12:43:19.150273
+ALTER TABLE categories ADD order INT;
+timestamp: 2013-09-25T12:44:09.087955
+ALTER TABLE categories ADD order VARCHAR(255);
+timestamp: 2013-09-25T12:45:20.083338
+ALTER TABLE categories ADD ordering INT UNIQUE;
+success!
Modified: trunk/web2py/applications/helyesiras_webdev/databases/storage.sqlite
===================================================================
(Binary files differ)
Modified: trunk/web2py/applications/helyesiras_webdev/languages/hu-hu.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/languages/hu-hu.py 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/languages/hu-hu.py 2013-09-25 13:07:56 UTC (rev 954)
@@ -1,37 +1,55 @@
# coding: utf8
{
+'!=': '!=',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
+'%(nrows)s records found': '%(nrows)s records found',
'%s rows deleted': '%s sorok törlődtek',
'%s rows updated': '%s sorok frissítődtek',
'%Y-%m-%d': '%Y.%m.%d.',
'%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S',
+'<': '<',
+'<=': '<=',
+'=': '=',
+'>': '>',
+'>=': '>=',
'[Belső linkek]': '[Belső linkek]',
'ABC-be rendezés': 'ABC-be rendezés',
'About': 'About',
'Access Control': 'Access Control',
+'Add': 'Add',
'Admin felület': 'Admin felület',
'Administrative interface': 'az adminisztrációs felületért kattints ide',
'Ajax Recipes': 'Ajax Recipes',
'AKH': 'AKH',
'AkH': 'AkH',
+'And': 'And',
'appadmin is disabled because insecure channel': 'az appadmin a biztonságtalan csatorna miatt letiltva',
'Archívum': 'Archívum',
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
+'Author': 'Author',
'Available databases and tables': 'Elérhető adatbázisok és táblák',
'Az oldalról': 'Az oldalról',
+'Back': 'Back',
'Beépítés': 'Beépítés',
'Blog': 'Blog',
+'Body': 'Body',
'Buy this book': 'Buy this book',
'cache': 'gyorsítótár',
'Cannot be empty': 'Nem lehet üres',
+'Category': 'Category',
'change password': 'jelszó megváltoztatása',
'Check to delete': 'Törléshez válaszd ki',
+'Clear': 'Clear',
'Client IP': 'Client IP',
+'Close': 'Close',
'Community': 'Community',
+'contains': 'contains',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Created By': 'Created By',
'Created On': 'Created On',
+'CSV': 'CSV',
+'CSV (hidden cols)': 'CSV (hidden cols)',
'Current request': 'Jelenlegi lekérdezés',
'Current response': 'Jelenlegi válasz',
'Current session': 'Jelenlegi folyamat',
@@ -42,6 +60,7 @@
'database %s select': 'adatbázis %s kiválasztás',
'db': 'db',
'DB Model': 'DB Model',
+'Delete': 'Delete',
'Delete:': 'Töröl:',
'Demo': 'Demo',
'Deployment Recipes': 'Deployment Recipes',
@@ -61,6 +80,7 @@
'Errors': 'Errors',
'Eszközök': 'Eszközök',
'export as csv file': 'exportál csv fájlba',
+'Export:': 'Export:',
'FAQ': 'FAQ',
'First name': 'First name',
'Forms and Validators': 'Forms and Validators',
@@ -74,7 +94,11 @@
'Helyesírási Tanácsadó Szolgálat': 'Helyesírási Tanácsadó Szolgálat',
'Hogyan működik?': 'Hogyan működik?',
'Home': 'Home',
+'HTML': 'HTML',
+'Id': 'Id',
+'Image Filename': 'Image Filename',
'Import/Export': 'Import/Export',
+'in': 'in',
'Index': 'Index',
'insert new': 'új beillesztése',
'insert new %s': 'új beillesztése %s',
@@ -84,6 +108,7 @@
'Invalid Query': 'Hibás lekérdezés',
'invalid request': 'hibás kérés',
'Is Active': 'Is Active',
+'JSON': 'JSON',
'Kapcsolat': 'Kapcsolat',
'Kezdőoldal': 'Kezdőoldal',
'Kik készítették?': 'Kik készítették?',
@@ -97,6 +122,7 @@
'Layouts': 'Layouts',
'Live chat': 'Live chat',
'located in the file': 'located in the file',
+'Logged in': 'Logged in',
'login': 'belép',
'Login': 'Login',
'logout': 'kilép',
@@ -108,14 +134,17 @@
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
+'New': 'New',
'New Record': 'Új bejegyzés',
'new record inserted': 'új bejegyzés felvéve',
'next 100 rows': 'következő 100 sor',
'No databases in this application': 'Nincs adatbázis ebben az alkalmazásban',
+'not in': 'not in',
'Nyitóoldal': 'Nyitóoldal',
'Névkereső': 'Névkereső',
'Object or table name': 'Object or table name',
'Online examples': 'online példákért kattints ide',
+'Or': 'Or',
'or import from csv file': 'vagy betöltés csv fájlból',
'Origin': 'Origin',
'Other Recipes': 'Other Recipes',
@@ -143,11 +172,15 @@
'Role': 'Role',
'Rows in table': 'Sorok a táblában',
'Rows selected': 'Kiválasztott sorok',
+'Search': 'Search',
'selected': 'kiválasztott',
'Semantic': 'Semantic',
'Services': 'Services',
+'Slug': 'Slug',
+'starts with': 'starts with',
'state': 'állapot',
'Stylesheet': 'Stylesheet',
+'Submit': 'Submit',
'Support': 'Support',
'Sure you want to delete this object?': 'Biztos törli ezt az objektumot?',
'Számok': 'Számok',
@@ -160,6 +193,9 @@
'The Views': 'The Views',
'This App': 'This App',
'Timestamp': 'Timestamp',
+'Title': 'Title',
+'TSV (Excel compatible)': 'TSV (Excel compatible)',
+'TSV (Excel compatible, hidden cols)': 'TSV (Excel compatible, hidden cols)',
'Twitter': 'Twitter',
'unable to parse csv file': 'nem lehet a csv fájlt beolvasni',
'Update:': 'Frissít:',
@@ -175,6 +211,7 @@
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'Which called the function': 'Which called the function',
+'XML': 'XML',
'You visited the url': 'You visited the url',
'Ábécébe rendezés': 'Ábécébe rendezés',
}
Modified: trunk/web2py/applications/helyesiras_webdev/models/dbblog.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/models/dbblog.py 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/models/dbblog.py 2013-09-25 13:07:56 UTC (rev 954)
@@ -105,6 +105,7 @@
)
dbblog.define_table('categories',
+ Field('ordering', 'integer', unique=True),
Field('name', unique=True),
format = '%(name)s',
migrate='blog_categories.table'
@@ -142,4 +143,3 @@
# make sure everything gets thru (?)
dbblog.commit()
-
Modified: trunk/web2py/applications/helyesiras_webdev/progress.log
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/progress.log 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/progress.log 2013-09-25 13:07:56 UTC (rev 954)
@@ -847,3 +847,22 @@
[2013-09-24 16:14:37] EDIT helyesiras_webdev/views/blog/manage.html: 0
[2013-09-24 16:15:11] EDIT helyesiras_webdev/views/blog/manage.html: -1
[2013-09-24 16:16:00] EDIT helyesiras_webdev/views/blog/manage.html: 0
+[2013-09-24 16:30:00] EDIT helyesiras_webdev/models/db.py: 1
+[2013-09-24 16:36:04] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-09-24 16:36:11] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-09-24 16:36:38] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-09-24 16:36:55] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-09-24 16:46:06] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/futas.jpg: 226
+[2013-09-24 16:49:28] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/orul.gif: 2695
+[2013-09-24 19:15:00] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/regitoll.jpg: 1626
+[2013-09-24 19:17:00] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/kender.jpg: 138
+[2013-09-24 19:38:36] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/generaciok.jpg: 22
+[2013-09-24 19:53:58] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/uralkodo.jpg: 974
+[2013-09-24 23:35:28] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/fejlodes.gif: 36
+[2013-09-25 12:30:00] EDIT helyesiras_webdev/models/dbblog.py: 0
+[2013-09-25 12:33:24] EDIT helyesiras_webdev/models/dbblog.py: 1
+[2013-09-25 12:33:46] EDIT helyesiras_webdev/models/dbblog.py: 0
+[2013-09-25 12:50:10] EDIT helyesiras_webdev/models/dbblog.py: 0
+[2013-09-25 12:50:34] EDIT helyesiras_webdev/controllers/blog.py: 0
+[2013-09-25 12:50:46] EDIT helyesiras_webdev/controllers/blog.py: 0
+[2013-09-25 14:31:20] EDIT helyesiras_webdev/views/blog/show.html: 0
Modified: trunk/web2py/applications/helyesiras_webdev/static/css/main.css
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/static/css/main.css 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/static/css/main.css 2013-09-25 13:07:56 UTC (rev 954)
@@ -1847,6 +1847,11 @@
margin: 0 10px 8px 0;
}
+.blog-body blockquote {
+ margin: 5px 0;
+ padding: 5px;
+ background-color: #DDDDDD;
+}
.blog-comments {}
.blog-comments h5 {
Modified: trunk/web2py/applications/helyesiras_webdev/views/blog/show.html
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/views/blog/show.html 2013-09-24 15:44:42 UTC (rev 953)
+++ trunk/web2py/applications/helyesiras_webdev/views/blog/show.html 2013-09-25 13:07:56 UTC (rev 954)
@@ -58,7 +58,7 @@
})();
</script>
</div>
-<div>
+<div class="blog-body">
<img src="{{=URL('static', 'blog/' + post.posts.image_filename)}}" width=100 height=100 class="blog-index-image" />
{{=MARKMIN(post.posts.body)}}
</div>
More information about the Hejes-devel
mailing list