plain.auth 0.9.0__py3-none-any.whl → 0.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plain/auth/README.md CHANGED
@@ -38,7 +38,7 @@ from plain.passwords.models import PasswordField
38
38
 
39
39
 
40
40
  class User(models.Model):
41
- email = models.EmailField(unique=True)
41
+ email = models.EmailField()
42
42
  password = PasswordField()
43
43
  is_admin = models.BooleanField(default=False)
44
44
  created_at = models.DateTimeField(auto_now_add=True)
@@ -66,7 +66,6 @@ urlpatterns = [
66
66
  ]
67
67
  ```
68
68
 
69
-
70
69
  ## Checking if a user is logged in
71
70
 
72
71
  A `request.user` will either be `None` or point to an instance of a your `AUTH_USER_MODEL`.
@@ -90,7 +89,6 @@ else:
90
89
  print("You are not logged in.")
91
90
  ```
92
91
 
93
-
94
92
  ## Restricting views
95
93
 
96
94
  Use the `AuthViewMixin` to restrict views to logged in users, admin users, or custom logic.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.auth
3
- Version: 0.9.0
3
+ Version: 0.11.0
4
4
  Summary: User authentication and authorization for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -50,7 +50,7 @@ from plain.passwords.models import PasswordField
50
50
 
51
51
 
52
52
  class User(models.Model):
53
- email = models.EmailField(unique=True)
53
+ email = models.EmailField()
54
54
  password = PasswordField()
55
55
  is_admin = models.BooleanField(default=False)
56
56
  created_at = models.DateTimeField(auto_now_add=True)
@@ -78,7 +78,6 @@ urlpatterns = [
78
78
  ]
79
79
  ```
80
80
 
81
-
82
81
  ## Checking if a user is logged in
83
82
 
84
83
  A `request.user` will either be `None` or point to an instance of a your `AUTH_USER_MODEL`.
@@ -102,7 +101,6 @@ else:
102
101
  print("You are not logged in.")
103
102
  ```
104
103
 
105
-
106
104
  ## Restricting views
107
105
 
108
106
  Use the `AuthViewMixin` to restrict views to logged in users, admin users, or custom logic.
@@ -1,12 +1,11 @@
1
- plain/auth/README.md,sha256=yVDb2iDmlNunWWSHn6eVE8kS0vvIkC3KCZ1EO1SXWDQ,2421
1
+ plain/auth/README.md,sha256=RJ8ry-ukLtLqcjRVAZ5cd1JgCr-JcUTi_9Kkg4kGmHc,2408
2
2
  plain/auth/__init__.py,sha256=oDOVSov5os1_l-hYNlGd5hb6vy0rF5Q3VMRV1UOZeFU,123
3
- plain/auth/config.py,sha256=nf-6WD-3lEIq4VBMKQCE4_xtXRvOyxnJmmQKleme3Wc,115
4
3
  plain/auth/default_settings.py,sha256=65VzDn3j61OMn78Lg6Zuds4A8QKzJJ_0G9KoFqAOIRo,466
5
4
  plain/auth/middleware.py,sha256=YJrzhro89SdSNDtfwyQM8jGgU5GmXvApZWiktit6K70,980
6
5
  plain/auth/sessions.py,sha256=pCBpbrWf2nRMt5BZ4u1NDfbO7oNWuLujIybNDlmvzts,5265
7
6
  plain/auth/utils.py,sha256=eEON0Mo928l-aW5tqBuoTdVke8aP4majxVtAFoLroSE,1280
8
7
  plain/auth/views.py,sha256=_igztEBQKSM4CZro2lvlK0m01eIksqbmyux4w8gY1ks,4095
9
- plain_auth-0.9.0.dist-info/METADATA,sha256=4T5Ks687F0RzrayZ-FBvOwF5g0zqZTAd2xxpE5-5jF0,2774
10
- plain_auth-0.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
11
- plain_auth-0.9.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
12
- plain_auth-0.9.0.dist-info/RECORD,,
8
+ plain_auth-0.11.0.dist-info/METADATA,sha256=BVqzBZ93JQmxvgoN6XZJIwwloF7EWdxQbVhebFAudFA,2762
9
+ plain_auth-0.11.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ plain_auth-0.11.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
11
+ plain_auth-0.11.0.dist-info/RECORD,,
plain/auth/config.py DELETED
@@ -1,6 +0,0 @@
1
- from plain.packages import PackageConfig, register_config
2
-
3
-
4
- @register_config
5
- class Config(PackageConfig):
6
- pass