plain.oauth 0.9.1__tar.gz → 0.11.0__tar.gz

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.
Files changed (44) hide show
  1. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/PKG-INFO +1 -1
  2. plain_oauth-0.11.0/plain/oauth/config.py +6 -0
  3. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/migrations/0001_initial.py +1 -1
  4. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/models.py +3 -3
  5. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/pyproject.toml +1 -1
  6. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/urls.py +1 -0
  7. plain_oauth-0.9.1/plain/oauth/config.py +0 -6
  8. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/.gitignore +0 -0
  9. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/LICENSE +0 -0
  10. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/README.md +0 -0
  11. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/README.md +0 -0
  12. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/__init__.py +0 -0
  13. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/admin.py +0 -0
  14. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/default_settings.py +0 -0
  15. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/exceptions.py +0 -0
  16. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/migrations/0002_alter_oauthconnection_options_and_more.py +0 -0
  17. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/migrations/0003_alter_oauthconnection_access_token_and_more.py +0 -0
  18. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/migrations/0004_alter_oauthconnection_access_token_and_more.py +0 -0
  19. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/migrations/0005_alter_oauthconnection_unique_together_and_more.py +0 -0
  20. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/migrations/__init__.py +0 -0
  21. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/providers.py +0 -0
  22. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/templates/oauth/error.html +0 -0
  23. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/urls.py +0 -0
  24. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/plain/oauth/views.py +0 -0
  25. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/provider_examples/__init__.py +0 -0
  26. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/provider_examples/bitbucket.py +0 -0
  27. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/provider_examples/github.py +0 -0
  28. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/provider_examples/gitlab.py +0 -0
  29. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/settings.py +0 -0
  30. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/templates/base.html +0 -0
  31. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/templates/index.html +0 -0
  32. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/templates/login.html +0 -0
  33. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/users/migrations/0001_initial.py +0 -0
  34. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/users/migrations/__init__.py +0 -0
  35. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/app/users/models.py +0 -0
  36. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/provider_tests/__init__.py +0 -0
  37. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/provider_tests/test_github.py +0 -0
  38. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/providers/__init__.py +0 -0
  39. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/providers/bitbucket.py +0 -0
  40. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/providers/github.py +0 -0
  41. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/providers/gitlab.py +0 -0
  42. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/test_backends.py +0 -0
  43. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/test_checks.py +0 -0
  44. {plain_oauth-0.9.1 → plain_oauth-0.11.0}/tests/test_providers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.oauth
3
- Version: 0.9.1
3
+ Version: 0.11.0
4
4
  Summary: OAuth login and API access for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -0,0 +1,6 @@
1
+ from plain.packages import PackageConfig, register_config
2
+
3
+
4
+ @register_config
5
+ class Config(PackageConfig):
6
+ label = "plainoauth" # Primarily for migrations
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
10
10
  initial = True
11
11
 
12
12
  dependencies = [
13
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
13
+ migrations.settings_dependency(settings.AUTH_USER_MODEL),
14
14
  ]
15
15
 
16
16
  operations = [
@@ -6,7 +6,7 @@ from plain.exceptions import ValidationError
6
6
  from plain.models import transaction
7
7
  from plain.models.db import IntegrityError, OperationalError, ProgrammingError
8
8
  from plain.preflight import Error
9
- from plain.runtime import settings
9
+ from plain.runtime import SettingsReference
10
10
  from plain.utils import timezone
11
11
 
12
12
  from .exceptions import OAuthUserAlreadyExistsError
@@ -24,7 +24,7 @@ class OAuthConnection(models.Model):
24
24
  updated_at = models.DateTimeField(auto_now=True)
25
25
 
26
26
  user = models.ForeignKey(
27
- settings.AUTH_USER_MODEL,
27
+ SettingsReference("AUTH_USER_MODEL"),
28
28
  on_delete=models.CASCADE,
29
29
  related_name="oauth_connections",
30
30
  )
@@ -125,7 +125,7 @@ class OAuthConnection(models.Model):
125
125
  def connect(
126
126
  cls,
127
127
  *,
128
- user: settings.AUTH_USER_MODEL,
128
+ user,
129
129
  provider_key: str,
130
130
  oauth_token: "OAuthToken",
131
131
  oauth_user: "OAuthUser",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plain.oauth"
3
- version = "0.9.1"
3
+ version = "0.11.0"
4
4
  description = "OAuth login and API access for Plain."
5
5
  authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}]
6
6
  license = "BSD-3-Clause"
@@ -20,6 +20,7 @@ class LoginView(TemplateView):
20
20
 
21
21
  @register_router
22
22
  class Router(RouterBase):
23
+ namespace = ""
23
24
  urls = [
24
25
  include("oauth/", plain.oauth.urls),
25
26
  path("login/", LoginView, name="login"),
@@ -1,6 +0,0 @@
1
- from plain.packages import PackageConfig
2
-
3
-
4
- class PlainOAuthConfig(PackageConfig):
5
- name = "plain.oauth"
6
- label = "plainoauth" # Primarily for migrations
File without changes
File without changes
File without changes