#!/usr/bin/python3 # # Makes the index page # # @author Brian Hession # @email [email protected] # from env import * import sshttp try: import sessions, sshtml loggedin = sessions.session_is_valid() DATA = """<p>Simple solution to annoying secret santa target assignments. Ensures no one knows any other person's target.</p> <p><h2>Future Plans</h2></p> <p><h3>Groups</h3></p> <ul> <li>Group administrators</li> <li>Group privacy tools</li> <li>Restricted target viewing</li> </ul> <p><h3>Allow Target Assignment Rules</h3></p> <ul> <li>Household exclusion</li> <li>Location exclusions</li> <li>Age matching</li> </ul> <p><h3>Registries</h3></p>
#!/usr/bin/python3 # # Makes the index page # # @author Brian Hession # @email [email protected] # from env import * import sshttp try: import sessions, sshtml, userstable if sessions.session_is_valid(): DATA = """<h1>Welcome, {}!</h1> <p align="center">Your email: {}</p> <p align="center"><a href="{}">change name</a> | <a href="{}">change password</a></p> <p align="center"><a href="/signout.py"><br/>Sign out</a></p>""" ASIDE = """<h2>What is it?</h2> <p>Secret santa registration and group planner.</p> <h2 style="margin-top: 15px;">How does it work?</h2> <p>Create a group now and invite your friends!</p>""" MOBILE = '<p align="center"><br/><button><a href="{}">Create Group Now</a></button></p>'.format( sshttp.build_redirect_uri('/getacc.py', '/groupctl.py?creategroup=1')) user = sessions.get_user() DATA = DATA.format( userstable.USERS_SCHEMA.get(user, 'name'), userstable.USERS_SCHEMA.get(user, 'email'),