django-email-accounts


Namedjango-email-accounts JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/fathiabdelmalek/django-email-accounts
SummaryA Django app for user management with email-based authentication.
upload_time2024-07-30 23:52:48
maintainerNone
docs_urlNone
authorFathi Abdelmalek
requires_python>=3.6
licenseOSI Approved :: GNU General Public License v3 (GPLv3)
keywords
VCS
bugtrack_url
requirements asgiref Django django-filter djangorestframework pytz setuptools sqlparse wheel
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django Email Accounts

Django Email Accounts is a Django app for user management with email-based authentication. It provides a customizable User model and registration view for handling user registration and authentication using email and password.

## Installation

Install the package using pip:

```shell
pip install django-email-accounts
```

## Usage

1. Add `'email_accounts'` to the `INSTALLED_APPS` list in your Django project's `settings.py` file:

```python
INSTALLED_APPS = [
   ...
   'email_accounts',
   ...
]
```

2. Change the default authentication user model by adding this line of code in your Django project's `settings.py` file:

```python
AUTH_USER_MODEL = 'email_accounts.User'
```

3. Update your project's `urls.py` file to include the email-accounts URLs: 
 
```python
from django.urls import path, include

urlpatterns = [
    ...
    path('accounts/', include('email_accounts.urls')),
    ...
]
```

<b>Note : </b>If you want to use the restfull api instead, then here is a propre update for `urls.py`:

```python
from django.urls import path, include
from rest_framework.routers import DefaultRouter

from email_accounts.views import UserViewSet

router = DefaultRouter()
router.register('users', UserViewSet)

urlpatterns = [
    ...
    path('api/', include(router.urls)),
    path('api/accounts/', include('email_accounts.api_urls')),
    ...
]
```

4. Run migrations to create the necessary database tables:

```shell
python manage.py makemigrations email_accounts
python manage.py migrate
```

6. You can now use the email-accounts functionality in your Django project.

<b>Note : </b> If you want custom authentication templates, then, in your templates folder, create a `email_accounts` subdirectory in `templates` directory and create all authentication templates on it like this.

```bash
├── templates
│   └── email_accounts
│       ├── login.html
│       ├── register.html
│       └── password
│           ├── change
│           ├── ├── 1.html
│           ├── └── 2.html
│           └── reset
│               ├── 1.html
│               ├── 2.html
│               ├── 3.html
│               └── 4.html
```

## Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/fathiabdelmalek/django-email-accounts).

To contribute to the project, follow these steps:

1. Fork the repository on GitHub.
2. Clone your forked repository to your local machine.
3. Create a new branch for your feature or bug fix.
4. Make the necessary changes and commit them.
5. Push the changes to your forked repository.
6. Submit a pull request to the main repository.

Please ensure that your code adheres to the project's coding conventions and includes appropriate tests. Also, provide a clear description of the changes you have made in the pull request.

Thank you for your contributions!


## License

