This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
OneTime is a drop-in Django app that allows you store callbacks
in your database to be called once another event has taken place.



In its most basic form, it has two main parts. First, you give
`onetime.call_later` a callable to execute when the event happens.
Second you hook up the CallbackMiddleware which will call the callable
with the arguments you supply to `call_later()`.

views.py
========
::
# Log a user in via email
from onetime import call_later

def login(request=None, user_id):
user = User.objects.get(id=user_id)
request.session['logged_in_user'] = user

def email_login_link(request):
alleged_user = User.objects.get(id=request.GET['user_id'])
onetime_id = call_later(login, user_id=alleged_user.id)
email_utils.sendmail(
alleged_user.email,
"Login Link",
"Login by clicking <a href="http://mysite/?onetime_id=%s">here</a>"%onetime_id
)

settings.py
===========
::
MIDDLEWARE_CLASSES = (
'onetime.middleware.CallbackMiddleware',
...
)


If the callable you are passing in to call_later is in fact a Django
view that needs its first parameter to be the incoming request, you
can instead use `onetime.call_view_later` which will pass in the subsequent
request as the first parameter to the callable.


Settings
========
ONETIME_REQUEST_PARAMETER The request.REQUEST key we should look under
while searching for OneTime IDs. Can be any url-safe string, defaults
to `onetime_id`.
Release History

Release History

0.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-onetime-0.2.0.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Dec 23, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting