Skip to content

Commit 6f0f1f0

Browse files
committed
modified readme file
1 parent 88c1ae6 commit 6f0f1f0

File tree

1 file changed

+57
-17
lines changed

1 file changed

+57
-17
lines changed

README.md

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,49 @@
1-
# drauth
2-
Django rest framework authentication template.
1+
# DRAUTH
32

3+
DrAuth is a Django application template that provides a complete authentication
4+
system out of the box. With DrAuth, you can quickly and easily add user
5+
registration, login, logout, password reset, and email verification functionality
6+
to your Django projects.
47

5-
## Dependencies
8+
DrAuth is built using modern Django best practices,
9+
including class-based views, forms, and templates.
10+
It also includes custom user models and email templates that are designed
11+
to be easily customized to fit your specific needs.
12+
13+
* User registration with email verification
14+
* Login and logout functionality
15+
* Password reset functionality
16+
* Custom user model with email as the username field
17+
* Easy integration with existing Django projects
18+
19+
* With DrAuth, you can save time and effort by not having to build an
20+
authentication system from scratch. Instead, you can focus on building the
21+
unique features of your application while relying on a secure and reliable
22+
authentication system.
23+
24+
DrAuth is open source and free to use, so feel free to download it and use it in your projects. If you encounter any issues or have any suggestions for improvement, please open an issue or submit a pull request on GitHub.
25+
26+
### SETUP
27+
__Installing Dependencies:__
628

729
```bash
8-
pip install django djangorestframework django-cors-headers djangorestframework-simplejwt dj-rest-auth[with_social] drf-spectacular
30+
pip install -r requirements.txt
931
```
1032

11-
## Create api/ package in apps
12-
create `api` directory inside the app and create all those files.
33+
__Adding your own apps:__
34+
35+
create your own apps via `python manage.py startapp 'app_name'` and
36+
make `api/` directory inside the app directory `app_name/api/`
37+
and create all those files. _Do it easily by the command below:_
1338

1439
```bash
1540
touch __init__.py urls.py views.py serializers.py
1641
```
42+
_Note: If your app seems complex, then you can create separated
43+
directories inside the `api/` folder for `views` and `serializers`_
1744

18-
## Initialize all apps
45+
### DOCS
46+
Django Dependency list into the `INSTALLED_APPS` in `settings.py` of your django project.
1947
```python
2048
# 3rd-party apps
2149
'allauth',
@@ -32,8 +60,12 @@ touch __init__.py urls.py views.py serializers.py
3260
'core.apps.CoreConfig',
3361
'credentials.apps.CredentialsConfig'
3462
```
63+
_Here the `core` app is just the base app with nothing there. It's just for you to get started_
64+
65+
__Default Django settings:__
3566

36-
## Default django settings
67+
These are the recommended settings to run everything correctly. Still, you can slightly change
68+
few settings. Follow the official [Django docs](https://docs.djangoproject.com/en/dev/ref/settings/#sessions) to modify these settings.
3769
```python
3870
# Default Django Settings
3971
SITE_ID = 1
@@ -43,13 +75,18 @@ SESSION_COOKIE_SAMESITE = 'None'
4375
CSRF_COOKIE_SAMESITE = 'None'
4476
```
4577

46-
## REST settings
78+
__REST Framework settings:__
79+
80+
To update our REST settings easily from anywhere, we make a blank dictionary,
81+
and we'll update it later by our needs.
82+
4783
```python
4884
# REST Settings
4985
REST_FRAMEWORK = {}
5086
```
51-
## Spectacular setup
52-
`settings.py`
87+
__Spectacular setup:__
88+
89+
In your `settings.py` file, make sure these settings exist for spectacluar package.
5390
```python
5491
# Drf-spectacular
5592
REST_FRAMEWORK.update({'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema'})
@@ -74,7 +111,8 @@ docs = [
74111

75112
```
76113

77-
## Cors-headers
114+
__Cors-headers:__
115+
78116
`settings.py`
79117
```python
80118
from corsheaders.defaults import default_headers
@@ -103,7 +141,8 @@ CORS_ALLOWED_ORIGINS = [
103141
CORS_ALLOW_CREDENTIALS = True
104142
CORS_ALLOW_HEADERS = list(default_headers) + ['Set-Cookie']
105143
```
106-
## AllAuth
144+
**AllAuth:**
145+
107146
`settings.py`
108147
```python
109148
# django-allauth
@@ -118,7 +157,7 @@ AUTHENTICATION_BACKENDS = [
118157
]
119158
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
120159
```
121-
## SimpleJWT
160+
**SimpleJWT**
122161

123162
`settings.py`
124163

@@ -137,7 +176,8 @@ SIMPLE_JWT = {
137176
'AUTH_HEADER_NAME': 'HTTP_AUTHORIZATION',
138177
}
139178
```
140-
## dj-rest-auth
179+
**dj-rest-auth:**
180+
141181
`settings.py`
142182
```python
143183
# dj-rest-auth
@@ -157,13 +197,13 @@ urlpatterns = [
157197
]
158198
```
159199

160-
## Migrations
200+
**Migrations:**
161201
```bash
162202
./manage.py makemigrations
163203
./manage.py migrate
164204
```
165205

166-
## Refresh token [GET]
206+
**Refresh token [GET]**
167207

168208
`credentials/api/views.py`
169209
```python

0 commit comments

Comments
 (0)