Skip to content
Snippets Groups Projects
Commit 701b741f authored by Pelle Koster's avatar Pelle Koster
Browse files

Setup Django boilerplate

parent 3325bd4e
Branches
Tags
No related merge requests found
recursive-include stripe_checkout/public *
recursive-include stripe_checkout/templates *
recursive-include stripe_checkout/**/templates/ *
recursive-include stripe_checkout/**/static/ *
.. api intro
API Protocol
Visit API
===============
This module implements a Flask-based webservice which
communicates with clients over HTTP.
Responses to valid requests are returned as JSON messages.
The server will therefore return an error unless
`application/json` is in the `Accept` request header field.
HTTP communication and JSON grammar details are
beyond the scope of this document.
Please refer to [RFC 2616](https://tools.ietf.org/html/rfc2616)
and www.json.org for more details.
.. contents:: :local:
.. automodule:: stripe_checkout.routes
Placeholder for visit API integration docs
stripe_checkout
========================================
This project is a Flask-based webservice serving json-based data, and
a React web application that consumes and renders the json data.
Placeholder for docs
.. toctree::
:maxdepth: 2
:caption: Contents:
......
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "stripe_checkout.settings.dev")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
import os
import click
from stripe_checkout import config
from stripe_checkout.visit import VisitorAPI
from stripe_checkout.stripe_checkout.visit import VisitorAPI
@click.command()
......
......@@ -9,16 +9,16 @@ setup(
url=('TBD'),
packages=find_packages(),
install_requires=[
"django>=5.1",
"dj_database_url==2.3.0", # pin for security
"jsonschema",
"flask",
"flask-cors",
"stripe",
"requests",
"click",
],
entry_points={
"console_scripts": [
"visit=stripe_checkout.visit_cli:cli",
"visit=stripe_checkout.visit.cli:cli",
]
},
include_package_data=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment