Skip to content

Commit

Permalink
override readme and setup
Browse files Browse the repository at this point in the history
  • Loading branch information
imankarimi committed Oct 12, 2021
1 parent b67b70e commit 52392f7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 45 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
* Download and install last version of **Django Admin Two-Factor Authentication**:

```bash
$ pip install git+https://github.com/imankarimi/django-admin-two-factor-auth.git
$ # or
$ easy_install git+https://github.com/imankarimi/django-admin-two-factor-auth.git
$ pip install django-admin-two-factor
# or
$ easy_install django-admin-two-factor
```

* Add 'admin_two_factor' application to the INSTALLED_APPS setting of your Django project `settings.py` file (note it should be before 'django.contrib.admin'):

```python
INSTALLED_APPS = (
'admin_two_factor.apps.TwoStepVerificationConfig',
'django.contrib.admin',
# ...
'admin_two_factor.apps.TwoStepVerificationConfig',
'django.contrib.admin',
# ...
)
```

Expand All @@ -55,9 +55,9 @@ ADMIN_TWO_FACTOR_NAME = 'PROJECT_NAME'

```python
urlpatterns = [
path('admin/', admin.site.urls),
path('two_factor/', include(('admin_two_factor.urls', 'admin_two_factor'), namespace='two_factor')),
# ...
path('admin/', admin.site.urls),
path('two_factor/', include(('admin_two_factor.urls', 'admin_two_factor'), namespace='two_factor')),
# ...
]
```

Expand Down Expand Up @@ -94,20 +94,24 @@ $ python manage.py runserver # default port 8000
<br />

* **User List:** the users who have enabled two-factor auth

![Django Admin Two-Factor Auth: User List](https://raw.githubusercontent.com/imankarimi/django-admin-two-factor-auth/main/screenshoots/django_admin_two_factor_auth_4.png)

<br />

* **Add New User:**

![Django Admin Two-Factor Auth: Add New User](https://raw.githubusercontent.com/imankarimi/django-admin-two-factor-auth/main/screenshoots/django_admin_two_factor_auth_2.png)

<br />

* **Scan QRCode and enter the valid code:**

![Django Admin Two-Factor Auth: Scan QRCode](https://raw.githubusercontent.com/imankarimi/django-admin-two-factor-auth/main/screenshoots/django_admin_two_factor_auth_3.png)

<br />

* **Logout and login again with [Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en):**

![Django Admin Two-Factor Auth: Login with Code](https://raw.githubusercontent.com/imankarimi/django-admin-two-factor-auth/main/screenshoots/django_admin_two_factor_auth_5.png)

32 changes: 0 additions & 32 deletions setup.cfg

This file was deleted.

44 changes: 40 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
from setuptools import setup, find_packages
import os

from setuptools import find_packages, setup

with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()

os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
name='django-admin-two-factor',
version='0.0.1',
zip_safe=False,
packages=find_packages(),
include_package_data=True,
description='Django Admin Two Factor Authentication',
long_description=README,
long_description_content_type="text/markdown",
url='https://github.com/imankarimi/django-admin-two-factor-auth',
author='Iman Karimi',
author_email='[email protected]',
license='MIT License',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 2.0',
'Framework :: Django :: 3.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Environment :: Web Environment',
'Topic :: Software Development',
],
install_requires=[
'Django',
'pyotp',
'qrcode',
'Pillow',
],
include_package_data=True,
zip_safe=False
)
)

0 comments on commit 52392f7

Please sign in to comment.