From 10c88b88190d537e4893b80a179bedcf8b481e48 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 12 Apr 2014 14:12:16 +0200 Subject: Prepare database initialization script for the new release. --- db_create.py | 16 ++++------------ pyaggr3g470r/models.py | 20 ++++++++++---------- pyaggr3g470r/views.py | 4 ++-- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/db_create.py b/db_create.py index aac3f68c..bd18f1d6 100644 --- a/db_create.py +++ b/db_create.py @@ -2,9 +2,9 @@ # -*- coding: utf-8 -*- __author__ = "Cedric Bonhomme" -__version__ = "$Revision: 0.2 $" +__version__ = "$Revision: 0.3 $" __date__ = "$Date: 2014/03/16 $" -__revision__ = "$Date: 2014/03/24 $" +__revision__ = "$Date: 2014/04/12 $" __copyright__ = "Copyright (c) Cedric Bonhomme" __license__ = "AGPLv3" @@ -60,23 +60,15 @@ def db_DropEverything(db): trans.commit() - - db_DropEverything(db) db.create_all() role_admin = Role(name="admin") role_user = Role(name="user") -user1 = User(firstname="admin", lastname="admin", email="root@pyAggr3g470r.localhost", pwdhash=generate_password_hash("root")) - +user1 = User(firstname="admin", lastname="admin", email="root@pyAggr3g470r.localhost", \ + pwdhash=generate_password_hash("root")) user1.roles.extend([role_admin, role_user]) -feed1 = Feed(title="Armed and Dangerous", description="Sex, software, politics, and firearms. Life's simple pleasures...", - link="http://esr.ibiblio.org/?feed=rss2", site_link="http://esr.ibiblio.org/", - email_notification=False, enabled=True, user_id=user1.id) - -user1.feeds.extend([feed1]) - db.session.add(user1) db.session.commit() \ No newline at end of file diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py index a21cfbfb..52d2ef51 100644 --- a/pyaggr3g470r/models.py +++ b/pyaggr3g470r/models.py @@ -2,27 +2,27 @@ # -*- coding: utf-8 -*- # pyAggr3g470r - A Web based news aggregator. -# Copyright (C) 2010-2013 Cédric Bonhomme - http://cedricbonhomme.org/ +# Copyright (C) 2010-2014 Cédric Bonhomme - http://cedricbonhomme.org/ # -# For more information : http://bitbucket.org/cedricbonhomme/pyaggr3g470r/ +# For more information : https://bitbucket.org/cedricbonhomme/pyaggr3g470r/ # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . __author__ = "Cedric Bonhomme" -__version__ = "$Revision: 0.3 $" +__version__ = "$Revision: 0.4 $" __date__ = "$Date: 2013/11/05 $" -__revision__ = "$Date: 2013/11/16 $" +__revision__ = "$Date: 2014/04/12 $" __copyright__ = "Copyright (c) Cedric Bonhomme" __license__ = "GPLv3" diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index dc8a2b12..c1eeec42 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -20,9 +20,9 @@ # along with this program. If not, see . __author__ = "Cedric Bonhomme" -__version__ = "$Revision: 4.5 $" +__version__ = "$Revision: 4.7 $" __date__ = "$Date: 2010/01/29 $" -__revision__ = "$Date: 2014/02/09 $" +__revision__ = "$Date: 2014/04/12 $" __copyright__ = "Copyright (c) Cedric Bonhomme" __license__ = "AGPLv3" -- cgit