{
"info": {
"author": "Ryan Kaskel",
"author_email": "dev@ryankaskel.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python"
],
"description": "======================\ndjango-cbv-formpreview\n======================\n\nUsage\n-----\n\nI will write better documentation shortly, but for now see Django's\ndocumentation on its `version of this class\n`_.\n\nThis project is just a fork `Django's FormPreview\n`_\nclass. There are a few basic differences when using\ndjango-cbv-formpreview's version of the class:\n\n1. Specify the form you wish to use by setting ``form_class`` on your\n subclass. This is instead of constructing a ``FormPreview`` with\n the form class (i.e. don't do ``MyFormPreview(MyForm)``)\n2. Include it in your URLconf just as you would a normal class-based\n view (i.e. ``MyFormPreview.as_view()``)\n3. You still need to override the ``done`` method, but it only takes a\n cleaned ``form`` as an argument. Django's version takes an\n ``HttpRequest`` object and the form's ``cleaned_data``. Like all\n class-based views, the current ``HttpRequest`` is available as an\n instance attribute (i.e. ``self.request``).\n4. The ``process_preview`` method is still there, but it takes a\n ``form`` and the ``context`` it will pass to the template. It is no\n longer passed an ``HttpRequest`` object for the same reason as\n above.\n\nAlong with the above backwards incompatibile changes that affect\npublicly documented behavior, a comment in the source code\nsuggested a few methods that might be useful to override. The methods\n``get_initial``, ``security_hash``, and ``failed_hash`` used to take\nan ``HttpRequest`` as an argument but no longer do for the same\nreason stated above. A few other changes to note:\n\n- ``process_params`` has been removed. The ``args`` and ``kwargs``\n passed to the view are available as instance attributes with the same\n names. If you need to do something with them before the view is\n processed, override ``dispatch`` and be sure to return a call to the\n parents ``dispatch`` method (i.e. ``return super(MyFormPreview,\n self).dispatch(request, *args, **kwargs)``.\n- ``get_auto_id`` has also been removed. Override ``get_form_kwargs``\n if you need it.\n\nPlease let me know if I've missed anything.\n\nBackground\n----------\n\nThe ``FormPreview`` class from the ``contrib.formtools`` app is a\nclass based view that's been in Django for over 5 years. Originally\nwritten by Adrian Holovaty, it hasn't changed significantly since its\nrelease.\n\nStarting in version 1.3, Django has a \"blessed\" version of class based\nviews. This package contains an updated version of ``FormPreview``\nthat inherits from the new ``FormView`` class. This enables a\nconsistent API for class based views in Django. Of particular\nuse are the methods provided by the ``FormMixin`` class, from which\n``FormView`` inherits. For example, the ``get_form`` method gives you\ncontrol over the instantiation of the form class. This allows you to\nconstruct an instance with non-standard arguments which was the\noriginal motivation of the patch.\n\nI originally strove for backwards compatibility but after using this\nin production, decided it wasn't worth it. The final straw was when\nI needed to call the ``save`` method on a form in ``done``. Django's\n``FormPreview`` only passed ``cleaned_data`` and I didn't want to\nreconstruct the form as recleaning it would unnecessarily hit the\ndatabase.\n\nI previously filed a `ticket `_\non Django's trac to include the original backwards compatibile version\nof ``django-cbv-formpreview`` in Django 1.4. Now that I've broken\nbackwards compatibility, I'm not sure how the core devs will respond\nto it. I personally feel that few people actually use this\nfunctionality and would therefore have minimal impact on the community.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/ryankask/django-cbv-formpreview",
"keywords": null,
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "django-cbv-formpreview",
"package_url": "https://pypi.org/project/django-cbv-formpreview/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django-cbv-formpreview/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/ryankask/django-cbv-formpreview"
},
"release_url": "https://pypi.org/project/django-cbv-formpreview/0.2.0a1/",
"requires_dist": null,
"requires_python": null,
"summary": "Django's FormPreview updated to use class based views.",
"version": "0.2.0a1"
},
"last_serial": 752889,
"releases": {
"0.1.0a1": [
{
"comment_text": "",
"digests": {
"md5": "23d828e344ac8c3444d050132e800b6a",
"sha256": "29eff55a94ca273bf69d832961678d20ef7fd71f3a59091de37dd807b886edf4"
},
"downloads": -1,
"filename": "django-cbv-formpreview-0.1.0a1.tar.gz",
"has_sig": false,
"md5_digest": "23d828e344ac8c3444d050132e800b6a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8222,
"upload_time": "2011-06-09T11:41:53",
"url": "https://files.pythonhosted.org/packages/bd/83/522fdc1d48358c01e4f04eaec8fd89df309d843ac09f559619ebd4b51aff/django-cbv-formpreview-0.1.0a1.tar.gz"
}
],
"0.1.1a1": [
{
"comment_text": "",
"digests": {
"md5": "7074be5f804fb8b7e91ede2e8c28b37a",
"sha256": "f3412f10c111dc728ecef526244e8f79eaf331374122c57b6f0cab9bc51d7a1a"
},
"downloads": -1,
"filename": "django-cbv-formpreview-0.1.1a1.tar.gz",
"has_sig": false,
"md5_digest": "7074be5f804fb8b7e91ede2e8c28b37a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8275,
"upload_time": "2011-06-09T12:18:59",
"url": "https://files.pythonhosted.org/packages/d1/3d/c4bd2a8fbcb62b4c9ddcc7d7dee9c6d1e21a505ea3c7e1e6bda5c1a1768b/django-cbv-formpreview-0.1.1a1.tar.gz"
}
],
"0.1.2a1": [
{
"comment_text": "",
"digests": {
"md5": "5a312efa46f0102b3e9abee890138af8",
"sha256": "8926090ab2c0218052e3d91116d252ad355254c0c31a5f0a5fd9788a75483d58"
},
"downloads": -1,
"filename": "django-cbv-formpreview-0.1.2a1.tar.gz",
"has_sig": false,
"md5_digest": "5a312efa46f0102b3e9abee890138af8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8303,
"upload_time": "2011-06-09T15:42:09",
"url": "https://files.pythonhosted.org/packages/bd/24/9428f2ec403d05a99c7830734d37d0fdcf1d78439cd5c099a1c37e5e444d/django-cbv-formpreview-0.1.2a1.tar.gz"
}
],
"0.1.3a1": [
{
"comment_text": "",
"digests": {
"md5": "c1b42b65f3850b8e852cb9b835007d6e",
"sha256": "be55851226e313c0705eb34c95a9691cb804dbff238e9627ec825a168a8a82de"
},
"downloads": -1,
"filename": "django-cbv-formpreview-0.1.3a1.tar.gz",
"has_sig": false,
"md5_digest": "c1b42b65f3850b8e852cb9b835007d6e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8337,
"upload_time": "2011-06-10T10:06:29",
"url": "https://files.pythonhosted.org/packages/25/27/0feb9564e1688c0ec84f163463520cf97bf6efdf33a6d1509a5b0e4b160b/django-cbv-formpreview-0.1.3a1.tar.gz"
}
],
"0.2.0a1": [
{
"comment_text": "",
"digests": {
"md5": "f77e60e4e6b2a193aedc47b83273d2bf",
"sha256": "1d20559a94491c5a3b3bc0a37a2205ca8f5b5d405ec7a866399a5e0424935cb9"
},
"downloads": -1,
"filename": "django-cbv-formpreview-0.2.0a1.tar.gz",
"has_sig": false,
"md5_digest": "f77e60e4e6b2a193aedc47b83273d2bf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9450,
"upload_time": "2011-06-30T14:37:16",
"url": "https://files.pythonhosted.org/packages/60/6f/00d9b7152101b8e2539cf9b675cd46717616d57ef84e51925255a9285ce7/django-cbv-formpreview-0.2.0a1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "f77e60e4e6b2a193aedc47b83273d2bf",
"sha256": "1d20559a94491c5a3b3bc0a37a2205ca8f5b5d405ec7a866399a5e0424935cb9"
},
"downloads": -1,
"filename": "django-cbv-formpreview-0.2.0a1.tar.gz",
"has_sig": false,
"md5_digest": "f77e60e4e6b2a193aedc47b83273d2bf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9450,
"upload_time": "2011-06-30T14:37:16",
"url": "https://files.pythonhosted.org/packages/60/6f/00d9b7152101b8e2539cf9b675cd46717616d57ef84e51925255a9285ce7/django-cbv-formpreview-0.2.0a1.tar.gz"
}
]
}