[Refactor] Make the app routes static methods
They don’t use self, so PyLint complains.
This commit is contained in:
		@@ -106,8 +106,9 @@ class CalendarSocialApp(Flask):
 | 
			
		||||
 | 
			
		||||
            self.route(*args, **kwargs)(attr)
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    @route('/')
 | 
			
		||||
    def hello(self):
 | 
			
		||||
    def hello():
 | 
			
		||||
        """View for the main page
 | 
			
		||||
 | 
			
		||||
        This will display a welcome message for users not logged in; for others, their main
 | 
			
		||||
@@ -128,8 +129,9 @@ class CalendarSocialApp(Flask):
 | 
			
		||||
 | 
			
		||||
        return render_template('index.html', calendar=calendar)
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    @route('/register', methods=['POST', 'GET'])
 | 
			
		||||
    def register(self):
 | 
			
		||||
    def register():
 | 
			
		||||
        """View for user registration
 | 
			
		||||
 | 
			
		||||
        If the ``REGISTRATION_FAILED`` configuration value is set to ``True`` it displays the
 | 
			
		||||
@@ -156,9 +158,10 @@ class CalendarSocialApp(Flask):
 | 
			
		||||
 | 
			
		||||
        return render_template('registration.html', form=form)
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    @route('/new-event', methods=['GET', 'POST'])
 | 
			
		||||
    @login_required
 | 
			
		||||
    def new_event(self):
 | 
			
		||||
    def new_event():
 | 
			
		||||
        """View for creating a new event
 | 
			
		||||
 | 
			
		||||
        This presents a form to the user that allows entering event details.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user