[Refactor] Rename the app module to calsocial

Just for clarity
This commit is contained in:
Gergely Polonkai 2018-07-02 08:33:21 +02:00
parent 6b3d36ff21
commit 7846d9017d
23 changed files with 9 additions and 9 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
__pycache__/ __pycache__/
/app/local.db /calsocial/local.db
/messages.pot /messages.pot
/app/translations/*/LC_MESSAGES/*.mo /app/translations/*/LC_MESSAGES/*.mo

View File

@ -46,8 +46,8 @@ def template_vars():
class CalendarSocialApp(Flask): class CalendarSocialApp(Flask):
def __init__(self, name, config=None): def __init__(self, name, config=None):
from app.models import db, User, Role from .models import db, User, Role
from app.security import security from .security import security
Flask.__init__(self, name) Flask.__init__(self, name)
@ -70,7 +70,7 @@ app = CalendarSocialApp(__name__)
@app.route('/') @app.route('/')
def hello(): def hello():
from app.calendar_system.gregorian import GregorianCalendar from .calendar_system.gregorian import GregorianCalendar
if not current_user.is_authenticated: if not current_user.is_authenticated:
return render_template('welcome.html') return render_template('welcome.html')
@ -85,8 +85,8 @@ def register():
if not current_app.config['REGISTRATION_ENABLED']: if not current_app.config['REGISTRATION_ENABLED']:
return render_template('registration-disabled.html') return render_template('registration-disabled.html')
from app.forms import RegistrationForm from .forms import RegistrationForm
from app.models import db, User from .models import db, User
form = RegistrationForm() form = RegistrationForm()
@ -106,8 +106,8 @@ def register():
@app.route('/new-event', methods=['GET', 'POST']) @app.route('/new-event', methods=['GET', 'POST'])
@login_required @login_required
def new_event(): def new_event():
from app.forms import EventForm from .forms import EventForm
from app.models import db, Event from .models import db, Event
form = EventForm() form = EventForm()

View File

@ -48,7 +48,7 @@ class GregorianCalendar(CalendarSystem):
return day_list return day_list
def day_events(self, date, user=None): def day_events(self, date, user=None):
from app.models import Event from ..models import Event
events = Event.query events = Event.query

View File

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB