Skip to content

Commit 50c771c

Browse files
committed
init ⚡
0 parents  commit 50c771c

File tree

12 files changed

+411
-0
lines changed

12 files changed

+411
-0
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Prerequisites
2+
3+
* [ ] Is it a bug?
4+
* [ ] Is it a new feature?
5+
* [ ] Is it a a question?
6+
* [ ] Can you reproduce the problem?
7+
* [ ] Are you running the latest version?
8+
* [ ] Did you check for similar issues?
9+
* [ ] Did you perform a cursory search?
10+
11+
For more information, see the [CONTRIBUTING](https://github.com/PedroBern/django-graphql-auth/blob/master/CONTRIBUTING.md) guide.
12+
13+
# Description
14+
15+
Description of the bug/feature/question
16+
17+
# Steps to Reproduce
18+
19+
If we need to reproduce and you don't provide steps for it, it will be closed. Alternatively, you can link a repo with the code to run your issue.
20+
21+
1. [First Step]
22+
2. [Second Step]
23+
3. [and so on...]
24+
25+
## Expected behavior
26+
27+
What you expected to happen
28+
29+
## Actual behavior
30+
31+
What actually happened
32+
33+
# Requirements
34+
35+
Paste the packages you are using, you can get this information from executing `pip freeze`.

.github/stale.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 30
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 7
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- pinned
16+
- documentation
17+
-"good first issue"
18+
- enhancement
19+
20+
# Set to true to ignore issues in a project (defaults to false)
21+
exemptProjects: false
22+
23+
# Set to true to ignore issues in a milestone (defaults to false)
24+
exemptMilestones: false
25+
26+
# Set to true to ignore issues with an assignee (defaults to false)
27+
exemptAssignees: false
28+
29+
# Label to use when marking as stale
30+
staleLabel: no-activity
31+
32+
# Comment to post when removing the stale label.
33+
# unmarkComment: >
34+
# Your comment here.
35+
36+
# Comment to post when closing a stale Issue or Pull Request.
37+
# closeComment: >
38+
# Your comment here.
39+
40+
# Limit the number of actions per hour, from 1-30. Default is 30
41+
limitPerRun: 30
42+
43+
# Limit to only `issues` or `pulls`
44+
# only: issues
45+
46+
issues:
47+
markComment: >
48+
This issue has been automatically marked as stale because it has not had
49+
recent activity. It will be closed if no further activity occurs. Thank you
50+
for your contributions.
51+
52+
pulls:
53+
markComment: >
54+
This pull request has been automatically marked as stale because it has not had
55+
recent activity. It will be closed if no further activity occurs. Thank you
56+
for your contributions.

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
*.*~
2+
*.directory
3+
*.db
4+
*.DS_Store
5+
*.box
6+
*.cer
7+
*.log
8+
*.pem
9+
*.p12
10+
*.pyc
11+
*.sql
12+
*.sqlite3
13+
*.xls
14+
htmlcov/
15+
16+
__pycache__
17+
18+
*.egg*
19+
/.cache
20+
/.coverage
21+
/.pytest_cache
22+
/.tox
23+
24+
/build
25+
/coverage.xml
26+
/dist
27+
/docs/_build
28+
/site
29+
30+
env/
31+
.venv/
32+
.python-version
33+
34+
.vscode

ReadMe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
## TODO
4+
- [] Add Decorators

requirements.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
asgiref==3.6.0
2+
Django==4.1.7
3+
sqlparse==0.4.3
4+
5+
django-cors-headers==3.13.0
6+
7+
django-environ==0.9.0
8+
9+
PyJWT==2.5.0
10+
# >0.3.2 is required for Django 4.0 support and for graphene 3.0 support
11+
django-graphql-jwt==0.3.4
12+
13+
graphene==3.2.1
14+
graphene-django==3.0.0

setup.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env python
2+
3+
import io
4+
import os
5+
import re
6+
from collections import OrderedDict
7+
8+
from setuptools import find_packages, setup
9+
10+
11+
def get_version(package):
12+
with io.open(os.path.join(package, "__init__.py")) as f:
13+
pattern = r'^__version__ = [\'"]([^\'"]*)[\'"]'
14+
return re.search(pattern, f.read(), re.MULTILINE).group(1)
15+
16+
17+
tests_require = [
18+
"pytest>=3.6.3",
19+
"pytest-cov>=2.4.0",
20+
"pytest-django>=3.1.2",
21+
"coveralls",
22+
]
23+
24+
dev_requires = ["black==19.3b0", "flake8==3.7.7"] + tests_require
25+
26+
setup(
27+
name="django-graphql-auth",
28+
version=get_version("graphql_auth"),
29+
license="MIT",
30+
description="Graphql and relay authentication with Graphene for Django.",
31+
long_description=open("README.rst").read(),
32+
long_description_content_type="text/x-rst",
33+
author="pedrobern",
34+
author_email="[email protected]",
35+
maintainer="pedrobern",
36+
url="https://github.com/PedroBern/django-graphql-auth",
37+
project_urls=OrderedDict(
38+
(
39+
("Documentation", "https://django-graphql-auth.readthedocs.io/en/latest/"),
40+
("Issues", "https://github.com/PedroBern/django-graphql-auth/issues"),
41+
)
42+
),
43+
packages=find_packages(exclude=["tests*"]),
44+
install_requires=[
45+
"Django>=2.2.0",
46+
"django-graphql-jwt>=0.3.2,<0.4.0",
47+
"django-filter>=2.2.0",
48+
"graphene_django>=2.1.8",
49+
"graphene>=2.1.8",
50+
],
51+
tests_require=tests_require,
52+
classifiers=[
53+
"Development Status :: 4 - Beta",
54+
"Environment :: Web Environment",
55+
"Intended Audience :: Developers",
56+
"License :: OSI Approved :: MIT License",
57+
"Operating System :: OS Independent",
58+
"Programming Language :: Python",
59+
"Programming Language :: Python :: 3.6",
60+
"Programming Language :: Python :: 3.7",
61+
"Programming Language :: Python :: 3.8",
62+
"Framework :: Django",
63+
"Framework :: Django :: 2.2",
64+
"Framework :: Django :: 3.0",
65+
],
66+
keywords="api graphql rest relay graphene auth",
67+
zip_safe=False,
68+
include_package_data=True,
69+
extras_require={"test": tests_require, "dev": dev_requires},
70+
)

testproject/manage.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python
2+
"""Django's command-line utility for administrative tasks."""
3+
import os
4+
import sys
5+
6+
7+
def main():
8+
"""Run administrative tasks."""
9+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproject.settings')
10+
try:
11+
from django.core.management import execute_from_command_line
12+
except ImportError as exc:
13+
raise ImportError(
14+
"Couldn't import Django. Are you sure it's installed and "
15+
"available on your PYTHONPATH environment variable? Did you "
16+
"forget to activate a virtual environment?"
17+
) from exc
18+
execute_from_command_line(sys.argv)
19+
20+
21+
if __name__ == '__main__':
22+
main()

testproject/testproject/__init__.py

Whitespace-only changes.

testproject/testproject/asgi.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
ASGI config for testproject project.
3+
4+
It exposes the ASGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.asgi import get_asgi_application
13+
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproject.settings')
15+
16+
application = get_asgi_application()

testproject/testproject/settings.py

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
"""
2+
Django settings for testproject project.
3+
4+
Generated by 'django-admin startproject' using Django 4.1.7.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/4.1/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/4.1/ref/settings/
11+
"""
12+
13+
from pathlib import Path
14+
15+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
16+
BASE_DIR = Path(__file__).resolve().parent.parent
17+
18+
19+
# Quick-start development settings - unsuitable for production
20+
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
21+
22+
# SECURITY WARNING: keep the secret key used in production secret!
23+
SECRET_KEY = 'django-insecure-#))^k*n&ovv0=2bdycu*fq-xi+8a7rne0$^se96w-8$ir%g=#k'
24+
25+
# SECURITY WARNING: don't run with debug turned on in production!
26+
DEBUG = True
27+
28+
ALLOWED_HOSTS = []
29+
30+
31+
# Application definition
32+
33+
INSTALLED_APPS = [
34+
'django.contrib.admin',
35+
'django.contrib.auth',
36+
'django.contrib.contenttypes',
37+
'django.contrib.sessions',
38+
'django.contrib.messages',
39+
'django.contrib.staticfiles',
40+
]
41+
42+
MIDDLEWARE = [
43+
'django.middleware.security.SecurityMiddleware',
44+
'django.contrib.sessions.middleware.SessionMiddleware',
45+
'django.middleware.common.CommonMiddleware',
46+
'django.middleware.csrf.CsrfViewMiddleware',
47+
'django.contrib.auth.middleware.AuthenticationMiddleware',
48+
'django.contrib.messages.middleware.MessageMiddleware',
49+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
50+
]
51+
52+
ROOT_URLCONF = 'testproject.urls'
53+
54+
TEMPLATES = [
55+
{
56+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
57+
'DIRS': [],
58+
'APP_DIRS': True,
59+
'OPTIONS': {
60+
'context_processors': [
61+
'django.template.context_processors.debug',
62+
'django.template.context_processors.request',
63+
'django.contrib.auth.context_processors.auth',
64+
'django.contrib.messages.context_processors.messages',
65+
],
66+
},
67+
},
68+
]
69+
70+
WSGI_APPLICATION = 'testproject.wsgi.application'
71+
72+
73+
# Database
74+
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
75+
76+
DATABASES = {
77+
'default': {
78+
'ENGINE': 'django.db.backends.sqlite3',
79+
'NAME': BASE_DIR / 'db.sqlite3',
80+
}
81+
}
82+
83+
84+
# Password validation
85+
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
86+
87+
AUTH_PASSWORD_VALIDATORS = [
88+
{
89+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
90+
},
91+
{
92+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
93+
},
94+
{
95+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
96+
},
97+
{
98+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
99+
},
100+
]
101+
102+
103+
# Internationalization
104+
# https://docs.djangoproject.com/en/4.1/topics/i18n/
105+
106+
LANGUAGE_CODE = 'en-us'
107+
108+
TIME_ZONE = 'UTC'
109+
110+
USE_I18N = True
111+
112+
USE_TZ = True
113+
114+
115+
# Static files (CSS, JavaScript, Images)
116+
# https://docs.djangoproject.com/en/4.1/howto/static-files/
117+
118+
STATIC_URL = 'static/'
119+
120+
# Default primary key field type
121+
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
122+
123+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

0 commit comments

Comments
 (0)