معرفی شرکت ها


eazy-django-user-1.1.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Custom User Model
ویژگی مقدار
سیستم عامل -
نام فایل eazy-django-user-1.1.1
نام eazy-django-user
نسخه کتابخانه 1.1.1
نگهدارنده ['Eazy']
ایمیل نگهدارنده ['codeepoch@gmail.com']
نویسنده Eazy
ایمیل نویسنده codeepoch@gmail.com
آدرس صفحه اصلی https://www.vice.codes
آدرس اینترنتی https://pypi.org/project/eazy-django-user/
مجوز MTI License Copyright (c) 2022 Ezekiel Victor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Eazy Django User Eazy Django User is a django package that provides a user model with user email as the identifier. ## Installation Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar. ```bash pip install eazy-django-user ``` ## Usage 1. Add "eazy_user" to your INSTALLED_APPS setting like this: ```python INSTALLED_APPS = [ ... 'eazy_user', ] ``` 2. set AUTH_USER_MODEL in setting.py to "eazy_user.EmailUser" like this: **Note:** Add this setting before initial migration else there will be clashes with the default user model. ```python AUTH_USER_MODEL = 'eazy_user.EmailUser' ``` 3. Run ``python manage.py migrate`` to apply the migrations to the database. ```bash python manage.py migrate ``` 4. You can access the user foreign key like this: ```python from django.conf import settings User = settings.AUTH_USER_MODEL class YourModel(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) ``` 5. Or by using the get_user_model method. ```python from django.contrib.auth import get_user_model User = get_user_model() ``` But you would most likely want to extend the ```python EmailUser ``` model you can do that easily: ```python from eazy_user.models import EmailUser class YourCustomUser(EmailUser): .... ``` Whatever you choose, make sure to set the resulting user model as the ```python AUTH_USER_MODEL``` in the settings.py file ```python AUTH_USER_MODEL = '<your_app_name>.<YourCustomUser>' """<your_app_name> refers to the app that contains your custom user model, while <YourCustomUser> is the custom user model.""" ``` Now you can proceed to creating a super user ```bash python manage.py createsuperuser``` like you normaly would, and enjoy :) ## License [MIT](https://choosealicense.com/licenses/mit/)


نحوه نصب


نصب پکیج whl eazy-django-user-1.1.1:

    pip install eazy-django-user-1.1.1.whl


نصب پکیج tar.gz eazy-django-user-1.1.1:

    pip install eazy-django-user-1.1.1.tar.gz