django-someauth


Namedjango-someauth JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummarySimplified Django Allauth package with Tailwind templates.
upload_time2025-08-27 16:29:14
maintainerNone
docs_urlNone
authorFarid Seidu
requires_python>=3.10
licenseMIT
keywords django authentication allauth social-login tailwind
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SomeAuth

A Python package based on **Django Allauth**, simplified to bypass repetitive setup. Comes with **pre-styled Tailwind templates** for quick integration of authentication and social login.

---

## Features

- Email/password authentication.
- Password Reset.
- Email notifications.
- Optional social login (Google, GitHub, Discord, etc.).
- Pre-styled forms using Tailwind CSS with [DaisyUI](https://daisyui.com/).
- Minimal configuration required.
- Supports template overrides for full customization.
- All Allauth views

---

## Installation

```bash
pip install django-someauth
```

Add to your `INSTALLED_APPS` in `settings.py`:

```python
INSTALLED_APPS = [
    # Django default apps
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites', # required

    # SomeAuth
    'someauth',

    # Tailwind (optional)
    'tailwind',
    'theme',

    # Allauth
    'allauth',
    'allauth.account',
    'allauth.socialaccount',

    # Social providers (only include the ones enabled in SOMEAUTH)
    'allauth.socialaccount.providers.google',
    'allauth.socialaccount.providers.github',
]
```

Set `SITE_ID`:

```python
SITE_ID = 1
```

---

### SomeAuth Configuration

```python
SOMEAUTH = {
    "USE_SOCIAL": True,  # Set False to disable social login
    "ENABLED_PROVIDERS": ["google", "github"],  # Must match provider apps in INSTALLED_APPS
    "PROVIDERS": {
        "google": {
            "client_id": "<your-google-client-id>",
            "secret": "<your-google-secret>",
        },
        "github": {
            "client_id": "<your-github-client-id>",
            "secret": "<your-github-secret>",
        },
    }
}
```

---

## Optional Allauth Settings (Inherited Defaults)

SomeAuth sets sensible defaults for most Allauth settings. You can override them if needed: 

```python
MIDDLEWARE = [
    # default Django middleware
    'allauth.account.middleware.AccountMiddleware',
]

AUTHENTICATION_BACKENDS = [
    "django.contrib.auth.backends.ModelBackend",
    "allauth.account.auth_backends.AuthenticationBackend",
]

LOGIN_REDIRECT_URL = "/"
ACCOUNT_LOGOUT_REDIRECT_URL = "/"

ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_EMAIL_VERIFICATION = "optional"  # or 'mandatory'

SOCIALACCOUNT_AUTO_SIGNUP = True
SOCIALACCOUNT_LOGIN_ON_GET = True

ACCOUNT_FORMS = {
    'login': 'someauth.forms.CustomLoginForm',
    'signup': 'someauth.forms.CustomSignupForm',
}
SOCIALACCOUNT_ADAPTER = 'someauth.adapters.MySocialAccountAdapter'
ACCOUNT_ADAPTER = 'someauth.adapters.CustomAccountAdapter'
```

⚠️ Override only when necessary; changing some of these may break SomeAuth behavior.

---

## Email Configuration

SomeAuth supports email notifications. Configure email in `settings.py`:

```python
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
EMAIL_HOST_USER = 'youraddress@email.com'
EMAIL_HOST_PASSWORD = 'emailpassword'
DEFAULT_FROM_EMAIL = 'youraddress@email.com'  # Should match EMAIL_HOST_USER
```

---

## Template Overrides

To customize the look, create template files matching those in SomeAuth (`someauth/templates/someauth/...`). Django will automatically use your custom templates instead.

---

# First Steps

## URLs

Add SomeAuth URLs to your `urls.py`:

```python
from django.urls import path, include

urlpatterns = [
    path('accounts/', include('someauth.urls')),  # handles login, logout, signup, social auth
]
```

## Customization

- Override templates in `templates/someauth/...`
- Override forms via `ACCOUNT_FORMS` in `settings.py`
- Override adapters via `SOCIALACCOUNT_ADAPTER` or `ACCOUNT_ADAPTER`

---

With this setup, your project is fully ready for email/password authentication and optional social login without extra boilerplate.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-someauth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "django, authentication, allauth, social-login, tailwind",
    "author": "Farid Seidu",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/29/b9/20514251b42ca77127139fc448d6071c330b6065cec0b9275edfdfd052ed/django_someauth-0.1.0.tar.gz",
    "platform": null,
    "description": "# SomeAuth\n\nA Python package based on **Django Allauth**, simplified to bypass repetitive setup. Comes with **pre-styled Tailwind templates** for quick integration of authentication and social login.\n\n---\n\n## Features\n\n- Email/password authentication.\n- Password Reset.\n- Email notifications.\n- Optional social login (Google, GitHub, Discord, etc.).\n- Pre-styled forms using Tailwind CSS with [DaisyUI](https://daisyui.com/).\n- Minimal configuration required.\n- Supports template overrides for full customization.\n- All Allauth views\n\n---\n\n## Installation\n\n```bash\npip install django-someauth\n```\n\nAdd to your `INSTALLED_APPS` in `settings.py`:\n\n```python\nINSTALLED_APPS = [\n    # Django default apps\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django.contrib.sites', # required\n\n    # SomeAuth\n    'someauth',\n\n    # Tailwind (optional)\n    'tailwind',\n    'theme',\n\n    # Allauth\n    'allauth',\n    'allauth.account',\n    'allauth.socialaccount',\n\n    # Social providers (only include the ones enabled in SOMEAUTH)\n    'allauth.socialaccount.providers.google',\n    'allauth.socialaccount.providers.github',\n]\n```\n\nSet `SITE_ID`:\n\n```python\nSITE_ID = 1\n```\n\n---\n\n### SomeAuth Configuration\n\n```python\nSOMEAUTH = {\n    \"USE_SOCIAL\": True,  # Set False to disable social login\n    \"ENABLED_PROVIDERS\": [\"google\", \"github\"],  # Must match provider apps in INSTALLED_APPS\n    \"PROVIDERS\": {\n        \"google\": {\n            \"client_id\": \"<your-google-client-id>\",\n            \"secret\": \"<your-google-secret>\",\n        },\n        \"github\": {\n            \"client_id\": \"<your-github-client-id>\",\n            \"secret\": \"<your-github-secret>\",\n        },\n    }\n}\n```\n\n---\n\n## Optional Allauth Settings (Inherited Defaults)\n\nSomeAuth sets sensible defaults for most Allauth settings. You can override them if needed: \n\n```python\nMIDDLEWARE = [\n    # default Django middleware\n    'allauth.account.middleware.AccountMiddleware',\n]\n\nAUTHENTICATION_BACKENDS = [\n    \"django.contrib.auth.backends.ModelBackend\",\n    \"allauth.account.auth_backends.AuthenticationBackend\",\n]\n\nLOGIN_REDIRECT_URL = \"/\"\nACCOUNT_LOGOUT_REDIRECT_URL = \"/\"\n\nACCOUNT_EMAIL_REQUIRED = True\nACCOUNT_UNIQUE_EMAIL = True\nACCOUNT_EMAIL_VERIFICATION = \"optional\"  # or 'mandatory'\n\nSOCIALACCOUNT_AUTO_SIGNUP = True\nSOCIALACCOUNT_LOGIN_ON_GET = True\n\nACCOUNT_FORMS = {\n    'login': 'someauth.forms.CustomLoginForm',\n    'signup': 'someauth.forms.CustomSignupForm',\n}\nSOCIALACCOUNT_ADAPTER = 'someauth.adapters.MySocialAccountAdapter'\nACCOUNT_ADAPTER = 'someauth.adapters.CustomAccountAdapter'\n```\n\n\u26a0\ufe0f Override only when necessary; changing some of these may break SomeAuth behavior.\n\n---\n\n## Email Configuration\n\nSomeAuth supports email notifications. Configure email in `settings.py`:\n\n```python\nEMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\nEMAIL_HOST = 'smtp.gmail.com'\nEMAIL_PORT = 465\nEMAIL_USE_TLS = False\nEMAIL_USE_SSL = True\nEMAIL_HOST_USER = 'youraddress@email.com'\nEMAIL_HOST_PASSWORD = 'emailpassword'\nDEFAULT_FROM_EMAIL = 'youraddress@email.com'  # Should match EMAIL_HOST_USER\n```\n\n---\n\n## Template Overrides\n\nTo customize the look, create template files matching those in SomeAuth (`someauth/templates/someauth/...`). Django will automatically use your custom templates instead.\n\n---\n\n# First Steps\n\n## URLs\n\nAdd SomeAuth URLs to your `urls.py`:\n\n```python\nfrom django.urls import path, include\n\nurlpatterns = [\n    path('accounts/', include('someauth.urls')),  # handles login, logout, signup, social auth\n]\n```\n\n## Customization\n\n- Override templates in `templates/someauth/...`\n- Override forms via `ACCOUNT_FORMS` in `settings.py`\n- Override adapters via `SOCIALACCOUNT_ADAPTER` or `ACCOUNT_ADAPTER`\n\n---\n\nWith this setup, your project is fully ready for email/password authentication and optional social login without extra boilerplate.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simplified Django Allauth package with Tailwind templates.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/Versedcamel153/SomeAuth"
    },
    "split_keywords": [
        "django",
        " authentication",
        " allauth",
        " social-login",
        " tailwind"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "93f43fe6e464d9288ca5acb065938493bbaf8affbb895f86f6945a965f7a3b5d",
                "md5": "76dae6b1015a1247efe7e5c296d9c9c2",
                "sha256": "a746241b51b191eb8b5e9f2272373c24d3194e7ee2bbae37f015431484f57c6a"
            },
            "downloads": -1,
            "filename": "django_someauth-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "76dae6b1015a1247efe7e5c296d9c9c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 33059,
            "upload_time": "2025-08-27T16:29:12",
            "upload_time_iso_8601": "2025-08-27T16:29:12.835147Z",
            "url": "https://files.pythonhosted.org/packages/93/f4/3fe6e464d9288ca5acb065938493bbaf8affbb895f86f6945a965f7a3b5d/django_someauth-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "29b920514251b42ca77127139fc448d6071c330b6065cec0b9275edfdfd052ed",
                "md5": "e3526cc13b3806269140cfd4a94fa9e3",
                "sha256": "d6e3a5c2fc6793abcc72b22dc53069dca26834609ba92f2738ffd38576669484"
            },
            "downloads": -1,
            "filename": "django_someauth-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e3526cc13b3806269140cfd4a94fa9e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 23209,
            "upload_time": "2025-08-27T16:29:14",
            "upload_time_iso_8601": "2025-08-27T16:29:14.623871Z",
            "url": "https://files.pythonhosted.org/packages/29/b9/20514251b42ca77127139fc448d6071c330b6065cec0b9275edfdfd052ed/django_someauth-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 16:29:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Versedcamel153",
    "github_project": "SomeAuth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "django-someauth"
}
        
Elapsed time: 1.11401s