Module Import alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Str decorator_list FunctionDef arguments args NameParam defaults NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str handlers ExceptHandler body Pass If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad ClassDef bases AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str keyword Call AttributeLoad NameLoad attr Str keyword Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str decorator_list Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr CompareEq AttributeLoad NameLoad attr Str attr body Assign NameStore Call NameLoad keyword Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword Str keyword Str keyword Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args defaults body Return Call NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Return Call NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str NameLoad FunctionDef arguments args defaults body Return Call NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str Call NameLoad Str ListLoad Str Str Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Num keyword NameLoad
N/A N/A os flask Flask render_template_string request flask_mail Mail flask_sqlalchemy SQLAlchemy flask_user login_required SQLAlchemyAdapter UserManager UserMixin flask_user roles_required ConfigClass N/A object N/A N/A SECRET_KEY N/A N/A os getenv SECRET_KEY THIS IS AN INSECURE SECRET N/A SQLALCHEMY_DATABASE_URI N/A N/A os getenv DATABASE_URL sqlite:///single_file_app.sqlite N/A CSRF_ENABLED True N/A MAIL_USERNAME N/A N/A os getenv MAIL_USERNAME email@example.com N/A MAIL_PASSWORD N/A N/A os getenv MAIL_PASSWORD password N/A MAIL_DEFAULT_SENDER N/A N/A os getenv MAIL_DEFAULT_SENDER "MyApp" <noreply@example.com> N/A MAIL_SERVER N/A N/A os getenv MAIL_SERVER smtp.gmail.com N/A MAIL_PORT N/A int N/A N/A os getenv MAIL_PORT 465 N/A MAIL_USE_SSL N/A int N/A N/A os getenv MAIL_USE_SSL True N/A USER_APP_NAME AppName N/A create_app N/A N/A test_config N/A None N/A N/A app N/A Flask __name__ N/A N/A N/A N/A app config from_object N/A __name__ .ConfigClass N/A N/A N/A N/A N/A N/A app config from_object local_settings N/A N/A N/A N/A N/A test_config N/A N/A N/A N/A N/A app config update test_config N/A mail N/A Mail app N/A db N/A SQLAlchemy app User N/A N/A db Model UserMixin N/A N/A id N/A N/A db Column N/A db Integer primary_key True N/A user_profile_id N/A N/A db Column N/A N/A db Integer N/A N/A db ForeignKey user_profile.id ondelete CASCADE N/A username N/A N/A db Column N/A N/A db String 50 nullable False unique True N/A password N/A N/A db Column N/A N/A db String 255 nullable False server_default N/A reset_password_token N/A N/A db Column N/A N/A db String 100 nullable False server_default N/A active N/A N/A db Column is_active N/A N/A db Boolean nullable False server_default 0 N/A email N/A N/A db Column N/A N/A db String 255 nullable False unique True N/A confirmed_at N/A N/A db Column N/A N/A db DateTime N/A user_profile N/A N/A db relationship UserProfile uselist False foreign_keys N/A user_profile_id N/A UserProfile N/A N/A db Model N/A N/A id N/A N/A db Column N/A db Integer primary_key True N/A first_name N/A N/A db Column N/A N/A db String 50 nullable False default N/A last_name N/A N/A db Column N/A N/A db String 50 nullable False default N/A roles N/A N/A db relationship Role secondary user_roles backref N/A N/A db backref users lazy dynamic N/A Role N/A N/A db Model N/A N/A id N/A N/A db Column N/A N/A db Integer primary_key True N/A name N/A N/A db Column N/A N/A db String 50 unique True N/A UserRoles N/A N/A db Model N/A N/A id N/A N/A db Column N/A N/A db Integer primary_key True N/A user_profile_id N/A N/A db Column N/A N/A db Integer N/A N/A db ForeignKey user_profile.id ondelete CASCADE N/A role_id N/A N/A db Column N/A N/A db Integer N/A N/A db ForeignKey role.id ondelete CASCADE N/A N/A N/A N/A db create_all N/A db_adapter N/A SQLAlchemyAdapter db User UserProfileClass UserProfile N/A user_manager N/A UserManager db_adapter app N/A N/A N/A N/A N/A N/A N/A User query filter N/A N/A User username user007 first N/A N/A user_profile1 N/A UserProfile first_name James last_name Bond N/A N/A N/A N/A db session add user_profile1 N/A user1 N/A User user_profile user_profile1 username user007 email user007@example.com password N/A N/A user_manager hash_password Password1 active True N/A N/A N/A N/A db session add user1 N/A N/A N/A N/A user_profile1 roles append N/A Role name secret N/A N/A N/A N/A user_profile1 roles append N/A Role name agent N/A N/A N/A N/A db session commit home_page N/A N/A N/A N/A N/A N/A render_template_string 
            {% extends "base.html" %}
            {% block content %}
                <h2>Home page</h2>
                <p>This page can be accessed by anyone.</p><br/>
                <p><a href={{ url_for('home_page') }}>Home page</a> (anyone)</p>
                <p><a href={{ url_for('members_page') }}>Members page</a> (login required)</p>
                <p><a href={{ url_for('special_page') }}>Special page</a> (login with username 'user007' and password 'Password1')</p>
            {% endblock %}
             N/A N/A N/A app route / members_page N/A N/A N/A N/A N/A N/A render_template_string 
            {% extends "base.html" %}
            {% block content %}
                <h2>Members page</h2>
                <p>This page can only be accessed by authenticated users.</p><br/>
                <p><a href={{ url_for('home_page') }}>Home page</a> (anyone)</p>
                <p><a href={{ url_for('members_page') }}>Members page</a> (login required)</p>
                <p><a href={{ url_for('special_page') }}>Special page</a> (login with username 'user007' and password 'Password1')</p>
            {% endblock %}
             N/A N/A N/A app route /members login_required special_page N/A N/A N/A N/A N/A N/A render_template_string 
            {% extends "base.html" %}
            {% block content %}
                <h2>Special Page</h2>
                <p>This page can only be accessed by user007.</p><br/>
                <p><a href={{ url_for('home_page') }}>Home page</a> (anyone)</p>
                <p><a href={{ url_for('members_page') }}>Members page</a> (login required)</p>
                <p><a href={{ url_for('special_page') }}>Special page</a> (login with username 'user007' and password 'Password1')</p>
            {% endblock %}
             N/A N/A N/A app route /special N/A roles_required secret N/A sauce agent N/A app N/A N/A N/A __name__ __main__ N/A N/A app N/A create_app N/A N/A N/A app run host 0.0.0.0 port 5000 debug True