From 8c1b29bd8b973d12b1c17e28a1077f16c92366f7 Mon Sep 17 00:00:00 2001 From: Alexander Kavanaugh Date: Mon, 13 Jun 2016 06:18:43 +0000 Subject: [PATCH] fixed all docs for repo transfer --- CONTRIBUTING.rst | 6 +-- README.rst | 20 +++---- djstripe/__init__.py | 12 ++--- djstripe/admin.py | 4 -- djstripe/settings.py | 3 -- docs/conf.py | 96 +++++++++++++++++----------------- docs/cookbook.rst | 2 +- docs/index.rst | 1 - docs/migrating_to_djstripe.rst | 69 ------------------------ docs/usage.rst | 2 +- setup.py | 4 +- 11 files changed, 71 insertions(+), 148 deletions(-) delete mode 100644 docs/migrating_to_djstripe.rst diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 00c26168b5..aa52237c85 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -13,7 +13,7 @@ Types of Contributions Report Bugs ~~~~~~~~~~~ -Report bugs at https://github.com/pydanny/dj-stripe/issues. +Report bugs at https://github.com/kavdev/dj-stripe/issues. If you are reporting a bug, please include: @@ -42,7 +42,7 @@ articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ -The best way to send feedback is to file an issue at https://github.com/pydanny/dj-stripe/issues. +The best way to send feedback is to file an issue at https://github.com/kavdev/dj-stripe/issues. If you are proposing a feature: @@ -105,5 +105,5 @@ Before you submit a pull request, check that it meets these guidelines: your new functionality into a function with a docstring. 4. If the pull request makes changes to a model, include Django migrations (Django 1.7+). 5. The pull request should work for Python 2.7 and 3.4. Check - https://travis-ci.org/pydanny/dj-stripe/pull_requests + https://travis-ci.org/kavdev/dj-stripe/pull_requests and make sure that the tests pass for all supported Python versions. diff --git a/README.rst b/README.rst index 1dcfa0d3bd..25d4ec7a09 100644 --- a/README.rst +++ b/README.rst @@ -6,12 +6,12 @@ Django + Stripe Made Easy Badges ------ -.. image:: https://img.shields.io/travis/pydanny/dj-stripe/master.svg?style=flat-square - :target: https://travis-ci.org/pydanny/dj-stripe -.. image:: https://img.shields.io/codecov/c/github/pydanny/dj-stripe/master.svg?style=flat-square - :target: http://codecov.io/github/pydanny/dj-stripe?branch=master -.. image:: https://img.shields.io/requires/github/pydanny/dj-stripe.svg?style=flat-square - :target: https://requires.io/github/pydanny/dj-stripe/requirements/?branch=master +.. image:: https://img.shields.io/travis/kavdev/dj-stripe/master.svg?style=flat-square + :target: https://travis-ci.org/kavdev/dj-stripe +.. image:: https://img.shields.io/codecov/c/github/kavdev/dj-stripe/master.svg?style=flat-square + :target: http://codecov.io/github/kavdev/dj-stripe?branch=master +.. image:: https://img.shields.io/requires/github/kavdev/dj-stripe.svg?style=flat-square + :target: https://requires.io/github/kavdev/dj-stripe/requirements/?branch=master .. image:: https://img.shields.io/codacy/3c99e13eda1c4dea9f993b362e4ea816.svg?style=flat-square :target: https://www.codacy.com/app/kavanaugh-development/dj-stripe/dashboard @@ -20,10 +20,10 @@ Badges .. image:: https://img.shields.io/pypi/dw/dj-stripe.svg?style=flat-square :target: https://pypi.python.org/pypi/dj-stripe -.. image:: https://img.shields.io/github/issues/pydanny/dj-stripe.svg?style=flat-square - :target: https://github.com/pydanny/dj-stripe/issues -.. image:: https://img.shields.io/github/license/pydanny/dj-stripe.svg?style=flat-square - :target: https://github.com/pydanny/dj-stripe/blob/master/LICENSE +.. image:: https://img.shields.io/github/issues/kavdev/dj-stripe.svg?style=flat-square + :target: https://github.com/kavdev/dj-stripe/issues +.. image:: https://img.shields.io/github/license/kavdev/dj-stripe.svg?style=flat-square + :target: https://github.com/kavdev/dj-stripe/blob/master/LICENSE Documentation diff --git a/djstripe/__init__.py b/djstripe/__init__.py index 64f242395d..bbc2746154 100644 --- a/djstripe/__init__.py +++ b/djstripe/__init__.py @@ -5,19 +5,19 @@ __title__ = "dj-stripe" __summary__ = "Django + Stripe Made Easy" -__uri__ = "https://github.com/pydanny/dj-stripe/" +__uri__ = "https://github.com/kavdev/dj-stripe/" -__version__ = "0.9.0.dev" +__version__ = "0.9.0.dev0" -__author__ = "Daniel Greenfeld" -__email__ = "pydanny@gmail.com" +__author__ = "Alexander Kavanaugh" +__email__ = "contact@kavdev.io" __license__ = "BSD" __license__ = "License :: OSI Approved :: BSD License" -__copyright__ = "Copyright 2015 Daniel Greenfeld" +__copyright__ = "Copyright 2016 Alexander Kavanaugh" if get_django_version() <= '1.7.x': msg = "dj-stripe deprecation notice: Django 1.7 and lower are no longer\n" \ "supported. Please upgrade to Django 1.8 or higher.\n" \ - "Reference: https://github.com/pydanny/dj-stripe/issues/275" + "Reference: https://github.com/kavdev/dj-stripe/issues/275" warnings.warn(msg) diff --git a/djstripe/admin.py b/djstripe/admin.py index 4c9f3edcb5..36a606b8e3 100644 --- a/djstripe/admin.py +++ b/djstripe/admin.py @@ -1,8 +1,4 @@ # -*- coding: utf-8 -*- -""" -Note: Django 1.4 support was dropped in #107 - https://github.com/pydanny/dj-stripe/pull/107 -""" from django.contrib import admin diff --git a/djstripe/settings.py b/djstripe/settings.py index ac215ad8c4..e2a2d79153 100644 --- a/djstripe/settings.py +++ b/djstripe/settings.py @@ -56,9 +56,6 @@ def get_subscriber_model(): This method attempts to pull that model from settings, and falls back to AUTH_USER_MODEL if DJSTRIPE_SUBSCRIBER_MODEL is not set. - Note: Django 1.4 support was dropped in #107 - https://github.com/pydanny/dj-stripe/pull/107 - Returns the subscriber model that is active in this project. """ diff --git a/docs/conf.py b/docs/conf.py index 29f10c7100..7078cbcaaa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,7 +16,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +# sys.path.insert(0, os.path.abspath('.')) cwd = os.getcwd() parent = os.path.dirname(cwd) @@ -27,7 +27,7 @@ # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. @@ -40,14 +40,14 @@ source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'dj-stripe' -copyright = u'2013, Daniel Greenfeld' +copyright = u'2016, Alexander Kavanaugh' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -60,40 +60,40 @@ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False # -- Options for HTML output --------------------------------------------------- @@ -105,26 +105,26 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -133,44 +133,44 @@ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'dj-stripedoc' @@ -180,41 +180,41 @@ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', +# 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', +# 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. -#'preamble': '', +# 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'dj-stripe.tex', u'dj-stripe Documentation', - u'Daniel Greenfeld', 'manual'), + u'Alexander Kavanaugh', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output -------------------------------------------- @@ -223,11 +223,11 @@ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'dj-stripe', u'dj-stripe Documentation', - [u'Daniel Greenfeld'], 1) + [u'Alexander Kavanaugh'], 1) ] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ @@ -237,18 +237,18 @@ # dir menu entry, description, category) texinfo_documents = [ ('index', 'dj-stripe', u'dj-stripe Documentation', - u'Daniel Greenfeld', 'dj-stripe', 'One line description of project.', + u'Alexander Kavanaugh', 'dj-stripe', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False \ No newline at end of file +# texinfo_no_detailmenu = False diff --git a/docs/cookbook.rst b/docs/cookbook.rst index 365ce84732..99736577f9 100644 --- a/docs/cookbook.rst +++ b/docs/cookbook.rst @@ -125,7 +125,7 @@ On the subscriber's customer object, use the charge method to generate a Stripe amount = Decimal(10.00) customer.charge(amount) -Source code for the Customer.charge method is at https://github.com/pydanny/dj-stripe/blob/master/djstripe/models.py#L573-L596 +Source code for the Customer.charge method is at https://github.com/kavdev/dj-stripe/blob/master/djstripe/models.py REST API -------- diff --git a/docs/index.rst b/docs/index.rst index c9ffd6b3aa..002efc24b0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -29,7 +29,6 @@ Contents usage settings cookbook - migrating_to_djstripe contributing authors history diff --git a/docs/migrating_to_djstripe.rst b/docs/migrating_to_djstripe.rst deleted file mode 100644 index b7f4856b6a..0000000000 --- a/docs/migrating_to_djstripe.rst +++ /dev/null @@ -1,69 +0,0 @@ -Migrating to dj-stripe -====================== - -There are a number of other Django powered stripe apps. This document explains how to migrate from them to **dj-stripe**. - -django-stripe-payments ----------------------- - -Most of the settings can be used as is, but with these exceptions: - -PAYMENT_PLANS vs DJSTRIPE_PLANS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -**dj-stripe** allows for plans with decimal numbers. So you can have plans that are $9.99 instead of just $10. The price in a specific plan is therefore in cents rather than whole dollars - -.. code-block:: python - - # settings.py - - # django-stripe-payments way - PAYMENT_PLANS = { - "monthly": { - "stripe_plan_id": "pro-monthly", - "name": "Web App Pro ($25/month)", - "description": "The monthly subscription plan to WebApp", - "price": 25, # $25.00 - "currency": "usd", - "interval": "month" - }, - } - - # dj-stripe way - DJSTRIPE_PLANS = { - "monthly": { - "stripe_plan_id": "pro-monthly", - "name": "Web App Pro ($24.99/month)", - "description": "The monthly subscription plan to WebApp", - "price": 2499, # $24.99 - "currency": "usd", - "interval": "month" - }, - } - -Migrating Settings -~~~~~~~~~~~~~~~~~~ - -TODO - -Migrating Data -~~~~~~~~~~~~~~~ - -**Issues:** - -1. **dj-stripe** includes South migrations and **django-stripe-payments** has no database migrations. -2. **dj-stripe** replaces the ``payments.models.StripeObject.created_at`` field with ``django-model-utils`` fields of ``model_utls.models.TimeStampedModel.created`` and ``model_utls.models.TimeStampedModel.modified``. - -This will require some sort of one-time migration script. If you create one for your own project, please submit it or link to a paste/gist of the code. - -.. seealso:: - - * https://github.com/pydanny/dj-stripe/issues/10. - -Migrating Templates -~~~~~~~~~~~~~~~~~~~~ - -**Issue: django-stripe-payments** uses Bootstrap 2 and django-forms-bootstrap, while **dj-stripe** uses Bootstrap 3 and eschews the use of Django form libraries in favor of hand-crafted forms. - -TODO: Write this. - diff --git a/docs/usage.rst b/docs/usage.rst index 110f79b8aa..62a01f6697 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -66,7 +66,7 @@ Using this example any request on this site that isn't on the homepage, about, s .. note:: - The extensive list of rules for this feature can be found at https://github.com/pydanny/dj-stripe/blob/master/djstripe/middleware.py. + The extensive list of rules for this feature can be found at https://github.com/kavdev/dj-stripe/blob/master/djstripe/middleware.py. .. seealso:: diff --git a/setup.py b/setup.py index 18bf25ba73..aaad94f680 100644 --- a/setup.py +++ b/setup.py @@ -39,8 +39,8 @@ def visit_Assign(self, node): from distutils.core import setup if sys.argv[-1] == 'publish': - os.system('python setup.py sdist upload') - os.system('python setup.py bdist_wheel upload') + os.system('python setup.py sdist upload --sign') + os.system('python setup.py bdist_wheel upload --sign') sys.exit() if sys.argv[-1] == 'tag':