Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606885025-practice
Commits
ffb00fb2
Commit
ffb00fb2
authored
Nov 21, 2019
by
Rani Lasma Uli
Browse files
done testinggoat ch 18
parent
2fb56068
Pipeline
#25744
failed with stages
in 44 minutes and 11 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
accounts/migrations/0002_user.py
0 → 100644
View file @
ffb00fb2
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-21 16:11
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'accounts'
,
'0001_initial'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'User'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'email'
,
models
.
EmailField
(
max_length
=
254
)),
],
),
]
accounts/migrations/0003_auto_20191121_2311.py
0 → 100644
View file @
ffb00fb2
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-21 16:11
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'accounts'
,
'0002_user'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'email'
,
field
=
models
.
EmailField
(
max_length
=
254
,
unique
=
True
),
),
]
accounts/migrations/0004_auto_20191121_2313.py
0 → 100644
View file @
ffb00fb2
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-21 16:13
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'accounts'
,
'0003_auto_20191121_2311'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'user'
,
name
=
'id'
,
),
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'email'
,
field
=
models
.
EmailField
(
max_length
=
254
,
primary_key
=
True
,
serialize
=
False
),
),
]
accounts/models.py
View file @
ffb00fb2
...
...
@@ -3,10 +3,18 @@ from django.db import models
from
django.contrib.auth.models
import
(
AbstractBaseUser
,
BaseUserManager
,
PermissionsMixin
)
import
uuid
class
User
(
models
.
Model
):
email
=
models
.
EmailField
(
primary_key
=
True
)
REQUIRED_FIELDS
=
[]
USERNAME_FIELD
=
'email'
is_anonymous
=
False
is_authenticated
=
True
class
Token
(
models
.
Model
):
email
=
models
.
EmailField
()
uid
=
models
.
CharField
(
max_length
=
255
)
uid
=
models
.
CharField
(
default
=
uuid
.
uuid4
,
max_length
=
40
)
class
ListUserManager
(
BaseUserManager
):
...
...
superlists/settings.py
View file @
ffb00fb2
...
...
@@ -61,7 +61,7 @@ INSTALLED_APPS = [
'accounts'
,
]
AUTH_USER_MODEL
=
'accounts.
List
User'
AUTH_USER_MODEL
=
'accounts.User'
AUTHENTICATION_BACKENDS
=
[
'accounts.authentication.PasswordlessAuthenticationBackend'
,
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment