Code Monkey home page Code Monkey logo

django-subscription's People

Contributors

calvinchengx avatar exslim avatar gearheart avatar ironfroggy avatar mpasternacki avatar zhaque avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-subscription's Issues

ValueError at /admin/login/ substring not found

I worked on the upgrade to Django 1.10.5 and Python 3.5 but I am stock now. I get the above error and dont understand why the form is generated inside a template tag but I guess thats why its called shortcut? Any chance you can help?

#from django.views.generic.list_detail import object_list
from django.views.generic import TemplateView
from .models import Subscription, UserSubscription

_formclass = getattr(settings, 'SUBSCRIPTION_PAYPAL_FORM', 'paypal.standard.forms.PayPalPaymentsForm')
_formclass_dot = _formclass.rindex('.') 
_formclass_module = __import__(_formclass[:_formclass_dot], {}, {}, [''])

PayPalForm = getattr(_formclass_module, _formclass[_formclass_dot+1:])
get_paypal_extra_args = Signal(providing_args=['user', 'subscription', 'extra_args'])

My WIP repository (django 1.10.5 and python 3.5) is here:

https://github.com/finnerds/django-paypal-subscription

I tried to add an example and make it more understandable for me what actually happens and how it could be used.

Reaping expired UserSubscription objects

When UserSubscription expires, it is not deleted from database.
When user first cancels old UserSubscription and then upgrades or resubscribes, old UserSubscription does not get deleted.

UserSubscription model should get a "cancelled" BooleanField, so it can be reaped after expiration, deleted on upgrade, and properly reactivated ("uncancelled") on resubscription.

Rebate unused subscription part on upgrade

PayPal's "trial period" feature should be used to charge less for first billing period on upgrade; the rebate should be equal to part of old subscription plan's billing period that is left unused.

The 'None' choice for recurring_unit and trial_unit fields creates string entries in DB.

To reproduce:

  1. Use postgres_psycopg2 in db engine settings.
  2. syncdb, migrate.
  3. Go to admin panel.
  4. Create a new Subscription with "None" trial unit or recurring unit and save.

The result will be an exception that the value of trial unit has bigger length than the max_length accepted by the DB.

On the other hand, if sqlite3 is used, the result will be an entry with the 'None' string as a value instead of the null.

I did not use mysql yet, so I do not know, if there is some issue for this engine, too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.