This Flask application drives the Share a Sunshine website and ecommerce functionality. It uses Stripe to enable payment processing, and Bootstrap for the visual grid and reponsive layout in addition to JS functionality. Bourbon is used for CSS3 mixins.
This application is laid out using the following conventions:
forms.py
: Contains the "share" form and authentication form for reporting accessmodels.py
: Contains the database models for CouponCodes, Products, Purchases, Users, Testimonials and Messagesviews.py
: Contains the view logic for the homepage, payment processing, thanks, terms and error pages as well as admin access for reportingconfig.py
: Contains app configuration informationutil/assets.py
: Contains the asset minifaction directives for CSS and JS filesrunserver.py
: Is used in development to fire up the development server (not used in production)__init__.py
: Fires the actual app for production use, and also contains error logging/reporting functions
Templates are the templates
directory, and static files (js, css, images) are the the static
directory.
All requirements are contained in the requirements.txt
file.
Application errors are logged in a log file and are emailed to the admin set in the config file.