Skip to content

Commit d60e747

Browse files
committed
packaged app
1 parent aa738fe commit d60e747

File tree

16 files changed

+177
-49
lines changed

16 files changed

+177
-49
lines changed

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include LICENSE
2+
include MANIFEST.in
3+
include README.rst
4+
recursive-include docs *
5+
recursive-include graph_auth/templates *
6+
7+
recursive-exclude * __pycache__
8+
recursive-exclude * *.py[co]

README.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=====
2+
Polls
3+
=====
4+
5+
Polls is a Django app to conduct web-based polls. For each question,
6+
visitors can choose between a fixed number of answers.
7+
8+
Detailed documentation is in the "docs" directory.
9+
10+
Quick start
11+
-----------
12+
13+
1. Add "polls" to your INSTALLED_APPS setting like this::
14+
15+
INSTALLED_APPS = [
16+
...
17+
'polls',
18+
]
19+
20+
2. Include the polls URLconf in your project urls.py like this::
21+
22+
path('polls/', include('polls.urls')),
23+
24+
3. Run ``python manage.py migrate`` to create the polls models.
25+
26+
4. Start the development server and visit http://127.0.0.1:8000/admin/
27+
to create a poll (you'll need the Admin app enabled).
28+
29+
5. Visit http://127.0.0.1:8000/polls/ to participate in the poll.

ReadMe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ This a replacement for [Django GraphQL Auth](https://github.com/PedroBern/django
99
- [ ] Add a Notify Admin Aysnc function that sends emails to admins when Exceptions occur
1010
- [ ] Write Tests
1111
- [ ] Package the app for Pypi
12+
13+
14+
## Resources
15+
- [Reusing Django Apps](https://docs.djangoproject.com/en/4.1/intro/reusable-apps/)
16+
- [Installing Using Pip](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Graph Auth
2+

graph_auth/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.3.16"
1+
__version__ = "0.1.0"
22

33
default_app_config = "graph_auth.apps.GraphQLAuthConfig"

graph_auth/graphql/base.py renamed to graph_auth/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import graphene
22

3-
from ..type import ExpectedErrorType
3+
from .type import ExpectedErrorType
44

55
# TODO: if for custom was here
66
OutputErrorType = ExpectedErrorType

graph_auth/graphql/inputs.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

graph_auth/migrations/0001_initial.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Generated by Django 4.1.7 on 2023-03-02 01:20
2+
3+
from django.conf import settings
4+
from django.db import migrations, models
5+
import django.db.models.deletion
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
initial = True
11+
12+
dependencies = [
13+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14+
]
15+
16+
operations = [
17+
migrations.CreateModel(
18+
name='UserStatus',
19+
fields=[
20+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21+
('verified', models.BooleanField(default=False)),
22+
('archived', models.BooleanField(default=False)),
23+
('secondary_email', models.EmailField(blank=True, max_length=254, null=True)),
24+
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='status', to=settings.AUTH_USER_MODEL)),
25+
],
26+
),
27+
]

graph_auth/migrations/__init__.py

Whitespace-only changes.

graph_auth/schema.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from .constants import Messages, TokenAction
1818
from .exceptions import (EmailAlreadyInUse, TokenScopeError,
1919
UserAlreadyVerified, UserNotVerified)
20-
from .graphql.base import (BaseRegister, PasswordResetBase,
20+
from .base import (BaseRegister, PasswordResetBase,
2121
ResendActivationEmailBase,
2222
SendPasswordResetEmailBase, VerifyAccountBase)
2323
from .models import UserStatus
@@ -138,6 +138,7 @@ def perform_mutation(cls, root, info, **kwargs):
138138
# ],
139139
# countdown=10,
140140
# )
141+
print("Exception details: %s" % str(e))
141142
return cls(
142143
success=False,
143144
errors=[Messages.SERVER_ERROR],
@@ -186,6 +187,7 @@ def perform_mutation(cls, root, info, **kwargs):
186187
# ],
187188
# countdown=10,
188189
# )
190+
print("Exception details: %s" % str(e))
189191
return cls(
190192
success=False,
191193
errors=[Messages.SERVER_ERROR],
@@ -231,6 +233,7 @@ def perform_mutation(cls, root, info, **kwargs):
231233
# ],
232234
# countdown=10,
233235
# )
236+
print("Exception details: %s" % str(e))
234237
return cls(
235238
success=False,
236239
errors=[Messages.SERVER_ERROR],
@@ -283,6 +286,7 @@ def perform_mutation(cls, root, info, **kwargs):
283286
# ],
284287
# countdown=10,
285288
# )
289+
print("Exception details: %s" % str(e))
286290
return cls(
287291
success=False,
288292
errors=[Messages.SERVER_ERROR],
@@ -336,6 +340,7 @@ def perform_mutation(cls, root, info, **kwargs):
336340
# ],
337341
# countdown=10,
338342
# )
343+
print("Exception details: %s" % str(e))
339344
return cls(
340345
success=False,
341346
errors=[Messages.SERVER_ERROR],

0 commit comments

Comments
 (0)