pax_global_header 0000666 0000000 0000000 00000000064 14527463515 0014526 g ustar 00root root 0000000 0000000 52 comment=ffb54fa39ddf58c0df0d3e034cd27b63b0230c86 django-invitations-2.1.0/ 0000775 0000000 0000000 00000000000 14527463515 0015335 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/.coveragerc 0000664 0000000 0000000 00000000035 14527463515 0017454 0 ustar 00root root 0000000 0000000 [run] include = invitations* django-invitations-2.1.0/.editorconfig 0000664 0000000 0000000 00000001155 14527463515 0020014 0 ustar 00root root 0000000 0000000 # top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file [*] end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation # Set default charset [*.{js,py}] charset = utf-8 # 4 space indentation [*.py] indent_style = space indent_size = 4 # Tab indentation (no size specified) [Makefile] indent_style = tab # Indentation override for all JS under lib directory [lib/**.js] indent_style = space indent_size = 2 # Matches the exact files either package.json or .travis.yml [{package.json,.travis.yml}] indent_style = space indent_size = 2 django-invitations-2.1.0/.github/ 0000775 0000000 0000000 00000000000 14527463515 0016675 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14527463515 0020732 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/.github/workflows/release.yml 0000664 0000000 0000000 00000001614 14527463515 0023077 0 ustar 00root root 0000000 0000000 name: Release on: push: tags: - '*' jobs: build: if: github.repository == 'jazzband/django-invitations' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies run: | python -m pip install -U pip python -m pip install -U poetry - name: Build package run: | poetry build - name: Upload packages to Jazzband if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') run: | poetry config repositories.jazzband https://jazzband.co/projects/django-invitations/upload poetry config http-basic.jazzband jazzband ${{ secrets.JAZZBAND_RELEASE_KEY }} poetry publish -r jazzband django-invitations-2.1.0/.github/workflows/test.yml 0000664 0000000 0000000 00000001723 14527463515 0022437 0 ustar 00root root 0000000 0000000 name: Test on: [push, pull_request] jobs: build: name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] django-version: ['3.2', '4.0', '4.1', '4.2', '5.0'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install pytest coverage python -m pip install tox tox-gh-actions - name: Tox tests run: tox -v env: DJANGO: ${{ matrix.django-version }} - name: Upload coverage uses: codecov/codecov-action@v3 with: name: Python ${{ matrix.python-version }} django-invitations-2.1.0/.gitignore 0000664 0000000 0000000 00000000237 14527463515 0017327 0 ustar 00root root 0000000 0000000 .DS_Store *.pyc *.py~ .tox/ dist/ .cache/ .coverage/ django_invitations.egg-info/ .gitchangelog.rc git-push.bat .python-version .coverage /.idea/ docs/_build/ django-invitations-2.1.0/.pre-commit-config.yaml 0000664 0000000 0000000 00000002661 14527463515 0021623 0 ustar 00root root 0000000 0000000 default_language_version: python: python3 exclude: ^.*\b(migrations)\b.*$ ci: autofix_prs: false repos: - repo: https://github.com/psf/black rev: 23.11.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: check-ast - id: check-merge-conflict - id: check-case-conflict - id: detect-private-key - id: check-added-large-files - id: check-json - id: check-symlinks - id: check-toml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: - id: isort name: isort (python) args: ["--profile", "black", "--filter-files"] - repo: https://github.com/pycqa/flake8 rev: 6.1.0 hooks: - id: flake8 additional_dependencies: - flake8-bugbear - flake8-comprehensions args: [--max-line-length=88] - repo: https://github.com/asottile/pyupgrade rev: v3.15.0 hooks: - id: pyupgrade args: - --py37-plus exclude: migrations/ - repo: https://github.com/adamchainz/django-upgrade rev: 1.15.0 hooks: - id: django-upgrade args: - --target-version=3.2 - repo: https://github.com/asottile/yesqa rev: v1.5.0 hooks: - id: yesqa - repo: https://github.com/hadialqattan/pycln rev: v2.4.0 hooks: - id: pycln django-invitations-2.1.0/CHANGELOG.md 0000664 0000000 0000000 00000016407 14527463515 0017156 0 ustar 00root root 0000000 0000000 Changelog ========= 2.0.0 (2022-09-28) ---------------- - Joined Jazzband - Removed support for Django versions below 3.2 - Added support for Django 4.0+. Thanks @saschahofmann [#169](https://github.com/jazzband/django-invitations/pull/169) - Removed support for Python versions below 3.7 - Added documentation - Set inviter on invitation in SendJSONInvite view. Thanks @rosexi [#151](https://github.com/jazzband/django-invitations/pull/151) 1.9 (2017-02-11) ---------------- - Added get_signup_redirect to allow custom implementations by subclasses - Fixed invitation form displaying "None" when first displayed - Fixed deprecation warnings - Added get_signup_redirect to allow custom implementations by subclasses - Fixed flake8 errors - Import reverse from django.urls if available, otherwise fall back to old import - Set ForeignKey field to explicitly cascade on deletion - flake8 styling formatting - Add email max length setting 1.8 (2016-10-19) ---------------- *TO BE ADDED* 1.7 (2016-02-10) ------------------------ - 1.7. [bee-keeper] - Merge pull request #34 from percipient/dont-404. [bee-keeper] Display a message on expired/erroneous/accepted keys. - Fix flake8 issues. [Patrick Cloke] - Fix a formatting mistake in the README. [Patrick Cloke] - Display a message on expired/erroneous/accepted keys. Related to #25. [Patrick Cloke] - Merge pull request #33 from percipient/readme-settings. [bee-keeper] Fix-up the settings in the README - Update the INVITATIONS_ADAPTER setting. [Patrick Cloke] - Update the readme with all the settings. [Patrick Cloke] - Removed uneeded check on send invite. [bee_keeper] - Test new url spec. [bee_keeper] - Merge pull request #32 from mjnaderi/patch-1. [bee-keeper] Remove RemovedInDjango110Warning warnings in Django 1.9 - Remove RemovedInDjango110Warning warnings in Django 1.9. [Mohammad Javad Naderi] With Django 1.9, each time I run `python manage.py runserver`, it shows 2 warnings: ``` /someplace/.venv/lib/python2.7/site-packages/invitations/urls.py:15: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead. name='accept-invite'), /someplace/.venv/lib/python2.7/site-packages/invitations/urls.py:15: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead. name='accept-invite'), ``` This pull request fixes it. 1.6 (2016-01-10) ---------------- - V1.6. [bee_keeper] - Dont override inviter from create step. [bee_keeper] - Merge pull request #30 from percipient/allauth-with-custom-adapter. [bee-keeper] Allow using custom allauth backends. - Make flake8 happy. [Patrick Cloke] - Don't return None from get_invitations_adapter. [Patrick Cloke] - Merge pull request #31 from percipient/set-inviter. [bee-keeper] Set the inviter in the SendInvite view. - Set the inviter in the SendInvite view. [Patrick Cloke] - Update README.md. [bee-keeper] 1.5 (2015-12-07) ---------------- - Update README.md. [bee-keeper] - Merge pull request #24 from bee-keeper/devel. [bee-keeper] Refactor as generic invite app - Removed the dependency on django-allauth, this package is now a generic invite app. [bee_keeper] 1.4 (2015-11-27) ---------------- - 1.4. [bee_keeper] - Merge pull request #23 from bee-keeper/devel. [bee-keeper] Coverage and exposing inviter in admin - Coverage and exposing inviter in admin. [bee_keeper] 1.3 (2015-11-26) ---------------- - Merge pull request #22 from bee-keeper/devel. [bee-keeper] Added inviter to invitation - Added inviter to invitation. [bee_keeper] - Merge pull request #21 from bee-keeper/devel. [bee-keeper] Support for django1.9 - Testing for django1.9 and python 3.5. [bee_keeper] - Merge pull request #20 from bee-keeper/devel. [bee-keeper] Added json endpoint for invites - Added json endpoint for invites. [bee_keeper] - Merge pull request #19 from bee-keeper/devel. [bee-keeper] Made accept trailing slash optional - Made trailing slash optional and added flake8 to CI. [bee_keeper] Bumped to version 1.3 - Update models.py. [bee-keeper] - Roadmap. [bee_keeper] 1.2 (2015-08-29) ---------------- - Test coverage done, ready for 1.2 release. [bee_keeper] - Dropping support for python 3.2. [bee_keeper] - Dropping support for python 3.2. [bee_keeper] - Signal test coverage, tweaking tox. [bee_keeper] - Coverage. [bee-keeper] - Tox+travis. [bee-keeper] - Tox. [bee-keeper] - Tox+travis. [bee-keeper] - Testing tox+travis. [bee-keeper] - Testing tox+travis. [bee-keeper] - Tox file. [bee_keeper] - Py3 fix. [bee_keeper] - Test for signup redirect. [bee_keeper] - Update README.md. [bee-keeper] - Py 3.2. [bee_keeper] - Py 3.2. [bee-keeper] - Print. [bee-keeper] - Tests and bug fixes. [bee-keeper] 1.1 (2015-08-05) ---------------- - V 1.1. [bee_keeper] - Readme. [bee_keeper] - Modified PR (15) + editorconfig. [bee_keeper] - Merge branch 'nwaxiomatic-master' [bee_keeper] - Admin invitations. [Nic] sends invitations from admin on save 1.0 (2015-07-26) ---------------- - Release 1.0. [bee_keeper] - Requirements. [bee_keeper] - Changing travis supported versions. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Remove 2.6 from testing. [bee_keeper] - Requirements and changelog. [bee_keeper] - Test settings. [bee_keeper] - Requirements.txt. [bee_keeper] - Travis. [bee_keeper] - Removing uneeded imports. [bee_keeper] - Removed ALLOWED_GROUPS setting. [bee_keeper] - Merge pull request #12 from tbarbugli/patch-1. [bee-keeper] fix invite form - Fix invite form. [Tommaso Barbugli] - Update views.py. [bee-keeper] - Teavis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - App settings. [bee_keeper] - Merge pull request #6 from simonv3/master. [bee-keeper] # Redo pull request of adding inviter to signal. - Add reference to inviter in signal. [Simon] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - Readme. [bee_keeper] - Fixing py3.2 import issues. [bee_keeper] - Invitations/app_settings.py. [bee_keeper] - Py3.2 issue. [bee_keeper] - Typo with import. [bee_keeper] - Module object has no attribute issue with 3.2. [bee_keeper] - Fixes import issue. [bee_keeper] - Py 3.2 unicode issue. [bee_keeper] - Travis. [bee_keeper] - Travis config. [bee_keeper] - Py3.2 format. [bee_keeper] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - .travs.yml. [bee_keeper] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - Test settings and more test coverage. [bee_keeper] - Tests and refactoring. [bee_keeper] - New style migrations. [bee_keeper] - 1.7 style migrations. [bee_keeper] 0.12 (2014-11-30) ----------------- - Release. [bee_keeper] 0.11 (2014-11-30) ----------------- - Template paths. [bee_keeper] - Setup.py. [bee_keeper] - Packaging. [bee_keeper] - Versions. [bee_keeper] 0.1 (2014-11-30) ---------------- - Packaging. [bee_keeper] - Include templates in package. [bee_keeper] - Packaging. [bee_keeper] - Template path. [bee_keeper] - Template path. [bee_keeper] - Name changes. [bee_keeper] django-invitations-2.1.0/CONTRIBUTING.md 0000664 0000000 0000000 00000000464 14527463515 0017572 0 ustar 00root root 0000000 0000000 [](https://jazzband.co/) This is a [Jazzband](https://jazzband.co/) project. By contributing you agree to abide by the [Contributor Code of Conduct](https://jazzband.co/about/conduct) and follow the [guidelines](https://jazzband.co/about/guidelines). django-invitations-2.1.0/LICENSE 0000664 0000000 0000000 00000104461 14527463515 0016350 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {one line to give the program's name and a brief idea of what it does.} Copyright (C) {year} {name of author} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: {project} Copyright (C) {year} {fullname} This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . django-invitations-2.1.0/README.md 0000664 0000000 0000000 00000002426 14527463515 0016620 0 ustar 00root root 0000000 0000000 # Django-invitations - Generic invitations app [](https://jazzband.co/) [](https://pypi.python.org/pypi/django-invitations) [](https://pypi.python.org/pypi/django-invitations) [](https://github.com/jazzband/django-invitations/actions/workflows/test.yml) [](https://codecov.io/gh/jazzband/django-invitations) [](https://django-invitations.readthedocs.io/en/latest/?badge=latest) ## About Generic invitations solution with adaptable backend and support for django-allauth. ## Contributing As we are members of a [JazzBand project](https://jazzband.co/projects), `django-invitations` contributors should adhere to the [Contributor Code of Conduct](https://jazzband.co/about/conduct). ### Documentation Documentation can be found at https://django-invitations.readthedocs.io/ django-invitations-2.1.0/docs/ 0000775 0000000 0000000 00000000000 14527463515 0016265 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/docs/Makefile 0000664 0000000 0000000 00000001177 14527463515 0017733 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation # # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= "-W" SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) django-invitations-2.1.0/docs/changelog.rst 0000664 0000000 0000000 00000015020 14527463515 0020744 0 ustar 00root root 0000000 0000000 Changelog ========= 2.0.0 (2022-09-28) ---------------- - Joined Jazzband - Removed support for Django versions below 3.2 - Added support for Django 4.0+. Thanks @saschahofmann [#169](https://github.com/jazzband/django-invitations/pull/169) - Removed support for Python versions below 3.7 - Added documentation - Set inviter on invitation in SendJSONInvite view. Thanks @rosexi [#151](https://github.com/jazzband/django-invitations/pull/151) 1.9 (2017-02-11) ---------------- - Added get_signup_redirect to allow custom implementations by subclasses - Fixed invitation form displaying "None" when first displayed - Fixed deprecation warnings - Added get_signup_redirect to allow custom implementations by subclasses - Fixed flake8 errors - Import reverse from django.urls if available, otherwise fall back to old import - Set ForeignKey field to explicitly cascade on deletion - flake8 styling formatting - Add email max length setting 1.8 (2016-10-19) ---------------- Not available 1.7 (2016-02-10) ------------------------ - 1.7. [bee-keeper] - Merge pull request #34 from percipient/dont-404. [bee-keeper] Display a message on expired/erroneous/accepted keys. - Fix flake8 issues. [Patrick Cloke] - Fix a formatting mistake in the README. [Patrick Cloke] - Display a message on expired/erroneous/accepted keys. Related to #25. [Patrick Cloke] - Merge pull request #33 from percipient/readme-settings. [bee-keeper] Fix-up the settings in the README - Update the INVITATIONS_ADAPTER setting. [Patrick Cloke] - Update the readme with all the settings. [Patrick Cloke] - Removed uneeded check on send invite. [bee_keeper] - Test new url spec. [bee_keeper] - Merge pull request #32 from mjnaderi/patch-1. [bee-keeper] - Remove RemovedInDjango110Warning warnings in Django 1.9. [Mohammad Javad Naderi] 1.6 (2016-01-10) ---------------- - V1.6. [bee_keeper] - Dont override inviter from create step. [bee_keeper] - Merge pull request #30 from percipient/allauth-with-custom-adapter. [bee-keeper] Allow using custom allauth backends. - Make flake8 happy. [Patrick Cloke] - Don't return None from get_invitations_adapter. [Patrick Cloke] - Merge pull request #31 from percipient/set-inviter. [bee-keeper] Set the inviter in the SendInvite view. - Set the inviter in the SendInvite view. [Patrick Cloke] - Update README.md. [bee-keeper] 1.5 (2015-12-07) ---------------- - Update README.md. [bee-keeper] - Merge pull request #24 from bee-keeper/devel. [bee-keeper] Refactor as generic invite app - Removed the dependency on django-allauth, this package is now a generic invite app. [bee_keeper] 1.4 (2015-11-27) ---------------- - 1.4. [bee_keeper] - Merge pull request #23 from bee-keeper/devel. [bee-keeper] Coverage and exposing inviter in admin - Coverage and exposing inviter in admin. [bee_keeper] 1.3 (2015-11-26) ---------------- - Merge pull request #22 from bee-keeper/devel. [bee-keeper] Added inviter to invitation - Added inviter to invitation. [bee_keeper] - Merge pull request #21 from bee-keeper/devel. [bee-keeper] Support for django1.9 - Testing for django1.9 and python 3.5. [bee_keeper] - Merge pull request #20 from bee-keeper/devel. [bee-keeper] Added json endpoint for invites - Added json endpoint for invites. [bee_keeper] - Merge pull request #19 from bee-keeper/devel. [bee-keeper] Made accept trailing slash optional - Made trailing slash optional and added flake8 to CI. [bee_keeper] Bumped to version 1.3 - Update models.py. [bee-keeper] - Roadmap. [bee_keeper] 1.2 (2015-08-29) ---------------- - Test coverage done, ready for 1.2 release. [bee_keeper] - Dropping support for python 3.2. [bee_keeper] - Dropping support for python 3.2. [bee_keeper] - Signal test coverage, tweaking tox. [bee_keeper] - Coverage. [bee-keeper] - Tox+travis. [bee-keeper] - Tox. [bee-keeper] - Tox+travis. [bee-keeper] - Testing tox+travis. [bee-keeper] - Testing tox+travis. [bee-keeper] - Tox file. [bee_keeper] - Py3 fix. [bee_keeper] - Test for signup redirect. [bee_keeper] - Update README.md. [bee-keeper] - Py 3.2. [bee_keeper] - Py 3.2. [bee-keeper] - Print. [bee-keeper] - Tests and bug fixes. [bee-keeper] 1.1 (2015-08-05) ---------------- - V 1.1. [bee_keeper] - Readme. [bee_keeper] - Modified PR (15) + editorconfig. [bee_keeper] - Merge branch 'nwaxiomatic-master' [bee_keeper] - Admin invitations. [Nic] sends invitations from admin on save 1.0 (2015-07-26) ---------------- - Release 1.0. [bee_keeper] - Requirements. [bee_keeper] - Changing travis supported versions. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Remove 2.6 from testing. [bee_keeper] - Requirements and changelog. [bee_keeper] - Test settings. [bee_keeper] - Requirements.txt. [bee_keeper] - Travis. [bee_keeper] - Removing uneeded imports. [bee_keeper] - Removed ALLOWED_GROUPS setting. [bee_keeper] - Merge pull request #12 from tbarbugli/patch-1. [bee-keeper] fix invite form - Fix invite form. [Tommaso Barbugli] - Update views.py. [bee-keeper] - Teavis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - Travis. [bee_keeper] - App settings. [bee_keeper] - Merge pull request #6 from simonv3/master. [bee-keeper] # Redo pull request of adding inviter to signal. - Add reference to inviter in signal. [Simon] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - Readme. [bee_keeper] - Fixing py3.2 import issues. [bee_keeper] - Invitations/app_settings.py. [bee_keeper] - Py3.2 issue. [bee_keeper] - Typo with import. [bee_keeper] - Module object has no attribute issue with 3.2. [bee_keeper] - Fixes import issue. [bee_keeper] - Py 3.2 unicode issue. [bee_keeper] - Travis. [bee_keeper] - Travis config. [bee_keeper] - Py3.2 format. [bee_keeper] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - .travs.yml. [bee_keeper] - .travis.yml. [bee_keeper] - .travis.yml. [bee_keeper] - Test settings and more test coverage. [bee_keeper] - Tests and refactoring. [bee_keeper] - New style migrations. [bee_keeper] - 1.7 style migrations. [bee_keeper] 0.12 (2014-11-30) ----------------- - Release. [bee_keeper] 0.11 (2014-11-30) ----------------- - Template paths. [bee_keeper] - Setup.py. [bee_keeper] - Packaging. [bee_keeper] - Versions. [bee_keeper] 0.1 (2014-11-30) ---------------- - Packaging. [bee_keeper] - Include templates in package. [bee_keeper] - Packaging. [bee_keeper] - Template path. [bee_keeper] - Template path. [bee_keeper] - Name changes. [bee_keeper] django-invitations-2.1.0/docs/conf.py 0000664 0000000 0000000 00000004365 14527463515 0017574 0 ustar 00root root 0000000 0000000 # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html from __future__ import annotations import sys from pathlib import Path import tomlkit # -- Path setup -------------------------------------------------------------- here = Path(__file__).parent.resolve() sys.path.insert(0, str(here / "..")) # -- Project information ----------------------------------------------------- def _get_project_meta(): with open("../pyproject.toml") as pyproject: file_contents = pyproject.read() return tomlkit.parse(file_contents)["tool"]["poetry"] pkg_meta = _get_project_meta() project = str(pkg_meta["name"]) copyright = "-" author = "-" # The short X.Y version version = str(pkg_meta["version"]) # The full version, including alpha/beta/rc tags release = version # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.viewcode", ] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [ "_build", "venv", ] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = "furo" # -- Options for LaTeX output ------------------------------------------ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ( "index", "django-invitations.tex", "django-invitations Documentation", "Jazzband", "manual", ), ] # -- Options for Intersphinx ------------------------------------------- intersphinx_mapping = { "django": ( "https://docs.djangoproject.com/en/stable/", "https://docs.djangoproject.com/en/stable/_objects/", ), } django-invitations-2.1.0/docs/configuration.rst 0000664 0000000 0000000 00000007606 14527463515 0021677 0 ustar 00root root 0000000 0000000 Configuration ============= General settings ---------------- INVITATION_EXPIRY ***************** Setting name: ``INVITATIONS_INVITATION_EXPIRY`` Type: Integer Default: 3 How many days before the invitation expires. ---- CONFIRM_INVITE_ON_GET ********************* Setting name: ``INVITATIONS_CONFIRM_INVITE_ON_GET`` Type: Boolean Default: True If confirmations can be accepted via a `GET` request. ---- ACCEPT_INVITE_AFTER_SIGNUP ************************** Setting name: ``INVITATIONS_ACCEPT_INVITE_AFTER_SIGNUP`` Type: Boolean Default: False If ``True``, invitations will be accepted after users finish signup. If ``False``, invitations will be accepted right after the invitation link is clicked. Note that this only works with Allauth for now, which means `ACCOUNT_ADAPTER` has to be ``invitations.models.InvitationsAdapter``. ---- GONE_ON_ACCEPT_ERROR ******************** Setting name: ``INVITATIONS_GONE_ON_ACCEPT_ERROR`` Type: Boolean Default: True If `True`, return an HTTP 410 GONE response if the invitation key is invalid, or the invitation is expired or previously accepted when accepting an invite. If `False`, display an error message and redirect on errors: * Redirects to `INVITATIONS_SIGNUP_REDIRECT` on an expired key * Otherwise, redirects to `INVITATIONS_LOGIN_REDIRECT` on other errors. ---- ALLOW_JSON_INVITES ****************** Setting name: ``INVITATIONS_ALLOW_JSON_INVITES`` Type: Boolean Default: False Expose a URL for authenticated posting of invitees ---- SIGNUP_REDIRECT *************** Setting name: ``INVITATIONS_SIGNUP_REDIRECT`` Type: String Default: "account_signup" URL name of your signup URL. ---- LOGIN_REDIRECT ************** Setting name: ``INVITATIONS_LOGIN_REDIRECT`` Type: String Default: ``LOGIN_URL`` from Django settings URL name of your login URL. ---- ADAPTER ******* Setting name: ``INVITATIONS_ADAPTER`` Type: String Default: "invitations.adapters.BaseInvitationsAdapter" Used for custom integrations. Set this to `ACCOUNT_ADAPTER` if using django-allauth. ---- EMAIL_MAX_LENGTH **************** Setting name: ``INVITATIONS_EMAIL_MAX_LENGTH`` Type: Integer Default: 254 If set to `None` (the default), invitation email max length will be set up to 254. Set this to an integer value to set up a custome email max length value. ---- EMAIL_SUBJECT_PREFIX ******************** Setting name: ``INVITATIONS_EMAIL_SUBJECT_PREFIX`` Type: String or None Default: None If set to `None` (the default), invitation email subjects will be prefixed with the name of the current Site in brackets (such as `[example.com]`). Set this to a string to for a custom email subject prefix, or an empty string for no prefix. ---- INVITATION_MODEL **************** Setting name: ``INVITATIONS_INVITATION_MODEL`` Type: String Default: ``invitations.Invitation`` App registry path of the invitation model used in the current project, for customization purposes. ---- INVITE_FORM *********** Setting name: ``INVITATIONS_INVITE_FORM`` Type: String Default: ``invitations.forms.InviteForm`` Form class used for sending invites outside admin. ---- ADMIN_ADD_FORM ************** Setting name: ``INVITATIONS_ADMIN_ADD_FORM`` Type: String Default: ``invitations.forms.InvitationAdminAddForm`` Form class used for sending invites in admin. ---- ADMIN_CHANGE_FORM ***************** Setting name: ``INVITATIONS_ADMIN_CHANGE_FORM`` Type: String Default: ``invitations.forms.InvitationAdminChangeForm`` Form class used for updating invites in admin. ---- CONFIRMATION_URL_NAME ********************* Setting name: ``INVITATIONS_CONFIRMATION_URL_NAME`` Type: String Default: "invitations:accept-invite" Invitation confirmation URL Allauth related settings ------------------------ INVITATION_ONLY *************** Setting name: ``INVITATIONS_INVITATION_ONLY`` Type: Boolean Default: False If the site is invite only, or open to all (only relevant when using allauth). django-invitations-2.1.0/docs/contributing.rst 0000664 0000000 0000000 00000002476 14527463515 0021537 0 ustar 00root root 0000000 0000000 Contributing ============ JazzBand project ---------------- As we are members of a [JazzBand project](https://jazzband.co/projects), `django-invitations` contributors should adhere to the [Contributor Code of Conduct](https://jazzband.co/about/conduct). Testing ------- It's important that any new code is tested before submission. To quickly test code in your active development environment, you should first install all of the requirements by running: .. code-block:: bash source .venv/bin/activate pip install -e '.[testing]' -U Then, run the following command to execute tests: .. code-block:: bash pytest --cov-report term --cov=invitations --ignore=tests/allauth/ --ds=tests.settings tests To test the integration with django-allauth, first make sure you have it installed. Then run: .. code-block:: bash pytest --cov-report term --cov=invitations --ignore=tests/basic/ --ds=tests.settings_allauth tests Testing in a single environment is a quick and easy way to identify obvious issues with your code. However, it's important to test changes in other environments too, before they are submitted. In order to help with this, django-invitations is configured to use tox for multi-environment tests. They take longer to complete, but can be triggered with a simple command: .. code-block:: bash tox django-invitations-2.1.0/docs/index.rst 0000664 0000000 0000000 00000001220 14527463515 0020121 0 ustar 00root root 0000000 0000000 django-invitations documentation ================================ Generic invitations solution with adaptable backend and support for django-allauth. All emails and messages are fully customisable. Originally written as an invitations solution for the excellent `django-allauth `_, this app has been refactored to remove the allauth dependency whilst retaining 100% backwards compatibility. .. toctree:: :maxdepth: 2 :caption: Contents: installation usage configuration contributing changelog Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` django-invitations-2.1.0/docs/installation.rst 0000664 0000000 0000000 00000001475 14527463515 0021527 0 ustar 00root root 0000000 0000000 Installation ============ Requirements ------------ Python 3.7 to 3.10 supported. Django 3.2 to 4.0 supported. Installation ------------ 1. Install with **pip**: .. code-block:: sh python -m pip install django-invitations 2. Add "invitations" to INSTALLED_APPS .. code-block:: python INSTALLED_APPS = [ ... "invitations", ... ] .. note:: **Allauth support** For allauth support ``invitations`` must come after ``allauth`` in the INSTALLED_APPS 3. Add invitations urls to your urlpatterns: .. code-block:: python urlpatterns = [ ... path("invitations/", include('invitations.urls', namespace='invitations')), ... ] 4. Run migrations .. code-block:: sh python manage.py migrate django-invitations-2.1.0/docs/requirements.txt 0000664 0000000 0000000 00000000033 14527463515 0021545 0 ustar 00root root 0000000 0000000 django furo sphinx tomlkit django-invitations-2.1.0/docs/usage.rst 0000664 0000000 0000000 00000003653 14527463515 0020132 0 ustar 00root root 0000000 0000000 Usage ===== There are two primary ways to use `django-invitations` described below. Generic Invitation flow: * Privileged user invites prospective user by email (via either Django admin, form post, JSON post or programmatically) * User receives invitation email with confirmation link * User clicks link and is redirected to a preconfigured url (default is accounts/signup) Allauth Invitation flow: * As above but.. * User clicks link, their email is confirmed and they are redirected to signup * The signup URL has the email prefilled and upon signing up the user is logged into the site Further details can be found in the following sections. Allauth Integration ------------------- As above but note that invitations must come after allauth in the INSTALLED_APPS Set the allauth ``ACCOUNT_ADAPTER`` setting .. code-block:: python ACCOUNT_ADAPTER = 'invitations.models.InvitationsAdapter' Sending Invites --------------- First import the model: .. code-block:: python from invitations.utils import get_invitation_model Make an instance of the model: .. code-block:: python Invitation = get_invitation_model() Then finally pass the recipient to the model and send. .. code-block:: python # inviter argument is optional invite = Invitation.create('email@example.com', inviter=request.user) invite.send_invitation(request) To send invites via django admin, just add an invite and save. Bulk Invites ------------ Bulk invites are supported via JSON. Post a list of comma separated emails to the dedicated URL and Invitations will return a data object containing a list of valid and invalid invitations. Signals ------- The following signals are emitted: * ``invite_url_sent`` * ``invite_accepted`` Management Commands ------------------- Expired and accepted invites can be cleared with the ``clear_expired_invitations`` management command: .. code-block:: sh python manage.py clear_expired_invitations django-invitations-2.1.0/invitations/ 0000775 0000000 0000000 00000000000 14527463515 0017704 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0022003 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/adapters.py 0000664 0000000 0000000 00000010416 14527463515 0022063 0 ustar 00root root 0000000 0000000 from django.conf import settings from django.contrib import messages from django.core.mail import EmailMessage, EmailMultiAlternatives from django.template import TemplateDoesNotExist from django.template.loader import render_to_string from django.utils.encoding import force_str from .app_settings import app_settings from .utils import import_attribute # Code credits here to django-allauth class BaseInvitationsAdapter: def stash_verified_email(self, request, email): request.session["account_verified_email"] = email def unstash_verified_email(self, request): ret = request.session.get("account_verified_email") request.session["account_verified_email"] = None return ret def format_email_subject(self, subject, context): prefix = app_settings.EMAIL_SUBJECT_PREFIX if prefix is None: site_name = context["site_name"] prefix = f"[{site_name}] " return prefix + force_str(subject) def render_mail(self, template_prefix, email, context): """ Renders an e-mail to `email`. `template_prefix` identifies the e-mail that is to be sent, e.g. "account/email/email_confirmation" """ subject = render_to_string(f"{template_prefix}_subject.txt", context) # remove superfluous line breaks subject = " ".join(subject.splitlines()).strip() subject = self.format_email_subject(subject, context) bodies = {} for ext in ["html", "txt"]: try: template_name = f"{template_prefix}_message.{ext}" bodies[ext] = render_to_string(template_name, context).strip() except TemplateDoesNotExist: if ext == "txt" and not bodies: # We need at least one body raise if "txt" in bodies: msg = EmailMultiAlternatives( subject, bodies["txt"], settings.DEFAULT_FROM_EMAIL, [email], ) if "html" in bodies: msg.attach_alternative(bodies["html"], "text/html") else: msg = EmailMessage( subject, bodies["html"], settings.DEFAULT_FROM_EMAIL, [email], ) msg.content_subtype = "html" # Main content is now text/html return msg def send_mail(self, template_prefix, email, context): msg = self.render_mail(template_prefix, email, context) msg.send() def is_open_for_signup(self, request): if hasattr(request, "session") and request.session.get( "account_verified_email", ): return True elif app_settings.INVITATION_ONLY is True: # Site is ONLY open for invites return False else: # Site is open to signup return True def clean_email(self, email): """ Validates an email value. You can hook into this if you want to (dynamically) restrict what email addresses can be chosen. """ return email def add_message( self, request, level, message_template, message_context=None, extra_tags="", ): """ Wrapper of `django.contrib.messages.add_message`, that reads the message text from a template. """ if "django.contrib.messages" in settings.INSTALLED_APPS: try: if message_context is None: message_context = {} message = render_to_string(message_template, message_context).strip() if message: messages.add_message(request, level, message, extra_tags=extra_tags) except TemplateDoesNotExist: pass def get_invitations_adapter(): # Compatibility with legacy allauth only version. LEGACY_ALLAUTH = ( hasattr(settings, "ACCOUNT_ADAPTER") and settings.ACCOUNT_ADAPTER == "invitations.models.InvitationsAdapter" ) if LEGACY_ALLAUTH: # defer to allauth from allauth.account.adapter import get_adapter return get_adapter() else: # load an adapter from elsewhere return import_attribute(app_settings.ADAPTER)() django-invitations-2.1.0/invitations/admin.py 0000664 0000000 0000000 00000001445 14527463515 0021352 0 ustar 00root root 0000000 0000000 from django.contrib import admin from .utils import ( get_invitation_admin_add_form, get_invitation_admin_change_form, get_invitation_model, ) Invitation = get_invitation_model() InvitationAdminAddForm = get_invitation_admin_add_form() InvitationAdminChangeForm = get_invitation_admin_change_form() @admin.register(Invitation) class InvitationAdmin(admin.ModelAdmin): list_display = ("email", "sent", "accepted") raw_id_fields = ("inviter",) def get_form(self, request, obj=None, **kwargs): if obj: kwargs["form"] = InvitationAdminChangeForm else: kwargs["form"] = InvitationAdminAddForm kwargs["form"].user = request.user kwargs["form"].request = request return super().get_form(request, obj, **kwargs) django-invitations-2.1.0/invitations/app_settings.py 0000664 0000000 0000000 00000006324 14527463515 0022763 0 ustar 00root root 0000000 0000000 from django.conf import settings class AppSettings: def __init__(self, prefix): self.prefix = prefix def _setting(self, name, dflt): return getattr(settings, self.prefix + name, dflt) @property def INVITATION_EXPIRY(self): """How long before the invitation expires""" return self._setting("INVITATION_EXPIRY", 3) @property def INVITATION_ONLY(self): """Signup is invite only""" return self._setting("INVITATION_ONLY", False) @property def CONFIRM_INVITE_ON_GET(self): """Simple get request confirms invite""" return self._setting("CONFIRM_INVITE_ON_GET", True) @property def ACCEPT_INVITE_AFTER_SIGNUP(self): """Accept the invitation after the user finished signup.""" return self._setting("ACCEPT_INVITE_AFTER_SIGNUP", False) @property def GONE_ON_ACCEPT_ERROR(self): """ If an invalid/expired/previously accepted key is provided, return a HTTP 410 GONE response. """ return self._setting("GONE_ON_ACCEPT_ERROR", True) @property def ALLOW_JSON_INVITES(self): """Exposes json endpoint for mass invite creation""" return self._setting("ALLOW_JSON_INVITES", False) @property def SIGNUP_REDIRECT(self): """Where to redirect on email confirm of invite""" return self._setting("SIGNUP_REDIRECT", "account_signup") @property def LOGIN_REDIRECT(self): """Where to redirect on an expired or already accepted invite""" return self._setting("LOGIN_REDIRECT", settings.LOGIN_URL) @property def ADAPTER(self): """The adapter, setting ACCOUNT_ADAPTER overrides this default""" return self._setting("ADAPTER", "invitations.adapters.BaseInvitationsAdapter") @property def EMAIL_MAX_LENGTH(self): """ Adjust max_length of e-mail addresses """ return self._setting("EMAIL_MAX_LENGTH", 254) @property def EMAIL_SUBJECT_PREFIX(self): """ Subject-line prefix to use for email messages sent """ return self._setting("EMAIL_SUBJECT_PREFIX", None) @property def INVITATION_MODEL(self): """ Subject-line prefix to use for Invitation model setup """ return self._setting("INVITATION_MODEL", "invitations.Invitation") @property def INVITE_FORM(self): """ Form class used for sending invites outside admin. """ return self._setting("INVITE_FORM", "invitations.forms.InviteForm") @property def ADMIN_ADD_FORM(self): """ Form class used for sending invites in admin. """ return self._setting( "ADMIN_ADD_FORM", "invitations.forms.InvitationAdminAddForm", ) @property def ADMIN_CHANGE_FORM(self): """ Form class used for updating invitations in admin. """ return self._setting( "ADMIN_CHANGE_FORM", "invitations.forms.InvitationAdminChangeForm", ) @property def CONFIRMATION_URL_NAME(self): return self._setting("CONFIRMATION_URL_NAME", "invitations:accept-invite") app_settings = AppSettings("INVITATIONS_") django-invitations-2.1.0/invitations/apps.py 0000664 0000000 0000000 00000000274 14527463515 0021224 0 ustar 00root root 0000000 0000000 from django.apps import AppConfig class Config(AppConfig): """Config.""" default_auto_field = "django.db.models.BigAutoField" name = "invitations" label = "invitations" django-invitations-2.1.0/invitations/base_invitation.py 0000664 0000000 0000000 00000002246 14527463515 0023440 0 ustar 00root root 0000000 0000000 from django.conf import settings from django.db import models from django.utils.translation import gettext_lazy as _ from .managers import BaseInvitationManager class AbstractBaseInvitation(models.Model): accepted = models.BooleanField(verbose_name=_("accepted"), default=False) key = models.CharField(verbose_name=_("key"), max_length=64, unique=True) sent = models.DateTimeField(verbose_name=_("sent"), null=True) inviter = models.ForeignKey( settings.AUTH_USER_MODEL, verbose_name=_("inviter"), null=True, blank=True, on_delete=models.CASCADE, ) objects = BaseInvitationManager() class Meta: abstract = True @classmethod def create(cls, email, inviter=None, **kwargs): raise NotImplementedError("You should implement the create method class") def key_expired(self): raise NotImplementedError("You should implement the key_expired method") def send_invitation(self, request, **kwargs): raise NotImplementedError("You should implement the send_invitation method") def __str__(self): raise NotImplementedError("You should implement the __str__ method") django-invitations-2.1.0/invitations/exceptions.py 0000664 0000000 0000000 00000000446 14527463515 0022443 0 ustar 00root root 0000000 0000000 class AlreadyInvited(Exception): """User has a valid, pending invitation""" pass class AlreadyAccepted(Exception): """User has already accepted an invitation""" pass class UserRegisteredEmail(Exception): """This email is already registered by a site user""" pass django-invitations-2.1.0/invitations/forms.py 0000664 0000000 0000000 00000005252 14527463515 0021410 0 ustar 00root root 0000000 0000000 from django import forms from django.contrib.auth import get_user_model from django.utils.translation import gettext_lazy as _ from .adapters import get_invitations_adapter from .exceptions import AlreadyAccepted, AlreadyInvited, UserRegisteredEmail from .utils import get_invitation_model Invitation = get_invitation_model() class CleanEmailMixin: def validate_invitation(self, email): if Invitation.objects.all_valid().filter(email__iexact=email, accepted=False): raise AlreadyInvited elif Invitation.objects.filter(email__iexact=email, accepted=True): raise AlreadyAccepted elif get_user_model().objects.filter(email__iexact=email): raise UserRegisteredEmail else: return True def clean_email(self): email = self.cleaned_data["email"] email = get_invitations_adapter().clean_email(email) errors = { "already_invited": _("This e-mail address has already been" " invited."), "already_accepted": _( "This e-mail address has already" " accepted an invite.", ), "email_in_use": _("An active user is using this e-mail address"), } try: self.validate_invitation(email) except AlreadyInvited: raise forms.ValidationError(errors["already_invited"]) except AlreadyAccepted: raise forms.ValidationError(errors["already_accepted"]) except UserRegisteredEmail: raise forms.ValidationError(errors["email_in_use"]) return email class InviteForm(forms.Form, CleanEmailMixin): email = forms.EmailField( label=_("E-mail"), required=True, widget=forms.TextInput(attrs={"type": "email", "size": "30"}), initial="", ) def save(self, email): return Invitation.create(email=email) class InvitationAdminAddForm(forms.ModelForm, CleanEmailMixin): email = forms.EmailField( label=_("E-mail"), required=True, widget=forms.TextInput(attrs={"type": "email", "size": "30"}), ) def save(self, *args, **kwargs): cleaned_data = super().clean() email = cleaned_data.get("email") params = {"email": email} if cleaned_data.get("inviter"): params["inviter"] = cleaned_data.get("inviter") instance = Invitation.create(**params) instance.send_invitation(self.request) super().save(*args, **kwargs) return instance class Meta: model = Invitation fields = ("email", "inviter") class InvitationAdminChangeForm(forms.ModelForm): class Meta: model = Invitation fields = "__all__" django-invitations-2.1.0/invitations/locale/ 0000775 0000000 0000000 00000000000 14527463515 0021143 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/de/ 0000775 0000000 0000000 00000000000 14527463515 0021533 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/de/LC_MESSAGES/ 0000775 0000000 0000000 00000000000 14527463515 0023320 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/de/LC_MESSAGES/django.mo 0000664 0000000 0000000 00000003443 14527463515 0025123 0 ustar 00root root 0000000 0000000 Þ• ¤ , ˆ w ‰ + H O - U ƒ ¤ L « 3 ø - , Z c k z ~ K ƒ Š Ï # Z 3 ~ ² ¹ 5 À $ ö [ % ; . ½ ì ÷ Hello, You (%(email)s) have been invited to join %(site_name)s If you'd like to join, please go to %(invite_url)s %(email)s has been invited An active user is using this e-mail address E-mail Email Invitation to - %(email)s - has been accepted Invitation to join %(site_name)s Invite Please add an email below. The user will recieve an email with instructions. This e-mail address has already accepted an invite. This e-mail address has already been invited. accepted created e-mail address key sent Project-Id-Version: Report-Msgid-Bugs-To: POT-Creation-Date: 2018-01-07 18:53+0500 PO-Revision-Date: 2018-01-07 18:53+0500 Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Last-Translator: Language-Team: X-Generator: Poedit 2.0.5 Hallo, Sie (%(email)s) wurden eingeladen, %(site_name)s s beizutreten Wenn Sie mitmachen möchten, gehen Sie bitte zu %(invite_url)s Einladung ist an %(email)s gesendet Ein aktiver Benutzer verwendet diese E-Mail-Adresse E-Mail E-mail Die an %(email)s gesendete Einladung wurde angenommen Einladung zum Beitritt %(site_name)s Einladung Bitte fügen Sie eine E-Mail unten hinzu. Der Benutzer erhält eine E-Mail mit Anweisungen. Diese E-Mail-Adresse hat bereits eine Einladung angenommen. Diese E-Mail-Adresse wurde bereits eingeladen. angenommen erstellt E-Mail-Adresse Schlüssel gesendet django-invitations-2.1.0/invitations/locale/de/LC_MESSAGES/django.po 0000664 0000000 0000000 00000005117 14527463515 0025126 0 ustar 00root root 0000000 0000000 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-07 18:53+0500\n" "PO-Revision-Date: 2018-01-07 18:53+0500\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: base_invitation.py:11 msgid "accepted" msgstr "angenommen" #: base_invitation.py:12 msgid "key" msgstr "Schlüssel" #: base_invitation.py:13 msgid "sent" msgstr "gesendet" #: forms.py:31 msgid "This e-mail address has already been invited." msgstr "Diese E-Mail-Adresse wurde bereits eingeladen." #: forms.py:33 msgid "This e-mail address has already accepted an invite." msgstr "Diese E-Mail-Adresse hat bereits eine Einladung angenommen." #: forms.py:35 msgid "An active user is using this e-mail address" msgstr "Ein aktiver Benutzer verwendet diese E-Mail-Adresse" #: forms.py:51 forms.py:62 msgid "E-mail" msgstr "E-Mail" #: models.py:21 msgid "e-mail address" msgstr "E-Mail-Adresse" #: models.py:23 msgid "created" msgstr "erstellt" #: templates/invitations/email/email_invite_message.txt:3 #, python-format msgid "" "\n" "\n" "Hello,\n" "\n" "You (%(email)s) have been invited to join %(site_name)s\n" "\n" "If you'd like to join, please go to %(invite_url)s\n" "\n" msgstr "" "\n" "\n" "Hallo,\n" "\n" "Sie (%(email)s) wurden eingeladen, %(site_name)s s beizutreten\n" "\n" "Wenn Sie mitmachen möchten, gehen Sie bitte zu %(invite_url)s\n" "\n" #: templates/invitations/email/email_invite_subject.txt:3 #, python-format msgid "Invitation to join %(site_name)s" msgstr "Einladung zum Beitritt %(site_name)s" #: templates/invitations/forms/_invite.html:3 msgid "Invite" msgstr "Einladung" #: templates/invitations/forms/_invite.html:4 msgid "" "Please add an email below. The user will recieve an email with instructions." msgstr "Bitte fügen Sie eine E-Mail unten hinzu. Der Benutzer erhält eine E-Mail mit Anweisungen." #: templates/invitations/forms/_invite.html:9 msgid "Email" msgstr "E-mail" #: templates/invitations/messages/invite_accepted.txt:3 #, python-format msgid "Invitation to - %(email)s - has been accepted" msgstr "Die an %(email)s gesendete Einladung wurde angenommen" #: views.py:44 msgid "%(email)s has been invited" msgstr "Einladung ist an %(email)s gesendet" django-invitations-2.1.0/invitations/locale/fr/ 0000775 0000000 0000000 00000000000 14527463515 0021552 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/fr/LC_MESSAGES/ 0000775 0000000 0000000 00000000000 14527463515 0023337 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/fr/LC_MESSAGES/django.po 0000664 0000000 0000000 00000005101 14527463515 0025136 0 ustar 00root root 0000000 0000000 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-02-16 18:16+0100\n" "PO-Revision-Date: 2020-02-16 18:57+0100\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "Last-Translator: \n" "Language-Team: \n" "X-Generator: Poedit 2.2.1\n" #: base_invitation.py:9 msgid "accepted" msgstr "acceptée" #: base_invitation.py:10 msgid "key" msgstr "clef" #: base_invitation.py:11 msgid "sent" msgstr "envoyée" #: forms.py:31 msgid "This e-mail address has already been invited." msgstr "Cette adresse e-mail a déjà reçu une invitation." #: forms.py:33 msgid "This e-mail address has already accepted an invite." msgstr "Cette adresse e-mail a déjà accepté une invitation." #: forms.py:35 msgid "An active user is using this e-mail address" msgstr "Un utilisateur actif utilise cette adresse e-mail" #: forms.py:51 forms.py:62 msgid "E-mail" msgstr "E-mail" #: models.py:21 msgid "e-mail address" msgstr "adresse e-mail" #: models.py:23 msgid "created" msgstr "créée" #: templates/invitations/email/email_invite_message.txt:3 #, python-format msgid "" "\n" "\n" "Hello,\n" "\n" "You (%(email)s) have been invited to join %(site_name)s\n" "\n" "If you'd like to join, please go to %(invite_url)s\n" "\n" msgstr "" "\n" "\n" "Bonjour,\n" "\n" "Vous (%(email)s) avez été invité·e à rejoindre %(site_name)s\n" "\n" "Si vous souhaitez vous inscrire, merci de suivre ce lien: %(invite_url)s\n" "\n" #: templates/invitations/email/email_invite_subject.txt:3 #, python-format msgid "Invitation to join %(site_name)s" msgstr "Invitation à rejoindre %(site_name)s" #: templates/invitations/forms/_invite.html:3 msgid "Invite" msgstr "Inviter" #: templates/invitations/forms/_invite.html:4 msgid "Please add an email below. The user will receive an email with instructions." msgstr "Merci d'ajouter une adresse e-mail ci-dessous. L'utilisateur recevra un courriel avec des instructions." #: templates/invitations/forms/_invite.html:9 msgid "Email" msgstr "Email" #: templates/invitations/messages/invite_accepted.txt:3 #, python-format msgid "Invitation to - %(email)s - has been accepted" msgstr "L'invitation envoyée à - %(email)s - a été acceptée" #: views.py:44 #, python-format msgid "%(email)s has been invited" msgstr "%(email)s a été invité·e" django-invitations-2.1.0/invitations/locale/pt_BR/ 0000775 0000000 0000000 00000000000 14527463515 0022151 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/pt_BR/LC_MESSAGES/ 0000775 0000000 0000000 00000000000 14527463515 0023736 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/pt_BR/LC_MESSAGES/django.mo 0000664 0000000 0000000 00000004127 14527463515 0025541 0 ustar 00root root 0000000 0000000 Þ• Ä l à w á Y + t ( É Ð - Ö % L , ) y 2 £ 3 Ö - 8 A I X ` d A i « 9 7 Q + ‰ µ ¼ '  - ê S ! t ( – 0 ¿ + ð # * > I O Hello, You (%(email)s) have been invited to join %(site_name)s If you'd like to join, please go to %(invite_url)s %(email)s has been invited An active user is using this e-mail address An invalid invitation key was submitted. E-mail Email Invitation to - %(email)s - has been accepted Invitation to join %(site_name)s Invite Please add an email below. The user will receive an email with instructions. The invitation for %(email)s has expired. The invitation for %(email)s was already accepted. This e-mail address has already accepted an invite. This e-mail address has already been invited. accepted created e-mail address inviter key sent Project-Id-Version: PACKAGE VERSION Report-Msgid-Bugs-To: PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE Last-Translator: FULL NAME Language-Team: LANGUAGE Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); Olá, Você (%(email)s) foi convidado a participar do site %(site_name)s Se for do seu interesse participar, siga o link %(invite_url)s %(email)s foi convidado Um usuário ativo está usando esse endereço de e-mail Uma chave de convite inválida foi enviada. E-mail Email O convite para - %(email)s - foi aceito Convite para participar do site %(site_name)s Convite Por favor adicione um email abaixo. O usuário receberá um email com instruções. O convite para %(email)s expirou. O convite para %(email)s já foi aceito. Esse endereço de e-mail já aceitou um convite. Esse endereço de e-mail já foi convidado. aceito criado endereço de e-mail Convidador chave enviado django-invitations-2.1.0/invitations/locale/pt_BR/LC_MESSAGES/django.po 0000664 0000000 0000000 00000006173 14527463515 0025547 0 ustar 00root root 0000000 0000000 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-09-15 13:13-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: base_invitation.py:9 msgid "accepted" msgstr "aceito" #: base_invitation.py:10 msgid "key" msgstr "chave" #: base_invitation.py:11 msgid "sent" msgstr "enviado" #: base_invitation.py:14 msgid "inviter" msgstr "Convidador" #: forms.py:30 msgid "This e-mail address has already been invited." msgstr "Esse endereço de e-mail já foi convidado." #: forms.py:32 msgid "This e-mail address has already accepted an invite." msgstr "Esse endereço de e-mail já aceitou um convite." #: forms.py:34 msgid "An active user is using this e-mail address" msgstr "Um usuário ativo está usando esse endereço de e-mail" #: forms.py:50 forms.py:62 msgid "E-mail" msgstr "E-mail" #: models.py:25 msgid "e-mail address" msgstr "endereço de e-mail" #: models.py:28 msgid "created" msgstr "criado" #: templates/invitations/email/email_invite_message.txt:3 #, python-format msgid "" "\n" "\n" "Hello,\n" "\n" "You (%(email)s) have been invited to join %(site_name)s\n" "\n" "If you'd like to join, please go to %(invite_url)s\n" "\n" msgstr "" "\n" "\n" "Olá,\n" "\n" "Você (%(email)s) foi convidado a participar do site %(site_name)s\n" "\n" "Se for do seu interesse participar, siga o link %(invite_url)s\n" "\n" #: templates/invitations/email/email_invite_subject.txt:3 #, python-format msgid "Invitation to join %(site_name)s" msgstr "Convite para participar do site %(site_name)s" #: templates/invitations/forms/_invite.html:3 msgid "Invite" msgstr "Convite" #: templates/invitations/forms/_invite.html:4 msgid "" "Please add an email below. The user will receive an email with instructions." msgstr "" "Por favor adicione um email abaixo. O usuário receberá um email com " "instruções." #: templates/invitations/forms/_invite.html:9 msgid "Email" msgstr "Email" #: templates/invitations/messages/invite_accepted.txt:3 #, python-format msgid "Invitation to - %(email)s - has been accepted" msgstr "O convite para - %(email)s - foi aceito" #: templates/invitations/messages/invite_already_accepted.txt:3 #, python-format msgid "The invitation for %(email)s was already accepted." msgstr "O convite para %(email)s já foi aceito." #: templates/invitations/messages/invite_expired.txt:3 #, python-format msgid "The invitation for %(email)s has expired." msgstr "O convite para %(email)s expirou." #: templates/invitations/messages/invite_invalid.txt:3 msgid "An invalid invitation key was submitted." msgstr "Uma chave de convite inválida foi enviada." #: views.py:50 #, python-format msgid "%(email)s has been invited" msgstr "%(email)s foi convidado" django-invitations-2.1.0/invitations/locale/ru/ 0000775 0000000 0000000 00000000000 14527463515 0021571 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/ru/LC_MESSAGES/ 0000775 0000000 0000000 00000000000 14527463515 0023356 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/ru/LC_MESSAGES/django.mo 0000664 0000000 0000000 00000004344 14527463515 0025162 0 ustar 00root root 0000000 0000000 Þ• ¤ , ˆ w ‰ + H O - U ƒ ¤ L « 3 ø - , Z c k z ~ Õ ƒ ï Y : I > „ Ã Ê O Ð D e r | ] ï H M – ¥ ´ Æ Ï Hello, You (%(email)s) have been invited to join %(site_name)s If you'd like to join, please go to %(invite_url)s %(email)s has been invited An active user is using this e-mail address E-mail Email Invitation to - %(email)s - has been accepted Invitation to join %(site_name)s Invite Please add an email below. The user will receive an email with instructions. This e-mail address has already accepted an invite. This e-mail address has already been invited. accepted created e-mail address key sent Project-Id-Version: Report-Msgid-Bugs-To: POT-Creation-Date: 2018-01-07 18:53+0500 PO-Revision-Date: 2018-01-07 18:53+0500 Language: ru MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3); Last-Translator: Language-Team: X-Generator: Poedit 2.0.5 ЗдравÑтвуйте, Ð’Ñ‹ (%(email)s) приглашены приÑоединитьÑÑ Ðº проекту %(site_name)s ЕÑли Ð’Ñ‹ хотите приÑоединитьÑÑ, перейдите по ÑÑылке %(invite_url)s Приглашение отправлено на %(email)s Пользователь Ñ e-mail уже ÑущеÑтвует E-mail Email Приглашение, отправленное на %(email)s, принÑто Приглашение приÑоединитьÑÑ Ðº %(site_name)s Приглашение Введите email ниже и пользователь получит пиÑьмо Ñ Ð¸Ð½ÑтрукциÑми. Приглашение, отправленное на Ñтот e-mail, уже принÑто. Ðа Ñтот e-mail уже отправлено приглашение. принÑто Ñоздано e-mail Ð°Ð´Ñ€ÐµÑ ÐºÐ»ÑŽÑ‡ отправлено django-invitations-2.1.0/invitations/locale/ru/LC_MESSAGES/django.po 0000664 0000000 0000000 00000006026 14527463515 0025164 0 ustar 00root root 0000000 0000000 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-07 18:53+0500\n" "PO-Revision-Date: 2018-01-07 18:53+0500\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" #: base_invitation.py:11 msgid "accepted" msgstr "принÑто" #: base_invitation.py:12 msgid "key" msgstr "ключ" #: base_invitation.py:13 msgid "sent" msgstr "отправлено" #: forms.py:31 msgid "This e-mail address has already been invited." msgstr "Ðа Ñтот e-mail уже отправлено приглашение." #: forms.py:33 msgid "This e-mail address has already accepted an invite." msgstr "Приглашение, отправленное на Ñтот e-mail, уже принÑто." #: forms.py:35 msgid "An active user is using this e-mail address" msgstr "Пользователь Ñ e-mail уже ÑущеÑтвует" #: forms.py:51 forms.py:62 msgid "E-mail" msgstr "E-mail" #: models.py:21 msgid "e-mail address" msgstr "e-mail адреÑ" #: models.py:23 msgid "created" msgstr "Ñоздано" #: templates/invitations/email/email_invite_message.txt:3 #, python-format msgid "" "\n" "\n" "Hello,\n" "\n" "You (%(email)s) have been invited to join %(site_name)s\n" "\n" "If you'd like to join, please go to %(invite_url)s\n" "\n" msgstr "" "\n" "\n" "ЗдравÑтвуйте,\n" "\n" "Ð’Ñ‹ (%(email)s) приглашены приÑоединитьÑÑ Ðº проекту %(site_name)s\n" "\n" "ЕÑли Ð’Ñ‹ хотите приÑоединитьÑÑ, перейдите по ÑÑылке %(invite_url)s\n" "\n" #: templates/invitations/email/email_invite_subject.txt:3 #, python-format msgid "Invitation to join %(site_name)s" msgstr "Приглашение приÑоединитьÑÑ Ðº %(site_name)s" #: templates/invitations/forms/_invite.html:3 msgid "Invite" msgstr "Приглашение" #: templates/invitations/forms/_invite.html:4 msgid "" "Please add an email below. The user will receive an email with instructions." msgstr "Введите email ниже и пользователь получит пиÑьмо Ñ Ð¸Ð½ÑтрукциÑми." #: templates/invitations/forms/_invite.html:9 msgid "Email" msgstr "Email" #: templates/invitations/messages/invite_accepted.txt:3 #, python-format msgid "Invitation to - %(email)s - has been accepted" msgstr "Приглашение, отправленное на %(email)s, принÑто" #: views.py:44 msgid "%(email)s has been invited" msgstr "Приглашение отправлено на %(email)s" django-invitations-2.1.0/invitations/locale/uk/ 0000775 0000000 0000000 00000000000 14527463515 0021562 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/uk/LC_MESSAGES/ 0000775 0000000 0000000 00000000000 14527463515 0023347 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/locale/uk/LC_MESSAGES/django.mo 0000664 0000000 0000000 00000004276 14527463515 0025157 0 ustar 00root root 0000000 0000000 Þ• ¤ , ˆ w ‰ + H O - U ƒ ¤ L « 3 ø - , Z c k z ~ Ì ƒ ç P : 8 7 s « ² J ¸ > B l W X Ä F d w Š œ ¥ Hello, You (%(email)s) have been invited to join %(site_name)s If you'd like to join, please go to %(invite_url)s %(email)s has been invited An active user is using this e-mail address E-mail Email Invitation to - %(email)s - has been accepted Invitation to join %(site_name)s Invite Please add an email below. The user will receive an email with instructions. This e-mail address has already accepted an invite. This e-mail address has already been invited. accepted created e-mail address key sent Project-Id-Version: PACKAGE VERSION Report-Msgid-Bugs-To: PO-Revision-Date: 2018-01-07 18:53+0500 Last-Translator: FULL NAME Language-Team: LANGUAGE Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3); ЗдраÑтуйте, Ви (%(email)s) запрошені приєднатиÑÑ Ð´Ð¾ проекту %(site_name)s Якщо ви хочете приєднатиÑÑ, перейдіть за поÑиланнÑм %(invite_url)s Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¾ на %(email)s КориÑтувач з цим e-mail вже Ñ–Ñнує E-mail Email ЗапрошеннÑ, надіÑлане на % (email)s, прийнÑто Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñ”Ð´Ð½Ð°Ñ‚Ð¸ÑÑ Ð´Ð¾ %(site_name)s Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ñ Ð’Ð²ÐµÐ´Ñ–Ñ‚ÑŒ email нижче Ñ– кориÑтувач отримає лиÑÑ‚ з інÑтрукціÑми. ЗапрошеннÑ, відправлене на цей e-mail, вже прийнÑто Ðа цей e-mail вже відправлено запрошеннÑ. прийнÑтий Ñтворений e-mail Ð°Ð´Ñ€ÐµÑ ÐºÐ»ÑŽÑ‡ відправлений django-invitations-2.1.0/invitations/locale/uk/LC_MESSAGES/django.po 0000664 0000000 0000000 00000005771 14527463515 0025163 0 ustar 00root root 0000000 0000000 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-07 18:53+0500\n" "PO-Revision-Date: 2018-01-07 18:53+0500\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" #: base_invitation.py:11 msgid "accepted" msgstr "прийнÑтий" #: base_invitation.py:12 msgid "key" msgstr "ключ" #: base_invitation.py:13 msgid "sent" msgstr "відправлений" #: forms.py:31 msgid "This e-mail address has already been invited." msgstr "Ðа цей e-mail вже відправлено запрошеннÑ." #: forms.py:33 msgid "This e-mail address has already accepted an invite." msgstr "ЗапрошеннÑ, відправлене на цей e-mail, вже прийнÑто" #: forms.py:35 msgid "An active user is using this e-mail address" msgstr "КориÑтувач з цим e-mail вже Ñ–Ñнує" #: forms.py:51 forms.py:62 msgid "E-mail" msgstr "E-mail" #: models.py:21 msgid "e-mail address" msgstr "e-mail адреÑ" #: models.py:23 msgid "created" msgstr "Ñтворений" #: templates/invitations/email/email_invite_message.txt:3 #, python-format msgid "" "\n" "\n" "Hello,\n" "\n" "You (%(email)s) have been invited to join %(site_name)s\n" "\n" "If you'd like to join, please go to %(invite_url)s\n" "\n" msgstr "" "\n" "\n" "ЗдраÑтуйте,\n" "\n" "Ви (%(email)s) запрошені приєднатиÑÑ Ð´Ð¾ проекту %(site_name)s\n" "\n" "Якщо ви хочете приєднатиÑÑ, перейдіть за поÑиланнÑм %(invite_url)s\n" "\n" #: templates/invitations/email/email_invite_subject.txt:3 #, python-format msgid "Invitation to join %(site_name)s" msgstr "Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñ”Ð´Ð½Ð°Ñ‚Ð¸ÑÑ Ð´Ð¾ %(site_name)s" #: templates/invitations/forms/_invite.html:3 msgid "Invite" msgstr "ЗапрошеннÑ" #: templates/invitations/forms/_invite.html:4 msgid "" "Please add an email below. The user will receive an email with instructions." msgstr "Введіть email нижче Ñ– кориÑтувач отримає лиÑÑ‚ з інÑтрукціÑми." #: templates/invitations/forms/_invite.html:9 msgid "Email" msgstr "Email" #: templates/invitations/messages/invite_accepted.txt:3 #, python-format msgid "Invitation to - %(email)s - has been accepted" msgstr "ЗапрошеннÑ, надіÑлане на % (email)s, прийнÑто" #: views.py:44 msgid "%(email)s has been invited" msgstr "Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¾ на %(email)s" django-invitations-2.1.0/invitations/management/ 0000775 0000000 0000000 00000000000 14527463515 0022020 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/management/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0024117 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/management/commands/ 0000775 0000000 0000000 00000000000 14527463515 0023621 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/management/commands/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0025720 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/management/commands/clear_expired_invitations.py 0000664 0000000 0000000 00000000404 14527463515 0031426 0 ustar 00root root 0000000 0000000 from django.core.management.base import BaseCommand from ...utils import get_invitation_model Invitation = get_invitation_model() class Command(BaseCommand): def handle(self, *args, **options): Invitation.objects.delete_expired_confirmations() django-invitations-2.1.0/invitations/managers.py 0000664 0000000 0000000 00000001164 14527463515 0022055 0 ustar 00root root 0000000 0000000 from datetime import timedelta from django.db import models from django.db.models import Q from django.utils import timezone from .app_settings import app_settings class BaseInvitationManager(models.Manager): def all_expired(self): return self.filter(self.expired_q()) def all_valid(self): return self.exclude(self.expired_q()) def expired_q(self): sent_threshold = timezone.now() - timedelta(days=app_settings.INVITATION_EXPIRY) q = Q(accepted=True) | Q(sent__lt=sent_threshold) return q def delete_expired_confirmations(self): self.all_expired().delete() django-invitations-2.1.0/invitations/migrations/ 0000775 0000000 0000000 00000000000 14527463515 0022060 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/migrations/0001_initial.py 0000664 0000000 0000000 00000001754 14527463515 0024532 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*- from __future__ import unicode_literals import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Invitation', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('email', models.EmailField(unique=True, max_length=75, verbose_name='e-mail address')), ('accepted', models.BooleanField(default=False, verbose_name='accepted')), ('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created')), ('key', models.CharField(unique=True, max_length=64, verbose_name='key')), ('sent', models.DateTimeField(null=True, verbose_name='sent')), ], options={ }, bases=(models.Model,), ), ] django-invitations-2.1.0/invitations/migrations/0002_auto_20151126_0426.py 0000664 0000000 0000000 00000001575 14527463515 0025507 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*- from __future__ import unicode_literals import django.db.models.deletion from django.conf import settings from django.db import migrations, models EMAIL_MAX_LENGTH = getattr(settings, 'INVITATIONS_EMAIL_MAX_LENGTH', 254) class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('invitations', '0001_initial'), ] operations = [ migrations.AddField( model_name='invitation', name='inviter', field=models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True, on_delete=django.db.models.deletion.CASCADE), ), migrations.AlterField( model_name='invitation', name='email', field=models.EmailField(unique=True, max_length=EMAIL_MAX_LENGTH, verbose_name='e-mail address'), ), ] django-invitations-2.1.0/invitations/migrations/0003_auto_20151126_1523.py 0000664 0000000 0000000 00000001060 14527463515 0025474 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*- from __future__ import unicode_literals import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('invitations', '0002_auto_20151126_0426'), ] operations = [ migrations.AlterField( model_name='invitation', name='inviter', field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=django.db.models.deletion.CASCADE), ), ] django-invitations-2.1.0/invitations/migrations/0004_auto_20230328_1430.py 0000664 0000000 0000000 00000001522 14527463515 0025477 0 ustar 00root root 0000000 0000000 # Generated by Django 3.2.15 on 2023-03-28 14:30 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('invitations', '0003_auto_20151126_1523'), ] operations = [ migrations.AlterField( model_name='invitation', name='id', field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='invitation', name='inviter', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='inviter'), ), ] django-invitations-2.1.0/invitations/migrations/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0024157 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/models.py 0000664 0000000 0000000 00000006123 14527463515 0021543 0 ustar 00root root 0000000 0000000 import datetime from django.conf import settings from django.contrib.sites.shortcuts import get_current_site try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from django.utils.crypto import get_random_string from django.utils.translation import gettext_lazy as _ from . import signals from .adapters import get_invitations_adapter from .app_settings import app_settings from .base_invitation import AbstractBaseInvitation class Invitation(AbstractBaseInvitation): email = models.EmailField( unique=True, verbose_name=_("e-mail address"), max_length=app_settings.EMAIL_MAX_LENGTH, ) created = models.DateTimeField(verbose_name=_("created"), default=timezone.now) @classmethod def create(cls, email, inviter=None, **kwargs): key = get_random_string(64).lower() instance = cls._default_manager.create( email=email, key=key, inviter=inviter, **kwargs ) return instance def key_expired(self): expiration_date = self.sent + datetime.timedelta( days=app_settings.INVITATION_EXPIRY, ) return expiration_date <= timezone.now() def send_invitation(self, request, **kwargs): current_site = get_current_site(request) invite_url = reverse(app_settings.CONFIRMATION_URL_NAME, args=[self.key]) invite_url = request.build_absolute_uri(invite_url) ctx = kwargs ctx.update( { "invite_url": invite_url, "site_name": current_site.name, "email": self.email, "key": self.key, "inviter": self.inviter, }, ) email_template = "invitations/email/email_invite" get_invitations_adapter().send_mail(email_template, self.email, ctx) self.sent = timezone.now() self.save() signals.invite_url_sent.send( sender=self.__class__, instance=self, invite_url_sent=invite_url, inviter=self.inviter, ) def __str__(self): return f"Invite: {self.email}" # here for backwards compatibility, historic allauth adapter if hasattr(settings, "ACCOUNT_ADAPTER"): if settings.ACCOUNT_ADAPTER == "invitations.models.InvitationsAdapter": from allauth.account.adapter import DefaultAccountAdapter from allauth.account.signals import user_signed_up class InvitationsAdapter(DefaultAccountAdapter): def is_open_for_signup(self, request): if hasattr(request, "session") and request.session.get( "account_verified_email", ): return True elif app_settings.INVITATION_ONLY is True: # Site is ONLY open for invites return False else: # Site is open to signup return True def get_user_signed_up_signal(self): return user_signed_up django-invitations-2.1.0/invitations/signals.py 0000664 0000000 0000000 00000000522 14527463515 0021715 0 ustar 00root root 0000000 0000000 from django.dispatch import Signal invite_url_sent = Signal() invite_accepted = Signal() """ @receiver(invite_url_sent, sender=Invitation) def invite_url_sent(sender, instance, invite_url_sent, inviter, **kwargs): pass @receiver(invite_accepted, sender=Invitation) def handle_invite_accepted(sender, email, **kwargs): pass """ django-invitations-2.1.0/invitations/templates/ 0000775 0000000 0000000 00000000000 14527463515 0021702 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/templates/invitations/ 0000775 0000000 0000000 00000000000 14527463515 0024251 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/templates/invitations/email/ 0000775 0000000 0000000 00000000000 14527463515 0025340 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/templates/invitations/email/email_invite_message.txt 0000664 0000000 0000000 00000000332 14527463515 0032250 0 ustar 00root root 0000000 0000000 {% load i18n %} {% autoescape off %} {% blocktrans %} Hello, You ({{ email }}) have been invited to join {{ site_name }} If you'd like to join, please go to {{ invite_url }} {% endblocktrans %} {% endautoescape %} django-invitations-2.1.0/invitations/templates/invitations/email/email_invite_subject.txt 0000664 0000000 0000000 00000000177 14527463515 0032272 0 ustar 00root root 0000000 0000000 {% load i18n %} {% autoescape off %} {% blocktrans %}Invitation to join {{ site_name }}{% endblocktrans %} {% endautoescape %} django-invitations-2.1.0/invitations/templates/invitations/forms/ 0000775 0000000 0000000 00000000000 14527463515 0025377 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/templates/invitations/forms/_invite.html 0000664 0000000 0000000 00000001356 14527463515 0027727 0 ustar 00root root 0000000 0000000 {% load i18n %} {% trans "Invite" %} {% trans "Please add an email below. The user will receive an email with instructions." %} {% csrf_token %} {% for error in form.email.errors %} {{ error }} {% endfor %} {{ success_message }} django-invitations-2.1.0/invitations/templates/invitations/messages/ 0000775 0000000 0000000 00000000000 14527463515 0026060 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/invitations/templates/invitations/messages/invite_accepted.txt 0000664 0000000 0000000 00000000214 14527463515 0031744 0 ustar 00root root 0000000 0000000 {% load i18n %} {% autoescape off %} {% blocktrans %}Invitation to - {{ email }} - has been accepted{% endblocktrans %} {% endautoescape %} django-invitations-2.1.0/invitations/templates/invitations/messages/invite_already_accepted.txt 0000664 0000000 0000000 00000000221 14527463515 0033443 0 ustar 00root root 0000000 0000000 {% load i18n %} {% autoescape off %} {% blocktrans %}The invitation for {{ email }} was already accepted.{% endblocktrans %} {% endautoescape %} django-invitations-2.1.0/invitations/templates/invitations/messages/invite_expired.txt 0000664 0000000 0000000 00000000210 14527463515 0031630 0 ustar 00root root 0000000 0000000 {% load i18n %} {% autoescape off %} {% blocktrans %}The invitation for {{ email }} has expired.{% endblocktrans %} {% endautoescape %} django-invitations-2.1.0/invitations/templates/invitations/messages/invite_invalid.txt 0000664 0000000 0000000 00000000205 14527463515 0031622 0 ustar 00root root 0000000 0000000 {% load i18n %} {% autoescape off %} {% blocktrans %}An invalid invitation key was submitted.{% endblocktrans %} {% endautoescape %} django-invitations-2.1.0/invitations/urls.py 0000664 0000000 0000000 00000000653 14527463515 0021247 0 ustar 00root root 0000000 0000000 from django.urls import path, re_path from . import views app_name = "invitations" urlpatterns = [ path("send-invite/", views.SendInvite.as_view(), name="send-invite"), path( "send-json-invite/", views.SendJSONInvite.as_view(), name="send-json-invite", ), re_path( r"^accept-invite/(?P\w+)/?$", views.AcceptInvite.as_view(), name="accept-invite", ), ] django-invitations-2.1.0/invitations/utils.py 0000664 0000000 0000000 00000002556 14527463515 0021426 0 ustar 00root root 0000000 0000000 from django.apps import apps as django_apps from django.core.exceptions import ImproperlyConfigured from .app_settings import app_settings try: import importlib except ImportError: from django.utils import importlib def import_attribute(path): assert isinstance(path, str) pkg, attr = path.rsplit(".", 1) ret = getattr(importlib.import_module(pkg), attr) return ret def get_invite_form(): """ Returns the form for sending an invite. """ return import_attribute(app_settings.INVITE_FORM) def get_invitation_admin_add_form(): """ Returns the form for creating a new invitation in admin. """ return import_attribute(app_settings.ADMIN_ADD_FORM) def get_invitation_admin_change_form(): """ Returns the form for changing invitations in admin. """ return import_attribute(app_settings.ADMIN_CHANGE_FORM) def get_invitation_model(): """ Returns the Invitation model that is active in this project. """ path = app_settings.INVITATION_MODEL try: return django_apps.get_model(path) except ValueError: raise ImproperlyConfigured("path must be of the form 'app_label.model_name'") except LookupError: raise ImproperlyConfigured( "path refers to model '%s' that\ has not been installed" % app_settings.INVITATION_MODEL, ) django-invitations-2.1.0/invitations/views.py 0000664 0000000 0000000 00000016212 14527463515 0021415 0 ustar 00root root 0000000 0000000 import json from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.exceptions import ValidationError from django.core.validators import validate_email from django.http import Http404, HttpResponse from django.shortcuts import redirect from django.utils.decorators import method_decorator from django.utils.translation import gettext_lazy as _ from django.views.generic import FormView, View from django.views.generic.detail import SingleObjectMixin from .adapters import get_invitations_adapter from .app_settings import app_settings from .exceptions import AlreadyAccepted, AlreadyInvited, UserRegisteredEmail from .forms import CleanEmailMixin from .signals import invite_accepted from .utils import get_invitation_model, get_invite_form Invitation = get_invitation_model() InviteForm = get_invite_form() class SendInvite(FormView): template_name = "invitations/forms/_invite.html" form_class = InviteForm @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): return super().dispatch(request, *args, **kwargs) def form_valid(self, form): email = form.cleaned_data["email"] try: invite = form.save(email) invite.inviter = self.request.user invite.save() invite.send_invitation(self.request) except Exception: return self.form_invalid(form) return self.render_to_response( self.get_context_data( success_message=_("%(email)s has been invited") % {"email": email}, ), ) def form_invalid(self, form): return self.render_to_response(self.get_context_data(form=form)) class SendJSONInvite(View): http_method_names = ["post"] @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): if app_settings.ALLOW_JSON_INVITES: return super().dispatch(request, *args, **kwargs) else: raise Http404 def post(self, request, *args, **kwargs): status_code = 400 invitees = json.loads(request.body.decode()) response = {"valid": [], "invalid": []} if isinstance(invitees, list): for invitee in invitees: try: validate_email(invitee) CleanEmailMixin().validate_invitation(invitee) invite = Invitation.create(invitee) except (ValueError, KeyError): pass except ValidationError: response["invalid"].append({invitee: "invalid email"}) except AlreadyAccepted: response["invalid"].append({invitee: "already accepted"}) except AlreadyInvited: response["invalid"].append({invitee: "pending invite"}) except UserRegisteredEmail: response["invalid"].append({invitee: "user registered email"}) else: invite.inviter = self.request.user invite.save() invite.send_invitation(request) response["valid"].append({invitee: "invited"}) if response["valid"]: status_code = 201 return HttpResponse( json.dumps(response), status=status_code, content_type="application/json", ) class AcceptInvite(SingleObjectMixin, View): form_class = InviteForm def get_signup_redirect(self): return app_settings.SIGNUP_REDIRECT def get(self, *args, **kwargs): if app_settings.CONFIRM_INVITE_ON_GET: return self.post(*args, **kwargs) else: raise Http404() def post(self, *args, **kwargs): self.object = invitation = self.get_object() # Compatibility with older versions: return an HTTP 410 GONE if there # is an error. # Error conditions are: no key, expired key or # previously accepted key. if app_settings.GONE_ON_ACCEPT_ERROR and ( not invitation or (invitation and (invitation.accepted or invitation.key_expired())) ): return HttpResponse(status=410) # No invitation was found. if not invitation: # Newer behavior: show an error message and redirect. get_invitations_adapter().add_message( self.request, messages.ERROR, "invitations/messages/invite_invalid.txt", ) return redirect(app_settings.LOGIN_REDIRECT) # The invitation was previously accepted, redirect to the login # view. if invitation.accepted: get_invitations_adapter().add_message( self.request, messages.ERROR, "invitations/messages/invite_already_accepted.txt", {"email": invitation.email}, ) # Redirect to login since there's hopefully an account already. return redirect(app_settings.LOGIN_REDIRECT) # The key was expired. if invitation.key_expired(): get_invitations_adapter().add_message( self.request, messages.ERROR, "invitations/messages/invite_expired.txt", {"email": invitation.email}, ) # Redirect to sign-up since they might be able to register anyway. return redirect(self.get_signup_redirect()) # The invitation is valid. # Mark it as accepted now if ACCEPT_INVITE_AFTER_SIGNUP is False. if not app_settings.ACCEPT_INVITE_AFTER_SIGNUP: accept_invitation( invitation=invitation, request=self.request, signal_sender=self.__class__, ) get_invitations_adapter().stash_verified_email(self.request, invitation.email) return redirect(self.get_signup_redirect()) def get_object(self, queryset=None): if queryset is None: queryset = self.get_queryset() try: return queryset.get(key=self.kwargs["key"].lower()) except Invitation.DoesNotExist: return None def get_queryset(self): return Invitation.objects.all() def accept_invitation(invitation, request, signal_sender): invitation.accepted = True invitation.save() invite_accepted.send( sender=signal_sender, email=invitation.email, request=request, invitation=invitation, ) get_invitations_adapter().add_message( request, messages.SUCCESS, "invitations/messages/invite_accepted.txt", {"email": invitation.email}, ) def accept_invite_after_signup(sender, request, user, **kwargs): invitation = Invitation.objects.filter(email__iexact=user.email).first() if invitation: accept_invitation( invitation=invitation, request=request, signal_sender=Invitation, ) if app_settings.ACCEPT_INVITE_AFTER_SIGNUP: signed_up_signal = get_invitations_adapter().get_user_signed_up_signal() signed_up_signal.connect(accept_invite_after_signup) django-invitations-2.1.0/manage.py 0000775 0000000 0000000 00000001225 14527463515 0017142 0 ustar 00root root 0000000 0000000 #!/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", "test_settings") 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() django-invitations-2.1.0/poetry.lock 0000664 0000000 0000000 00000133535 14527463515 0017543 0 ustar 00root root 0000000 0000000 # This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "asgiref" version = "3.5.2" description = "ASGI specs, helper code, and adapters" category = "main" optional = false python-versions = ">=3.7" files = [ {file = "asgiref-3.5.2-py3-none-any.whl", hash = "sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4"}, {file = "asgiref-3.5.2.tar.gz", hash = "sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424"}, ] [package.dependencies] typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] [[package]] name = "attrs" version = "22.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false python-versions = ">=3.5" files = [ {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] [package.extras] dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] [[package]] name = "black" version = "22.8.0" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.6.2" files = [ {file = "black-22.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ce957f1d6b78a8a231b18e0dd2d94a33d2ba738cd88a7fe64f53f659eea49fdd"}, {file = "black-22.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5107ea36b2b61917956d018bd25129baf9ad1125e39324a9b18248d362156a27"}, {file = "black-22.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e8166b7bfe5dcb56d325385bd1d1e0f635f24aae14b3ae437102dedc0c186747"}, {file = "black-22.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd82842bb272297503cbec1a2600b6bfb338dae017186f8f215c8958f8acf869"}, {file = "black-22.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d839150f61d09e7217f52917259831fe2b689f5c8e5e32611736351b89bb2a90"}, {file = "black-22.8.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:a05da0430bd5ced89176db098567973be52ce175a55677436a271102d7eaa3fe"}, {file = "black-22.8.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a098a69a02596e1f2a58a2a1c8d5a05d5a74461af552b371e82f9fa4ada8342"}, {file = "black-22.8.0-cp36-cp36m-win_amd64.whl", hash = "sha256:5594efbdc35426e35a7defa1ea1a1cb97c7dbd34c0e49af7fb593a36bd45edab"}, {file = "black-22.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a983526af1bea1e4cf6768e649990f28ee4f4137266921c2c3cee8116ae42ec3"}, {file = "black-22.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b2c25f8dea5e8444bdc6788a2f543e1fb01494e144480bc17f806178378005e"}, {file = "black-22.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:78dd85caaab7c3153054756b9fe8c611efa63d9e7aecfa33e533060cb14b6d16"}, {file = "black-22.8.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:cea1b2542d4e2c02c332e83150e41e3ca80dc0fb8de20df3c5e98e242156222c"}, {file = "black-22.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5b879eb439094751185d1cfdca43023bc6786bd3c60372462b6f051efa6281a5"}, {file = "black-22.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0a12e4e1353819af41df998b02c6742643cfef58282915f781d0e4dd7a200411"}, {file = "black-22.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3a73f66b6d5ba7288cd5d6dad9b4c9b43f4e8a4b789a94bf5abfb878c663eb3"}, {file = "black-22.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:e981e20ec152dfb3e77418fb616077937378b322d7b26aa1ff87717fb18b4875"}, {file = "black-22.8.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8ce13ffed7e66dda0da3e0b2eb1bdfc83f5812f66e09aca2b0978593ed636b6c"}, {file = "black-22.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:32a4b17f644fc288c6ee2bafdf5e3b045f4eff84693ac069d87b1a347d861497"}, {file = "black-22.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0ad827325a3a634bae88ae7747db1a395d5ee02cf05d9aa7a9bd77dfb10e940c"}, {file = "black-22.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53198e28a1fb865e9fe97f88220da2e44df6da82b18833b588b1883b16bb5d41"}, {file = "black-22.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:bc4d4123830a2d190e9cc42a2e43570f82ace35c3aeb26a512a2102bce5af7ec"}, {file = "black-22.8.0-py3-none-any.whl", hash = "sha256:d2c21d439b2baf7aa80d6dd4e3659259be64c6f49dfd0f32091063db0e006db4"}, {file = "black-22.8.0.tar.gz", hash = "sha256:792f7eb540ba9a17e8656538701d3eb1afcb134e3b45b71f20b25c77a8db7e6e"}, ] [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cfgv" version = "3.3.1" description = "Validate configuration and produce human readable error messages." category = "dev" optional = false python-versions = ">=3.6.1" files = [ {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, ] [[package]] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" version = "0.4.5" description = "Cross-platform colored terminal text." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] [[package]] name = "coverage" version = "6.4.4" description = "Code coverage measurement for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "coverage-6.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7b4da9bafad21ea45a714d3ea6f3e1679099e420c8741c74905b92ee9bfa7cc"}, {file = "coverage-6.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fde17bc42e0716c94bf19d92e4c9f5a00c5feb401f5bc01101fdf2a8b7cacf60"}, {file = "coverage-6.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdbb0d89923c80dbd435b9cf8bba0ff55585a3cdb28cbec65f376c041472c60d"}, {file = "coverage-6.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:67f9346aeebea54e845d29b487eb38ec95f2ecf3558a3cffb26ee3f0dcc3e760"}, {file = "coverage-6.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42c499c14efd858b98c4e03595bf914089b98400d30789511577aa44607a1b74"}, {file = "coverage-6.4.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c35cca192ba700979d20ac43024a82b9b32a60da2f983bec6c0f5b84aead635c"}, {file = "coverage-6.4.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:9cc4f107009bca5a81caef2fca843dbec4215c05e917a59dec0c8db5cff1d2aa"}, {file = "coverage-6.4.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5f444627b3664b80d078c05fe6a850dd711beeb90d26731f11d492dcbadb6973"}, {file = "coverage-6.4.4-cp310-cp310-win32.whl", hash = "sha256:66e6df3ac4659a435677d8cd40e8eb1ac7219345d27c41145991ee9bf4b806a0"}, {file = "coverage-6.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:35ef1f8d8a7a275aa7410d2f2c60fa6443f4a64fae9be671ec0696a68525b875"}, {file = "coverage-6.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c1328d0c2f194ffda30a45f11058c02410e679456276bfa0bbe0b0ee87225fac"}, {file = "coverage-6.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61b993f3998ee384935ee423c3d40894e93277f12482f6e777642a0141f55782"}, {file = "coverage-6.4.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d5dd4b8e9cd0deb60e6fcc7b0647cbc1da6c33b9e786f9c79721fd303994832f"}, {file = "coverage-6.4.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7026f5afe0d1a933685d8f2169d7c2d2e624f6255fb584ca99ccca8c0e966fd7"}, {file = "coverage-6.4.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9c7b9b498eb0c0d48b4c2abc0e10c2d78912203f972e0e63e3c9dc21f15abdaa"}, {file = "coverage-6.4.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ee2b2fb6eb4ace35805f434e0f6409444e1466a47f620d1d5763a22600f0f892"}, {file = "coverage-6.4.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ab066f5ab67059d1f1000b5e1aa8bbd75b6ed1fc0014559aea41a9eb66fc2ce0"}, {file = "coverage-6.4.4-cp311-cp311-win32.whl", hash = "sha256:9d6e1f3185cbfd3d91ac77ea065d85d5215d3dfa45b191d14ddfcd952fa53796"}, {file = "coverage-6.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:e3d3c4cc38b2882f9a15bafd30aec079582b819bec1b8afdbde8f7797008108a"}, {file = "coverage-6.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a095aa0a996ea08b10580908e88fbaf81ecf798e923bbe64fb98d1807db3d68a"}, {file = "coverage-6.4.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef6f44409ab02e202b31a05dd6666797f9de2aa2b4b3534e9d450e42dea5e817"}, {file = "coverage-6.4.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b7101938584d67e6f45f0015b60e24a95bf8dea19836b1709a80342e01b472f"}, {file = "coverage-6.4.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14a32ec68d721c3d714d9b105c7acf8e0f8a4f4734c811eda75ff3718570b5e3"}, {file = "coverage-6.4.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6a864733b22d3081749450466ac80698fe39c91cb6849b2ef8752fd7482011f3"}, {file = "coverage-6.4.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:08002f9251f51afdcc5e3adf5d5d66bb490ae893d9e21359b085f0e03390a820"}, {file = "coverage-6.4.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a3b2752de32c455f2521a51bd3ffb53c5b3ae92736afde67ce83477f5c1dd928"}, {file = "coverage-6.4.4-cp37-cp37m-win32.whl", hash = "sha256:f855b39e4f75abd0dfbcf74a82e84ae3fc260d523fcb3532786bcbbcb158322c"}, {file = "coverage-6.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:ee6ae6bbcac0786807295e9687169fba80cb0617852b2fa118a99667e8e6815d"}, {file = "coverage-6.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:564cd0f5b5470094df06fab676c6d77547abfdcb09b6c29c8a97c41ad03b103c"}, {file = "coverage-6.4.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cbbb0e4cd8ddcd5ef47641cfac97d8473ab6b132dd9a46bacb18872828031685"}, {file = "coverage-6.4.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6113e4df2fa73b80f77663445be6d567913fb3b82a86ceb64e44ae0e4b695de1"}, {file = "coverage-6.4.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d032bfc562a52318ae05047a6eb801ff31ccee172dc0d2504614e911d8fa83e"}, {file = "coverage-6.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e431e305a1f3126477abe9a184624a85308da8edf8486a863601d58419d26ffa"}, {file = "coverage-6.4.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cf2afe83a53f77aec067033199797832617890e15bed42f4a1a93ea24794ae3e"}, {file = "coverage-6.4.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:783bc7c4ee524039ca13b6d9b4186a67f8e63d91342c713e88c1865a38d0892a"}, {file = "coverage-6.4.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ff934ced84054b9018665ca3967fc48e1ac99e811f6cc99ea65978e1d384454b"}, {file = "coverage-6.4.4-cp38-cp38-win32.whl", hash = "sha256:e1fabd473566fce2cf18ea41171d92814e4ef1495e04471786cbc943b89a3781"}, {file = "coverage-6.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:4179502f210ebed3ccfe2f78bf8e2d59e50b297b598b100d6c6e3341053066a2"}, {file = "coverage-6.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:98c0b9e9b572893cdb0a00e66cf961a238f8d870d4e1dc8e679eb8bdc2eb1b86"}, {file = "coverage-6.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fc600f6ec19b273da1d85817eda339fb46ce9eef3e89f220055d8696e0a06908"}, {file = "coverage-6.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a98d6bf6d4ca5c07a600c7b4e0c5350cd483c85c736c522b786be90ea5bac4f"}, {file = "coverage-6.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01778769097dbd705a24e221f42be885c544bb91251747a8a3efdec6eb4788f2"}, {file = "coverage-6.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfa0b97eb904255e2ab24166071b27408f1f69c8fbda58e9c0972804851e0558"}, {file = "coverage-6.4.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:fcbe3d9a53e013f8ab88734d7e517eb2cd06b7e689bedf22c0eb68db5e4a0a19"}, {file = "coverage-6.4.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:15e38d853ee224e92ccc9a851457fb1e1f12d7a5df5ae44544ce7863691c7a0d"}, {file = "coverage-6.4.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6913dddee2deff8ab2512639c5168c3e80b3ebb0f818fed22048ee46f735351a"}, {file = "coverage-6.4.4-cp39-cp39-win32.whl", hash = "sha256:354df19fefd03b9a13132fa6643527ef7905712109d9c1c1903f2133d3a4e145"}, {file = "coverage-6.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:1238b08f3576201ebf41f7c20bf59baa0d05da941b123c6656e42cdb668e9827"}, {file = "coverage-6.4.4-pp36.pp37.pp38-none-any.whl", hash = "sha256:f67cf9f406cf0d2f08a3515ce2db5b82625a7257f88aad87904674def6ddaec1"}, {file = "coverage-6.4.4.tar.gz", hash = "sha256:e16c45b726acb780e1e6f88b286d3c10b3914ab03438f32117c4aa52d7f30d58"}, ] [package.dependencies] tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} [package.extras] toml = ["tomli"] [[package]] name = "distlib" version = "0.3.6" description = "Distribution utilities" category = "dev" optional = false python-versions = "*" files = [ {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, ] [[package]] name = "django" version = "3.2.19" description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." category = "main" optional = false python-versions = ">=3.6" files = [ {file = "Django-3.2.19-py3-none-any.whl", hash = "sha256:21cc991466245d659ab79cb01204f9515690f8dae00e5eabde307f14d24d4d7d"}, {file = "Django-3.2.19.tar.gz", hash = "sha256:031365bae96814da19c10706218c44dff3b654cc4de20a98bd2d29b9bde469f0"}, ] [package.dependencies] asgiref = ">=3.3.2,<4" pytz = "*" sqlparse = ">=0.2.2" [package.extras] argon2 = ["argon2-cffi (>=19.1.0)"] bcrypt = ["bcrypt"] [[package]] name = "filelock" version = "3.8.0" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, ] [package.extras] docs = ["furo (>=2022.6.21)", "sphinx (>=5.1.1)", "sphinx-autodoc-typehints (>=1.19.1)"] testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" version = "5.0.4" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false python-versions = ">=3.6.1" files = [ {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, ] [package.dependencies] importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""} mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.9.0,<2.10.0" pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "freezegun" version = "1.2.2" description = "Let your Python tests travel through time" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "freezegun-1.2.2-py3-none-any.whl", hash = "sha256:ea1b963b993cb9ea195adbd893a48d573fda951b0da64f60883d7e988b606c9f"}, {file = "freezegun-1.2.2.tar.gz", hash = "sha256:cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446"}, ] [package.dependencies] python-dateutil = ">=2.7" [[package]] name = "identify" version = "2.5.5" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "identify-2.5.5-py2.py3-none-any.whl", hash = "sha256:ef78c0d96098a3b5fe7720be4a97e73f439af7cf088ebf47b620aeaa10fadf97"}, {file = "identify-2.5.5.tar.gz", hash = "sha256:322a5699daecf7c6fd60e68852f36f2ecbb6a36ff6e6e973e0d2bb6fca203ee6"}, ] [package.extras] license = ["ukkonen"] [[package]] name = "importlib-metadata" version = "4.2.0" description = "Read metadata from Python packages" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"}, {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"}, ] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] [[package]] name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" category = "dev" optional = false python-versions = "*" files = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] [[package]] name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." category = "dev" optional = false python-versions = "*" files = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] [[package]] name = "nodeenv" version = "1.7.0" description = "Node.js virtual environment builder" category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, ] [package.dependencies] setuptools = "*" [[package]] name = "packaging" version = "21.3" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] [package.dependencies] pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "pathspec" version = "0.10.1" description = "Utility library for gitignore style pattern matching of file paths." category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "pathspec-0.10.1-py3-none-any.whl", hash = "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93"}, {file = "pathspec-0.10.1.tar.gz", hash = "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d"}, ] [[package]] name = "platformdirs" version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] [package.extras] docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"] test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] [[package]] name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" version = "2.20.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "pre_commit-2.20.0-py2.py3-none-any.whl", hash = "sha256:51a5ba7c480ae8072ecdb6933df22d2f812dc897d5fe848778116129a681aac7"}, {file = "pre_commit-2.20.0.tar.gz", hash = "sha256:a978dac7bc9ec0bcee55c18a277d553b0f419d259dadb4b9418ff2d00eb43959"}, ] [package.dependencies] cfgv = ">=2.0.0" identify = ">=1.0.0" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} nodeenv = ">=0.11.1" pyyaml = ">=5.1" toml = "*" virtualenv = ">=20.0.8" [[package]] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] [[package]] name = "pycodestyle" version = "2.9.1" description = "Python style guide checker" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, ] [[package]] name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, ] [[package]] name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "dev" optional = false python-versions = ">=3.6.8" files = [ {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] [package.extras] diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" version = "7.1.3" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "pytest-7.1.3-py3-none-any.whl", hash = "sha256:1377bda3466d70b55e3f5cecfa55bb7cfcf219c7964629b967c37cf0bda818b7"}, {file = "pytest-7.1.3.tar.gz", hash = "sha256:4f365fec2dff9c1162f834d9f18af1ba13062db0c708bf7b946f8a5c76180c39"}, ] [package.dependencies] attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" py = ">=1.8.2" tomli = ">=1.0.0" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-cov" version = "3.0.0" description = "Pytest plugin for measuring coverage." category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, ] [package.dependencies] coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] [[package]] name = "pytest-django" version = "4.5.2" description = "A Django plugin for pytest." category = "dev" optional = false python-versions = ">=3.5" files = [ {file = "pytest-django-4.5.2.tar.gz", hash = "sha256:d9076f759bb7c36939dbdd5ae6633c18edfc2902d1a69fdbefd2426b970ce6c2"}, {file = "pytest_django-4.5.2-py3-none-any.whl", hash = "sha256:c60834861933773109334fe5a53e83d1ef4828f2203a1d6a0fa9972f4f75ab3e"}, ] [package.dependencies] pytest = ">=5.4.0" [package.extras] docs = ["sphinx", "sphinx-rtd-theme"] testing = ["Django", "django-configurations (>=2.0)"] [[package]] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] [package.dependencies] six = ">=1.5" [[package]] name = "pytz" version = "2022.2.1" description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" files = [ {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, ] [[package]] name = "PyYAML" version = "6.0" description = "YAML parser and emitter for Python" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] [[package]] name = "setuptools" version = "65.5.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "setuptools-65.5.1-py3-none-any.whl", hash = "sha256:d0b9a8433464d5800cbe05094acf5c6d52a91bfac9b52bcfc4d41382be5d5d31"}, {file = "setuptools-65.5.1.tar.gz", hash = "sha256:e197a19aa8ec9722928f2206f8de752def0e4c9fc6953527360d1c36d94ddb2f"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] [[package]] name = "sqlparse" version = "0.4.4" description = "A non-validating SQL parser." category = "main" optional = false python-versions = ">=3.5" files = [ {file = "sqlparse-0.4.4-py3-none-any.whl", hash = "sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3"}, {file = "sqlparse-0.4.4.tar.gz", hash = "sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c"}, ] [package.extras] dev = ["build", "flake8"] doc = ["sphinx"] test = ["pytest", "pytest-cov"] [[package]] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] [[package]] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] [[package]] name = "tox" version = "3.26.0" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ {file = "tox-3.26.0-py2.py3-none-any.whl", hash = "sha256:bf037662d7c740d15c9924ba23bb3e587df20598697bb985ac2b49bdc2d847f6"}, {file = "tox-3.26.0.tar.gz", hash = "sha256:44f3c347c68c2c68799d7d44f1808f9d396fc8a1a500cbc624253375c7ae107e"}, ] [package.dependencies] colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} filelock = ">=3.0.0" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} packaging = ">=14" pluggy = ">=0.12.0" py = ">=1.4.17" six = ">=1.14.0" tomli = {version = ">=2.0.1", markers = "python_version >= \"3.7\" and python_version < \"3.11\""} virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" [package.extras] docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)"] [[package]] name = "typed-ast" version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"}, {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"}, {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"}, {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"}, {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"}, {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"}, {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"}, {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"}, {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"}, {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"}, {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"}, {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"}, {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"}, {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"}, {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"}, {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"}, {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"}, {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"}, {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"}, {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"}, {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"}, {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"}, {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"}, {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"}, ] [[package]] name = "typing-extensions" version = "4.3.0" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" files = [ {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, ] [[package]] name = "virtualenv" version = "20.16.2" description = "Virtual Python Environment builder" category = "dev" optional = false python-versions = ">=3.6" files = [ {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, ] [package.dependencies] distlib = ">=0.3.1,<1" filelock = ">=3.2,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} platformdirs = ">=2,<3" [package.extras] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] [[package]] name = "zipp" version = "3.8.1" description = "Backport of pathlib-compatible object wrapper for zip files" category = "dev" optional = false python-versions = ">=3.7" files = [ {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, ] [package.extras] docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx"] testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "2.0" python-versions = "^3.7" content-hash = "3ac3b7ab3c34bd9b96eb0de57a5f030e81c4ef14b384f712802385f53e38845b" django-invitations-2.1.0/pyproject.toml 0000664 0000000 0000000 00000003350 14527463515 0020252 0 ustar 00root root 0000000 0000000 [tool.poetry] name = "django-invitations" version = "2.1.0" description = "Generic invitations app with support for django-allauth" authors = ["bee-keeper"] homepage = "https://github.com/jazzband/django-invitations/" repository = "https://github.com/jazzband/django-invitations/" documentation = "https://django-invitations.readthedocs.io/en/latest/" license = "GPL-3.0-only" maintainers = ["JazzBand"] readme = "README.md" keywords = ['django', 'invitation', 'django-allauth', 'invite'] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules", "Environment :: Web Environment", "Topic :: Internet", "Framework :: Django", "Framework :: Django :: 3.2", "Framework :: Django :: 4.0", "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", "Programming Language :: Python", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)" ] packages = [ { include = "invitations" } ] [tool.poetry.dependencies] python = "^3.8" django = ">=3.2" [tool.poetry.dev-dependencies] coverage = "^6.3.2" flake8 = "^5.0.4" freezegun = "^1.2.1" pytest = "^7.1.1" pytest-django = "^4.5.2" pytest-cov = "^3.0.0" tox = "3.26.0" black = "^22.1.0" [tool.poetry.group.dev.dependencies] pre-commit = "^2.20.0" [tool.black] line-length = 88 target-version = ["py310"] extend-exclude = "/migrations/" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" django-invitations-2.1.0/setup.cfg 0000664 0000000 0000000 00000002170 14527463515 0017156 0 ustar 00root root 0000000 0000000 [metadata] name = django-invitations version = 1.9.3 description = Generic invitations app with support for django-allauth long_description = file: README.md author = https://github.com/bee-keeper author_email = none@none.com url = https://github.com/jazzband/django-invitations.git keywords = django invitation django-allauth invite license = GPL-3.0-only classifiers = Development Status :: 4 - Beta Intended Audience :: Developers Topic :: Software Development :: Libraries :: Python Modules Environment :: Web Environment Topic :: Internet Framework :: Django Framework :: Django:: 3.2 Framework :: Django:: 4.0 Programming Language :: Python Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 License :: OSI Approved :: GPL-3.0-only license_file = LICENSE [options] package_dir= =invitations packages = find: include_package_data = True python_requires = >=3.7 zip_safe = False [options.package_data] invitations = "templates/*.*" [options.packages.find] where = invitations django-invitations-2.1.0/test_allauth_settings.py 0000664 0000000 0000000 00000001156 14527463515 0022323 0 ustar 00root root 0000000 0000000 from test_settings import * # noqa: F403 INSTALLED_APPS = ( "django.contrib.auth", "django.contrib.admin", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "django.contrib.messages", "allauth", "allauth.account", "allauth.socialaccount", "invitations", "tests", ) AUTHENTICATION_BACKENDS = ( "django.contrib.auth.backends.ModelBackend", "allauth.account.auth_backends.AuthenticationBackend", ) ACCOUNT_ADAPTER = "invitations.models.InvitationsAdapter" MIDDLEWARE.append("allauth.account.middleware.AccountMiddleware") # noqa: F405 django-invitations-2.1.0/test_settings.py 0000664 0000000 0000000 00000002705 14527463515 0020612 0 ustar 00root root 0000000 0000000 SECRET_KEY = "not_empty" SITE_ID = 1 DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", }, } ROOT_URLCONF = "test_urls" STATIC_URL = "/static/" TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": [], "APP_DIRS": True, "OPTIONS": { "context_processors": [ "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", ], }, }, ] MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", ] EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend" INSTALLED_APPS = ( "django.contrib.auth", "django.contrib.admin", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "django.contrib.messages", "tests", "invitations", ) AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",) django-invitations-2.1.0/test_urls.py 0000664 0000000 0000000 00000000532 14527463515 0017733 0 ustar 00root root 0000000 0000000 from django.conf import settings from django.contrib import admin from django.urls import include, path admin.autodiscover() urlpatterns = [ path("invitations/", include("invitations.urls")), path("admin/", admin.site.urls), ] if "allauth" in settings.INSTALLED_APPS: urlpatterns.append(path("accounts/", include("allauth.urls"))) django-invitations-2.1.0/tests/ 0000775 0000000 0000000 00000000000 14527463515 0016477 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0020576 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/allauth/ 0000775 0000000 0000000 00000000000 14527463515 0020131 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/allauth/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0022230 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/allauth/test_allauth.py 0000664 0000000 0000000 00000012724 14527463515 0023202 0 ustar 00root root 0000000 0000000 from invitations.app_settings import app_settings try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse import pytest from allauth.account.models import EmailAddress from django.test import Client from django.test.client import RequestFactory from invitations.adapters import get_invitations_adapter from invitations.models import InvitationsAdapter from invitations.utils import get_invitation_model Invitation = get_invitation_model() class TestAllAuthIntegrationAcceptAfterSignup: client = Client() adapter = get_invitations_adapter() @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_accepted_invitation_after_signup( self, settings, method, sent_invitation_by_user_a, user_a, ): settings.INVITATIONS_ACCEPT_INVITE_AFTER_SIGNUP = True client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) assert resp.status_code == 200 invite = Invitation.objects.get(email="email@example.com") assert invite.inviter == user_a assert invite.accepted is False assert resp.request["PATH_INFO"] == reverse("account_signup") form = resp.context_data["form"] assert "email@example.com" == form.fields["email"].initial resp = self.client.post( reverse("account_signup"), { "email": "email@example.com", "username": "username", "password1": "password", "password2": "password", }, ) invite = Invitation.objects.get(email="email@example.com") assert invite.accepted is True @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_invite_accepted_after_signup_with_altered_case_email( self, settings, method, sent_invitation_by_user_a, user_a, ): settings.INVITATIONS_ACCEPT_INVITE_AFTER_SIGNUP = True client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) invite = Invitation.objects.get(email="email@example.com") assert invite.accepted is False form = resp.context_data["form"] assert "email@example.com" == form.fields["email"].initial resp = self.client.post( reverse("account_signup"), { "email": "EMAIL@EXAMPLE.COM", "username": "username", "password1": "password", "password2": "password", }, ) invite = Invitation.objects.get(email="email@example.com") assert invite.accepted is True class TestAllAuthIntegration: client = Client() adapter = get_invitations_adapter() @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_allauth( self, method, settings, user_a, sent_invitation_by_user_a, ): client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) invite = Invitation.objects.get(email="email@example.com") assert invite.accepted assert invite.inviter == user_a assert resp.request["PATH_INFO"] == reverse("account_signup") form = resp.context_data["form"] assert "email@example.com" == form.fields["email"].initial messages = resp.context["messages"] message_text = [message.message for message in messages] assert "Invitation to - email@example.com - has been accepted" in message_text resp = self.client.post( reverse("account_signup"), { "email": "email@example.com", "username": "username", "password1": "password", "password2": "password", }, ) allauth_email_obj = EmailAddress.objects.get(email="email@example.com") assert allauth_email_obj.verified is True def test_fetch_adapter(self): assert isinstance(self.adapter, InvitationsAdapter) def test_allauth_signup_open(self): signup_request = RequestFactory().get( reverse("account_signup", urlconf="allauth.account.urls"), ) assert self.adapter.is_open_for_signup(signup_request) is True @pytest.mark.django_db def test_allauth_adapter_invitations_only(self, settings): settings.INVITATIONS_INVITATION_ONLY = True signup_request = RequestFactory().get( reverse("account_signup", urlconf="allauth.account.urls"), ) assert self.adapter.is_open_for_signup(signup_request) is False response = self.client.get(reverse("account_signup")) assert "Sign Up Closed" in response.content.decode("utf8") django-invitations-2.1.0/tests/basic/ 0000775 0000000 0000000 00000000000 14527463515 0017560 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/basic/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0021657 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/basic/tests.py 0000664 0000000 0000000 00000042727 14527463515 0021310 0 ustar 00root root 0000000 0000000 import datetime import json import re from unittest.mock import patch from django.test import Client from django.test.client import RequestFactory from django.test.utils import override_settings from django.utils import timezone try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse import pytest from django.contrib.auth.models import AnonymousUser from django.core import mail from freezegun import freeze_time from invitations.adapters import BaseInvitationsAdapter, get_invitations_adapter from invitations.app_settings import app_settings from invitations.forms import InviteForm from invitations.utils import get_invitation_model from invitations.views import AcceptInvite, SendJSONInvite Invitation = get_invitation_model() class TestInvitationModel: @freeze_time("2015-07-30 12:00:06") def test_create_invitation(self, invitation_a): assert invitation_a.email == "email@example.com" assert invitation_a.key assert invitation_a.accepted is False assert invitation_a.created == timezone.now() def test_invitation_key_expiry(self, invitation_a): invitation_a.sent = timezone.now() - datetime.timedelta( days=app_settings.INVITATION_EXPIRY, minutes=1, ) assert invitation_a.key_expired() is True invitation_a.sent = timezone.now() - datetime.timedelta( days=app_settings.INVITATION_EXPIRY, minutes=-1, ) assert invitation_a.key_expired() is False class TestInvitationsAdapter: def test_fetch_adapter(self): adapter = get_invitations_adapter() assert isinstance(adapter, BaseInvitationsAdapter) def test_email_subject_prefix_settings_with_site(self): adapter = get_invitations_adapter() result = adapter.format_email_subject("Bar", context={"site_name": "Foo.com"}) assert result == "[Foo.com] Bar" @override_settings(INVITATIONS_EMAIL_SUBJECT_PREFIX="") def test_email_subject_prefix_settings_with_custom_override(self): adapter = get_invitations_adapter() result = adapter.format_email_subject("Bar", context={"site_name": "Foo.com"}) assert result == "Bar" class TestInvitationsSendView: client = Client() @pytest.mark.django_db def test_auth(self): response = self.client.post( reverse("invitations:send-invite"), {"email": "valid@example.com"}, follow=True, ) assert response.status_code == 404 @pytest.mark.parametrize( "email, error", [ ("invalid@example", "Enter a valid email address"), ("invited@example.com", "This e-mail address has already been"), ("flobble@example.com", "An active user is"), ], ) def test_invalid_form_submissions(self, user_a, user_b, invitation_b, email, error): self.client.login(username="flibble", password="password") resp = self.client.post(reverse("invitations:send-invite"), {"email": email}) form = resp.context_data["form"] assert error in form.errors["email"][0] @freeze_time("2015-07-30 12:00:06") def test_valid_form_submission(self, user_a): self.client.login(username="flibble", password="password") resp = self.client.post( reverse("invitations:send-invite"), {"email": "email@example.com"}, ) invitation = Invitation.objects.get(email="email@example.com") assert resp.status_code == 200 assert "success_message" in resp.context_data.keys() assert invitation.sent == timezone.now() assert len(mail.outbox) == 1 assert mail.outbox[0].to[0] == "email@example.com" assert "Invitation to join example.com" in mail.outbox[0].subject url = re.search(r"(?P/invitations/[^\s]+)", mail.outbox[0].body).group( "url", ) assert url == reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": invitation.key}, ) @override_settings(INVITATION_MODEL="ExampleSwappableInvitation") @freeze_time("2015-07-30 12:00:06") def test_valid_form_submission_with_swapped_model(self, user_a): self.client.login(username="flibble", password="password") resp = self.client.post( reverse("invitations:send-invite"), {"email": "email@example.com"}, ) invitation = Invitation.objects.get(email="email@example.com") assert resp.status_code == 200 assert "success_message" in resp.context_data.keys() assert invitation.sent == timezone.now() assert len(mail.outbox) == 1 assert mail.outbox[0].to[0] == "email@example.com" assert "Invitation to join example.com" in mail.outbox[0].subject url = re.search(r"(?P/invitations/[^\s]+)", mail.outbox[0].body).group( "url", ) assert url == reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": invitation.key}, ) @pytest.mark.django_db class TestInvitationsAcceptView: client = Client() def test_accept_invite_get_is_404(self, settings, invitation_b): settings.INVITATIONS_CONFIRM_INVITE_ON_GET = False resp = self.client.get( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": invitation_b.key}, ), follow=True, ) assert resp.status_code == 404 @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_invalid_key(self, method): client_with_method = getattr(self.client, method) resp = client_with_method( reverse(app_settings.CONFIRMATION_URL_NAME, kwargs={"key": "invalidKey"}), follow=True, ) assert resp.status_code == 410 @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_invalid_key_error_disabled(self, settings, method): settings.INVITATIONS_GONE_ON_ACCEPT_ERROR = False settings.INVITATIONS_LOGIN_REDIRECT = "/login-url/" client_with_method = getattr(self.client, method) resp = client_with_method( reverse(app_settings.CONFIRMATION_URL_NAME, kwargs={"key": "invalidKey"}), follow=True, ) assert resp.request["PATH_INFO"] == "/login-url/" @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_accepted_key(self, accepted_invitation, method): client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": accepted_invitation.key}, ), follow=True, ) assert resp.status_code == 410 @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_accepted_key_error_disabled( self, settings, accepted_invitation, method, ): settings.INVITATIONS_GONE_ON_ACCEPT_ERROR = False settings.INVITATIONS_LOGIN_REDIRECT = "/login-url/" client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": accepted_invitation.key}, ), follow=True, ) assert resp.request["PATH_INFO"] == "/login-url/" @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_expired_key( self, settings, sent_invitation_by_user_a, method, ): settings.INVITATIONS_INVITATION_EXPIRY = 0 client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) assert resp.status_code == 410 @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite_expired_key_error_disabled( self, sent_invitation_by_user_a, method, settings, ): settings.INVITATIONS_INVITATION_EXPIRY = 0 settings.INVITATIONS_GONE_ON_ACCEPT_ERROR = False settings.INVITATIONS_SIGNUP_REDIRECT = "/signup-url/" client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) assert resp.request["PATH_INFO"] == "/signup-url/" @pytest.mark.parametrize( "method", [ ("get"), ("post"), ], ) def test_accept_invite(self, settings, sent_invitation_by_user_a, user_a, method): settings.INVITATIONS_SIGNUP_REDIRECT = "/non-existent-url/" client_with_method = getattr(self.client, method) resp = client_with_method( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) invite = Invitation.objects.get(email="email@example.com") assert invite.accepted is True assert invite.inviter == user_a assert resp.request["PATH_INFO"] == "/non-existent-url/" def test_signup_redirect(self, settings, sent_invitation_by_user_a): settings.INVITATIONS_SIGNUP_REDIRECT = "/non-existent-url/" resp = self.client.post( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) invite = Invitation.objects.get(email="email@example.com") assert invite.accepted is True assert resp.request["PATH_INFO"] == "/non-existent-url/" class TestInvitationSignals: client = Client() @patch("invitations.signals.invite_url_sent.send") def test_invite_url_sent_triggered_correctly( self, mock_signal, sent_invitation_by_user_a, user_a, ): invite_url = reverse( app_settings.CONFIRMATION_URL_NAME, args=[sent_invitation_by_user_a.key], ) request = RequestFactory().get("/") invite_url = request.build_absolute_uri(invite_url) sent_invitation_by_user_a.send_invitation(request) assert mock_signal.called assert mock_signal.call_count == 1 mock_signal.assert_called_with( instance=sent_invitation_by_user_a, invite_url_sent=invite_url, inviter=user_a, sender=Invitation, ) @override_settings(INVITATIONS_SIGNUP_REDIRECT="/non-existent-url/") @patch("invitations.signals.invite_accepted.send") def test_invite_invite_accepted_triggered_correctly( self, mock_signal, sent_invitation_by_user_a, ): request = RequestFactory().get("/") sent_invitation_by_user_a.send_invitation(request) self.client.post( reverse( app_settings.CONFIRMATION_URL_NAME, kwargs={"key": sent_invitation_by_user_a.key}, ), follow=True, ) assert mock_signal.called assert mock_signal.call_count == 1 assert mock_signal.call_args[1]["email"] == "email@example.com" assert mock_signal.call_args[1]["sender"] == AcceptInvite class TestInvitationsForm: @pytest.mark.parametrize( "email, form_validity, errors", [ ("bogger@example.com", True, None), ("accepted@example.com", False, "has already accepted an invite"), ("pending@example.com", False, "has already been invited"), ("flobble@example.com", False, "active user is using this"), ], ) def test_form( self, email, form_validity, errors, accepted_invitation, pending_invitation, user_b, ): form = InviteForm(data={"email": email}) if errors: assert errors in str(form.errors) else: assert form.errors == {} assert form.is_valid() is form_validity @pytest.mark.django_db class TestInvitationsManager: def test_managers( self, sent_invitation_by_user_a, accepted_invitation, expired_invitation, invitation_b, ): valid = Invitation.objects.all_valid().values_list("email", flat=True) expired = Invitation.objects.all_expired().values_list("email", flat=True) expected_valid = ["email@example.com", "invited@example.com"] expected_expired = ["accepted@example.com", "expired@example.com"] assert sorted(valid) == sorted(expected_valid) assert sorted(expired) == sorted(expected_expired) def test_delete_all(self): valid = Invitation.objects.all_valid().values_list("email", flat=True) Invitation.objects.delete_expired_confirmations() remaining_invites = Invitation.objects.all().values_list("email", flat=True) assert sorted(valid) == sorted(remaining_invites) class TestInvitationsJSON: client = Client() @pytest.mark.parametrize( "data, expected, status_code", [ ( ["accepted@example.com"], { "valid": [], "invalid": [{"accepted@example.com": "already accepted"}], }, 400, ), ( ["xample.com"], {"valid": [], "invalid": [{"xample.com": "invalid email"}]}, 400, ), ("xample.com", {"valid": [], "invalid": []}, 400), ( ["pending@example.com"], {"valid": [], "invalid": [{"pending@example.com": "pending invite"}]}, 400, ), ( ["flobble@example.com"], { "valid": [], "invalid": [{"flobble@example.com": "user registered email"}], }, 400, ), ( ["example@example.com"], {"valid": [{"example@example.com": "invited"}], "invalid": []}, 201, ), ], ) def test_post( self, settings, data, expected, status_code, user_a, accepted_invitation, pending_invitation, user_b, ): settings.INVITATIONS_ALLOW_JSON_INVITES = True self.client.login(username="flibble", password="password") response = self.client.post( reverse("invitations:send-json-invite"), data=json.dumps(data), content_type="application/json", ) assert response.status_code == status_code assert json.loads(response.content.decode()) == expected def test_json_setting(self, user_a): self.client.login(username="flibble", password="password") response = self.client.post( reverse("invitations:send-json-invite"), data=json.dumps(["example@example.com"]), content_type="application/json", ) assert response.status_code == 404 @override_settings(INVITATIONS_ALLOW_JSON_INVITES=True) def test_anonymous_get(self): request = RequestFactory().get( reverse("invitations:send-json-invite"), content_type="application/json", ) request.user = AnonymousUser() response = SendJSONInvite.as_view()(request) assert response.status_code == 302 def test_authenticated_get(self, settings, user_a): settings.INVITATIONS_ALLOW_JSON_INVITES = True request = RequestFactory().get( reverse("invitations:send-json-invite"), content_type="application/json", ) request.user = user_a response = SendJSONInvite.as_view()(request) assert response.status_code == 405 class TestInvitationsAdmin: client = Client() def test_admin_form_add(self, super_user): self.client.login(username="flibble", password="password") response = self.client.post( reverse("admin:invitations_invitation_add"), {"email": "valid@example.com", "inviter": super_user.id}, follow=True, ) invite = Invitation.objects.get(email="valid@example.com") assert response.status_code == 200 assert invite.sent assert invite.inviter == super_user def test_admin_form_change(self, super_user, invitation_b): self.client.login(username="flibble", password="password") response = self.client.get( reverse("admin:invitations_invitation_change", args=(invitation_b.id,)), follow=True, ) assert response.status_code == 200 fields = list(response.context_data["adminform"].form.fields.keys()) expected_fields = ["accepted", "key", "sent", "inviter", "email", "created"] assert fields == expected_fields django-invitations-2.1.0/tests/conftest.py 0000664 0000000 0000000 00000003755 14527463515 0020710 0 ustar 00root root 0000000 0000000 import datetime import pytest from django.contrib.auth import get_user_model from django.utils import timezone from freezegun import freeze_time from invitations.app_settings import app_settings from invitations.utils import get_invitation_model Invitation = get_invitation_model() @pytest.fixture def invitation_a(db): freezer = freeze_time("2015-07-30 12:00:06") freezer.start() inivitation = Invitation.create("email@example.com") freezer.stop() return inivitation @pytest.fixture def invitation_b(db): return Invitation.create("invited@example.com") @pytest.fixture def user_a(db): return get_user_model().objects.create_user(username="flibble", password="password") @pytest.fixture def user_b(db): return get_user_model().objects.create_user( username="flobble", password="password", email="flobble@example.com", ) @pytest.fixture def super_user(db): return get_user_model().objects.create_superuser( username="flibble", password="password", email="mrflibble@example.com", ) @pytest.fixture def sent_invitation_by_user_a(db, user_a): invite = Invitation.create("email@example.com", inviter=user_a) invite.sent = timezone.now() invite.save() return invite @pytest.fixture def accepted_invitation(db, user_a): invite = Invitation.create("accepted@example.com", inviter=user_a) invite.sent = timezone.now() invite.accepted = True invite.save() return invite @pytest.fixture def pending_invitation(db, user_a): invite = Invitation.create("pending@example.com", inviter=user_a) invite.sent = timezone.now() - datetime.timedelta( days=app_settings.INVITATION_EXPIRY - 1, ) invite.save() return invite @pytest.fixture def expired_invitation(db, user_a): invite = Invitation.create("expired@example.com") invite.sent = timezone.now() - datetime.timedelta( days=app_settings.INVITATION_EXPIRY + 1, ) invite.save() return invite django-invitations-2.1.0/tests/migrations/ 0000775 0000000 0000000 00000000000 14527463515 0020653 5 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/migrations/0001_initial.py 0000664 0000000 0000000 00000002131 14527463515 0023313 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-21 04:23 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ("invitations", "0003_auto_20151126_1523"), ] operations = [ migrations.CreateModel( name="ExampleSwappableInvitation", fields=[ ( "invitation_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="invitations.Invitation", ), ), ("additonal_field", models.CharField(blank=True, max_length=255)), ], options={ "abstract": False, }, bases=("invitations.invitation",), ), ] django-invitations-2.1.0/tests/migrations/__init__.py 0000664 0000000 0000000 00000000000 14527463515 0022752 0 ustar 00root root 0000000 0000000 django-invitations-2.1.0/tests/models.py 0000664 0000000 0000000 00000000273 14527463515 0020336 0 ustar 00root root 0000000 0000000 from django.db import models from invitations.models import Invitation class ExampleSwappableInvitation(Invitation): additonal_field = models.CharField(max_length=255, blank=True) django-invitations-2.1.0/tox.ini 0000664 0000000 0000000 00000002146 14527463515 0016653 0 ustar 00root root 0000000 0000000 [tox] envlist = py{38,39,310}-django{32}-backend{Basic,Allauth} py{38,39,310,311}-django{40,41,42}-backend{Basic,Allauth} py{310,311,312}-django{50}-backend{Basic,Allauth} skipsdist = True usedevelop = True [gh-actions] python = 3.8: py38, flake8 3.9: py39 3.10: py310 3.11: py311 3.12: py312 [gh-actions:testenv] DJANGO = 3.2: django32 4.0: django40 4.1: django41 4.2: django42 5.0: django50 [pytest] python_files = tests.py test_*.py [testenv] description = Unit tests setenv = PYTHONWARNINGS = all commands = python -V backendBasic: pytest --cov-report term --cov=invitations --ignore=tests/allauth/ --ds=test_settings tests backendAllauth: pytest --cov-report term --cov=invitations --ignore=tests/basic/ --ds=test_allauth_settings tests coverage report deps = django32: Django>=3.2,<3.3 django40: Django>=4.0,<4.1 django41: Django>=4.1,<4.2 django42: Django>=4.2,<5.0 django50: Django>=5.0rc1,<5.1 backendAllauth: django-allauth coverage pytest pytest-django pytest-cov freezegun whitelist_externals= pytest coverage