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
{% extends 'base.html' %} | |
{% block title %}Contact{% endblock %} | |
{% load crispy_forms_tags %} | |
{% block content %} | |
<div class='row contact'> | |
<div class='col-md-4'></div> | |
<div class='col-md-4'> | |
{% crispy_form %} | |
</div> | |
<div class='col-md-4'></div> |
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 scrapy.spider import Spider | |
from scrapy.http import Request | |
from scrapy.selector import Selector | |
class CampUSA(Spider): | |
""" | |
This spider iterates through the list of states on the homepage, and plunges into each one. It then blindly clicks search to bring up ALL results for that state. | |
""" | |
name = 'camp' |
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
@app.route('/create_user', methods=['GET', 'POST']) | |
def create_user(): | |
form = UserForm(request.form) | |
if request.method == 'POST' and form.validate(): | |
#to add: make sure stripe was a success | |
if User.query.filter_by(email = form.email).first() == None: | |
user = user_datastore.create_user(email=form.email.data, | |
password=encrypt_password(form.password.data), | |
active=True, | |
confirmed_at=datetime.date.today()) |
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
roles_users = db.Table('roles_users', | |
db.Column('user_id', db.Integer(), db.ForeignKey('user.id')), | |
db.Column('role_id', db.Integer(), db.ForeignKey('role.id'))) | |
class Role(db.Model, RoleMixin): | |
""" | |
Roles for determining User permissions and access levels. | |
Permission table: | |
Purchase Roverpass - Upload images, Leave Review | |
Claim Campsite - Edit page, Upload, Leave Review |
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 kickstart import * | |
from flask import Flask, render_template, make_response, request, redirect | |
from flask.ext.sqlalchemy import SQLAlchemy | |
import stripe, oauthlib, requests, psycopg2 | |
from campModels import * | |
from userModels import * | |
from userForms import * | |
import datetime | |
import json |
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
<button id="open-modal" func="camgpround/{{campground.slug}}/leave_review" class="btn btn-primary btn-style btn-md" data-target="#myModal">Leave Review</button> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>squares</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="snap.min.js"></script> | |
<script src='draw.js'></script> | |
<link rel="stylesheet" type="text/css" href="master.css"> | |
</head> | |
<body> |
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 flask import Flask, jsonify, session, request | |
#set other things |
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
#foreign imports | |
from flask import Flask | |
#domestic imports | |
from modules.users import users, app_security, principals, login_manager, mail, user_datastore | |
from modules.homes import homes | |
from modules.admin import admin | |
from modules.the_db import db | |
""" | |
This file is the master configuration file. |
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
[Fri Oct 24 13:50:32.914645 2014] [:error] [pid 20811:tid 139788392834816] [client 216.188.250.215:59861] ImportError: /var/www/homeopcost/homeopcost/env/lib/python2.7/site-packages/psycopg2/_psycopg.so: invalid ELF header, referer: http://THE IP/create_user |
OlderNewer