Browse Source

Correcting pages id for about and contribute

root 1 year ago
parent
commit
33b502e948
2 changed files with 2 additions and 26 deletions
  1. 2
    2
      app/main/views.py
  2. 0
    24
      migrations/versions/192c6c1600f9_.py

+ 2
- 2
app/main/views.py View File

@@ -67,7 +67,7 @@ def index():
67 67
 @main.route('/about')
68 68
 @partial_content
69 69
 def about():
70
-    page = Page.query.filter_by(name='about').first_or_404()
70
+    page = Page.query.filter_by(id=1).first_or_404()
71 71
     return [ 'displayMain',
72 72
            { "content": render_template("main_pages/about.html",
73 73
                                         page=page) } ]
@@ -76,7 +76,7 @@ def about():
76 76
 @partial_content
77 77
 def contribute():
78 78
     # create a real "contribute" page
79
-    page = Page.query.filter_by(name='contribute').first_or_404()
79
+    page = Page.query.filter_by(id=2).first_or_404()
80 80
     return [ 'displayMain',
81 81
              { "content": render_template("main_pages/contribute.html",
82 82
                                           page=page) } ]

+ 0
- 24
migrations/versions/192c6c1600f9_.py View File

@@ -1,24 +0,0 @@
1
-"""empty message
2
-
3
-Revision ID: 192c6c1600f9
4
-Revises:
5
-Create Date: 2017-11-18 06:23:47.743490
6
-
7
-"""
8
-from alembic import op
9
-import sqlalchemy as sa
10
-
11
-
12
-# revision identifiers, used by Alembic.
13
-revision = '192c6c1600f9'
14
-down_revision = None
15
-branch_labels = None
16
-depends_on = None
17
-
18
-
19
-def upgrade():
20
-
21
-    op.alter_column('blog_items', 'timestamp', existing_type=sa.Date, type_=sa.DateTime)
22
-
23
-def downgrade():
24
-    op.alter_column('blog_items', 'timestamp', existing_type=sa.DateTime, type_=sa.Date)

Loading…
Cancel
Save