This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# compatible with python 2.x and 3.x | |
import math | |
import re | |
''' | |
--------------------- Copyright Block ---------------------- | |
praytimes.py: Prayer Times Calculator (ver 2.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from app import db | |
from sqlalchemy import desc, event, func, orm | |
from sqlalchemy.ext.associationproxy import association_proxy | |
from sqlalchemy.ext.declarative import declared_attr | |
from sqlalchemy_utils import ArrowType, auto_delete_orphans | |
from slugify import slugify_unicode | |
tags = db.Table('tag_associations', | |
db.Column('tag_id', db.Integer, db.ForeignKey('tags.id')), | |
db.Column('article_id', db.Integer, db.ForeignKey('articles.id'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "This script will: | |
1) install all modules need to run web2py on Ubuntu/Debian | |
2) install web2py in /home/www-data/ | |
3) create a self signed sll certificate | |
4) setup web2py with mod_wsgi | |
5) overwrite /etc/apache2/sites-available/default | |
6) restart apache. | |
You may want to read this script before running it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from fabric.api import env, require, run, sudo, cd | |
env.project_name = '' | |
env.server_name = '' | |
env.webapps_root = '/opt/webapps/' | |
env.project_root = os.path.join(env.webapps_root, env.project_name) | |
env.activate_script = os.path.join(env.project_root, 'env/bin/activate') | |
env.wsgi_file = os.path.join(env.project_root, 'django.wsgi') |