[Refactor] Rename the app module to calsocial
Just for clarity
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +1,4 @@ | ||||
| __pycache__/ | ||||
| /app/local.db | ||||
| /calsocial/local.db | ||||
| /messages.pot | ||||
| /app/translations/*/LC_MESSAGES/*.mo | ||||
|   | ||||
| @@ -46,8 +46,8 @@ def template_vars(): | ||||
| 
 | ||||
| class CalendarSocialApp(Flask): | ||||
|     def __init__(self, name, config=None): | ||||
|         from app.models import db, User, Role | ||||
|         from app.security import security | ||||
|         from .models import db, User, Role | ||||
|         from .security import security | ||||
| 
 | ||||
|         Flask.__init__(self, name) | ||||
| 
 | ||||
| @@ -70,7 +70,7 @@ app = CalendarSocialApp(__name__) | ||||
| 
 | ||||
| @app.route('/') | ||||
| def hello(): | ||||
|     from app.calendar_system.gregorian import GregorianCalendar | ||||
|     from .calendar_system.gregorian import GregorianCalendar | ||||
| 
 | ||||
|     if not current_user.is_authenticated: | ||||
|         return render_template('welcome.html') | ||||
| @@ -85,8 +85,8 @@ def register(): | ||||
|     if not current_app.config['REGISTRATION_ENABLED']: | ||||
|         return render_template('registration-disabled.html') | ||||
| 
 | ||||
|     from app.forms import RegistrationForm | ||||
|     from app.models import db, User | ||||
|     from .forms import RegistrationForm | ||||
|     from .models import db, User | ||||
| 
 | ||||
|     form = RegistrationForm() | ||||
| 
 | ||||
| @@ -106,8 +106,8 @@ def register(): | ||||
| @app.route('/new-event', methods=['GET', 'POST']) | ||||
| @login_required | ||||
| def new_event(): | ||||
|     from app.forms import EventForm | ||||
|     from app.models import db, Event | ||||
|     from .forms import EventForm | ||||
|     from .models import db, Event | ||||
| 
 | ||||
|     form = EventForm() | ||||
| 
 | ||||
| @@ -48,7 +48,7 @@ class GregorianCalendar(CalendarSystem): | ||||
|         return day_list | ||||
| 
 | ||||
|     def day_events(self, date, user=None): | ||||
|         from app.models import Event | ||||
|         from ..models import Event | ||||
| 
 | ||||
|         events = Event.query | ||||
| 
 | ||||
| Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B | 
| Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB | 
| Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB | 
| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB | 
| Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |