Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stuff, dog.

  • Loading branch information...
commit 3af4f1da71fbe8e4d37f1cb9d497bf449d9c8ab8 1 parent 0651b37
@Lambdanaut authored
Showing with 16 additions and 8 deletions.
  1. +1 −1  config.py
  2. +11 −6 models.py
  3. +4 −1 server.py
View
2  config.py
@@ -28,7 +28,7 @@
MY_EMAIL = "catguiceshop@gmail.com"
# Paypal Account Information
-PAYPAL_EMAIL = ""
+PAYPAL_EMAIL = "josh_1341779572_biz_api1.gigbureau.com"
# If this is set to True, then the server will set a few configuration options that make development easier.
# Set this to False when you're running the website in production mode.
View
17 models.py
@@ -1,6 +1,7 @@
import pymongo
import util
+
class Categories:
def __init__ (self, db):
self.db = db.db
@@ -15,10 +16,10 @@ def get_one (self, series = {}):
def insert (self, data):
if "name" in data and not "slug" in data:
data["slug"] = util.slugify(data["name"])
- self.categories.insert(data)
+ return self.categories.insert(data)
def update (self, series, data):
- self.categories.update(series, data)
+ return self.categories.update(series, data)
class Products:
def __init__ (self, db):
@@ -34,10 +35,14 @@ def get_one (self, series = {}):
def insert (self, data):
if "name" in data and not "slug" in data:
data["slug"] = util.slugify(data["name"])
- self.products.insert(data)
+ return self.products.insert(data)
def update (self, series, data):
- self.products.update(series, data)
+ return self.products.update(series, data)
+
+class Payments:
+ def __init__ (self, paypal):
+ self.paypal = paypal
class Stats:
def __init__ (self, db):
@@ -51,7 +56,7 @@ def get_one (self, series = {}):
return self.stats.find_one(series)
def insert (self, data):
- self.stats.insert(data)
+ return self.stats.insert(data)
def update (self, series, data):
- self.stats.update(series, data)
+ return self.stats.update(series, data)
View
5 server.py
@@ -1,11 +1,11 @@
from flask import *
+import pymongo
import os
import config
import forms
import models
-import pymongo
import util
try:
@@ -30,6 +30,9 @@
products_model = models.Products(db)
categories_model = models.Categories(db)
+# Payment
+payment_con = paypal.PayPalInterface(API_USERNAME=config.PAYPAL_EMAIL, API_PASSWORD="1341779596")
+
def main():
app.run(host=config.HOST,port=config.PORT,debug=config.DEVELOPMENT)
Please sign in to comment.
Something went wrong with that request. Please try again.