This project is licensed under the GNU General Public License v3.0. See the [LICENSE](https://github.com/fathiabdelmalek/django-email-accounts/blob/main/LICENSE) file for more details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fathiabdelmalek/django-email-accounts",
    "name": "django-email-accounts",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Fathi Abdelmalek",
    "author_email": "abdelmalek.fathi.2001@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/00/375ed3985a32520e976d5a86129ff09cec48109eaca849d8b658305af19c/django-email-accounts-0.7.0.tar.gz",
    "platform": null,
    "description": "# Django Email Accounts\n\nDjango Email Accounts is a Django app for user management with email-based authentication. It provides a customizable User model and registration view for handling user registration and authentication using email and password.\n\n## Installation\n\nInstall the package using pip:\n\n```shell\npip install django-email-accounts\n```\n\n## Usage\n\n1. Add `'email_accounts'` to the `INSTALLED_APPS` list in your Django project's `settings.py` file:\n\n```python\nINSTALLED_APPS = [\n   ...\n   'email_accounts',\n   ...\n]\n```\n\n2. Change the default authentication user model by adding this line of code in your Django project's `settings.py` file:\n\n```python\nAUTH_USER_MODEL = 'email_accounts.User'\n```\n\n3. Update your project's `urls.py` file to include the email-accounts URLs: \n \n```python\nfrom django.urls import path, include\n\nurlpatterns = [\n    ...\n    path('accounts/', include('email_accounts.urls')),\n    ...\n]\n```\n\n<b>Note : </b>If you want to use the restfull api instead, then here is a propre update for `urls.py`:\n\n```python\nfrom django.urls import path, include\nfrom rest_framework.routers import DefaultRouter\n\nfrom email_accounts.views import UserViewSet\n\nrouter = DefaultRouter()\nrouter.register('users', UserViewSet)\n\nurlpatterns = [\n    ...\n    path('api/', include(router.urls)),\n    path('api/accounts/', include('email_accounts.api_urls')),\n    ...\n]\n```\n\n4. Run migrations to create the necessary database tables:\n\n```shell\npython manage.py makemigrations email_accounts\npython manage.py migrate\n```\n\n6. You can now use the email-accounts functionality in your Django project.\n\n<b>Note : </b> If you want custom authentication templates, then, in your templates folder, create a `email_accounts` subdirectory in `templates` directory and create all authentication templates on it like this.\n\n```bash\n\u251c\u2500\u2500 templates\n\u2502   \u2514\u2500\u2500 email_accounts\n\u2502       \u251c\u2500\u2500 login.html\n\u2502       \u251c\u2500\u2500 register.html\n\u2502       \u2514\u2500\u2500 password\n\u2502           \u251c\u2500\u2500 change\n\u2502           \u251c\u2500\u2500 \u251c\u2500\u2500 1.html\n\u2502           \u251c\u2500\u2500 \u2514\u2500\u2500 2.html\n\u2502           \u2514\u2500\u2500 reset\n\u2502               \u251c\u2500\u2500 1.html\n\u2502               \u251c\u2500\u2500 2.html\n\u2502               \u251c\u2500\u2500 3.html\n\u2502               \u2514\u2500\u2500 4.html\n```\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/fathiabdelmalek/django-email-accounts).\n\nTo contribute to the project, follow these steps:\n\n1. Fork the repository on GitHub.\n2. Clone your forked repository to your local machine.\n3. Create a new branch for your feature or bug fix.\n4. Make the necessary changes and commit them.\n5. Push the changes to your forked repository.\n6. Submit a pull request to the main repository.\n\nPlease ensure that your code adheres to the project's coding conventions and includes appropriate tests. Also, provide a clear description of the changes you have made in the pull request.\n\nThank you for your contributions!\n\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0. See the [LICENSE](https://github.com/fathiabdelmalek/django-email-accounts/blob/main/LICENSE) file for more details.\n",
    "bugtrack_url": null,
    "license": "OSI Approved :: GNU General Public License v3 (GPLv3)",
    "summary": "A Django app for user management with email-based authentication.",
    "version": "0.7.0",
    "project_urls": {
        "Homepage": "https://github.com/fathiabdelmalek/django-email-accounts"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "866601e6cc9def2abe8357360ad8dee6488703014e5990460d7174d54a32543f",
                "md5": "959706a1001e97f7902822f4f0e81106",
                "sha256": "bfee98551d2cef00e19238000c9c2830816ae491f251f4d80f14c242c00a888f"
            },
            "downloads": -1,
            "filename": "django_email_accounts-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "959706a1001e97f7902822f4f0e81106",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 27558,
            "upload_time": "2024-07-30T23:52:46",
            "upload_time_iso_8601": "2024-07-30T23:52:46.035710Z",
            "url": "https://files.pythonhosted.org/packages/86/66/01e6cc9def2abe8357360ad8dee6488703014e5990460d7174d54a32543f/django_email_accounts-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f00375ed3985a32520e976d5a86129ff09cec48109eaca849d8b658305af19c",
                "md5": "762bd380430f3fca1fe6f8912a6299d9",
                "sha256": "36d34a252fd4652219833fa0a2fe478e7d3fd38cba72d658737421a2f79287b9"
            },
            "downloads": -1,
            "filename": "django-email-accounts-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "762bd380430f3fca1fe6f8912a6299d9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 21884,
            "upload_time": "2024-07-30T23:52:48",
            "upload_time_iso_8601": "2024-07-30T23:52:48.103431Z",
            "url": "https://files.pythonhosted.org/packages/9f/00/375ed3985a32520e976d5a86129ff09cec48109eaca849d8b658305af19c/django-email-accounts-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-30 23:52:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fathiabdelmalek",
    "github_project": "django-email-accounts",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "asgiref",
            "specs": [
                [
                    "==",
                    "3.7.2"
                ]
            ]
        },
        {
            "name": "Django",
            "specs": [
                [
                    "==",
                    "4.2.6"
                ]
            ]
        },
        {
            "name": "django-filter",
            "specs": [
                [
                    "==",
                    "23.3"
                ]
            ]
        },
        {
            "name": "djangorestframework",
            "specs": [
                [
                    "==",
                    "3.14.0"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2023.3.post1"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "==",
                    "68.2.2"
                ]
            ]
        },
        {
            "name": "sqlparse",
            "specs": [
                [
                    "==",
                    "0.4.4"
                ]
            ]
        },
        {
            "name": "wheel",
            "specs": [
                [
                    "==",
                    "0.43.0"
                ]
            ]
        }
    ],
    "lcname": "django-email-accounts"
}
        
Elapsed time: 0.79838s