Skip to content
This repository was archived by the owner on Sep 15, 2020. It is now read-only.

Commit 072ee47

Browse files
author
Super Proyectos
committed
Merge branch 'develop' into realease
# Conflicts: # collection_address/admin.py # collection_address/models.py # collection_address/views.py # collection_order/admin.py # delivery_address/admin.py # mappy/settings.py # mappy/urls.py # package/admin.py # requirements.txt # user/admin.py # user/models.py # user/serializers.py # user/urls.py # user/views.py
1 parent a8aedd2 commit 072ee47

File tree

310 files changed

+4667
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+4667
-34
lines changed

collection_address/__init__.py

Whitespace-only changes.

collection_address/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class CollectionAddressConfig(AppConfig):
5+
name = 'collection_address'

collection_address/migrations/__init__.py

Whitespace-only changes.

collection_address/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

collection_order/__init__.py

Whitespace-only changes.

collection_order/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class OrderConfig(AppConfig):
5+
name = 'collection_order'

collection_order/models.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from django.db import models
2+
from user.models import User
3+
from collection_address.models import CollectionAddress
4+
from package.models import Package
5+
from delivery_address.models import DeliveryAddress
6+
7+
8+
# Create your models here.
9+
10+
class CollectionOrder(models.Model):
11+
collection_order_id = models.AutoField(primary_key = True)
12+
user_id = models.OneToOneField(User, on_delete = models.SET_NULL, null = True)
13+
package_id = models.ForeignKey(Package, on_delete = models.CASCADE, null = False, blank = False)
14+
collection_address_id = models.OneToOneField(CollectionAddress, on_delete = models.CASCADE, null = True)
15+
delivery_address_id = models.OneToOneField(DeliveryAddress, on_delete = models.CASCADE, null = True)
16+
recipientsName = models.CharField(max_length = 35)
17+
recipientsSurname = models.CharField(max_length = 35)

collection_order/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

collection_order/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.

delivery_address/__init__.py

Whitespace-only changes.

delivery_address/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class CoordinatesConfig(AppConfig):
5+
name = 'delivery_address'

delivery_address/migrations/__init__.py

Whitespace-only changes.

delivery_address/models.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from django.db import models
2+
3+
4+
# Create your models here.
5+
6+
class DeliveryAddress(models.Model):
7+
delivery_address_id = models.AutoField(primary_key = True)
8+
line1 = models.CharField(max_length = 35, null = True)
9+
line2 = models.CharField(max_length = 35, null = True)
10+
zipCode = models.CharField(max_length = 35, null = True)
11+
city = models.CharField(max_length = 35, null = True)
12+
country = models.CharField(max_length = 35, null = True)
13+
description = models.CharField(max_length = 150, null = True)
14+
longitude = models.DecimalField(max_digits = 20, decimal_places = 12, null = True)
15+
latitude = models.DecimalField(max_digits = 20, decimal_places = 12, null = True)
16+
17+
def __str__(self):
18+
return self.description

delivery_address/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

delivery_address/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.

manage.py

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

mappy/__init__.py

Whitespace-only changes.

mappy/settings.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,43 @@
147147
# https://github.com/philippbosch/django-geoposition
148148

149149
GEOPOSITION_GOOGLE_MAPS_API_KEY = 'AIzaSyAyMn7siHMk2mTSEcVJj5GW6-PI74VmeWI'
150+
151+
AUTH_USER_MODEL = 'user.User'
152+
153+
SITE_ID = 1
154+
155+
REST_AUTH_SERIALIZERS = {
156+
'LOGIN_SERIALIZER': 'user.login_serializer.LoginSerializer',
157+
}
158+
159+
REST_AUTH_REGISTER_SERIALIZERS = {
160+
'REGISTER_SERIALIZER': 'user.registration_serializer.RegisterSerializer',
161+
}
162+
163+
# This is required otherwise it asks for email server
164+
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
165+
# ACCOUNT_EMAIL_REQUIRED = True
166+
# AUTHENTICATION_METHOD = 'EMAIL'
167+
# ACCOUNT_EMAIL_VERIFICATION = 'optional'
168+
169+
ACCOUNT_AUTHENTICATION_METHOD = 'email'
170+
ACCOUNT_EMAIL_REQUIRED = True
171+
ACCOUNT_USERNAME_REQUIRED = False
172+
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
173+
ACCOUNT_EMAIL_VERIFICATION = 'none'
174+
175+
# Following is added to enable registration with email instead of username
176+
AUTHENTICATION_BACKENDS = (
177+
# Needed to login by username in Django admin, regardless of `allauth`
178+
179+
# `allauth` specific authentication methods, such as login by e-mail
180+
"allauth.account.auth_backends.AuthenticationBackend",
181+
)
182+
183+
REST_FRAMEWORK = {
184+
'DEFAULT_AUTHENTICATION_CLASSES': (
185+
'rest_framework.authentication.TokenAuthentication',
186+
'rest_framework.authentication.SessionAuthentication',
187+
),
188+
}
189+
django_heroku.settings(locals())

mappy/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@
2525
path('', include('pages.urls')),
2626
path('api/', include('api.urls')),
2727
]
28+
29+
urlpatterns += static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)

mappy/wsgi.py

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

package/__init__.py

Whitespace-only changes.

package/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class PackageConfig(AppConfig):
5+
name = 'package'

package/migrations/__init__.py

Whitespace-only changes.

package/models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from django.db import models
2+
3+
4+
# Create your models here.
5+
6+
class Package(models.Model):
7+
package_id = models.AutoField(primary_key = True)
8+
weight = models.DecimalField(max_digits = 20, decimal_places = 12, null = True)
9+
description = models.CharField(max_length = 35, null = True)

package/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

package/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.
13 Bytes
Binary file not shown.

staticfiles/admin/css/base.7ea12481fb59.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DJANGO Admin styles
33
*/
44

5-
@import url("fonts.cc6140298ba7.css");
5+
@import url("fonts.ecfb8916876b.css");
66

77
body {
88
margin: 0;
@@ -357,7 +357,7 @@ table thead th.sorted .sortoptions a {
357357
width: 14px;
358358
height: 14px;
359359
display: inline-block;
360-
background: url("../img/sorting-icons.3a097b59f104.svg") 0 0 no-repeat;
360+
background: url("../img/sorting-icons.bbfc41068350.svg") 0 0 no-repeat;
361361
background-size: 14px auto;
362362
}
363363

@@ -548,18 +548,18 @@ ul.messagelist li {
548548
font-size: 13px;
549549
padding: 10px 10px 10px 65px;
550550
margin: 0 0 10px 0;
551-
background: #dfd url("../img/icon-yes.d2f9f035226a.svg") 40px 12px no-repeat;
551+
background: #dfd url("../img/icon-yes.06589da83e26.svg") 40px 12px no-repeat;
552552
background-size: 16px auto;
553553
color: #333;
554554
}
555555

556556
ul.messagelist li.warning {
557-
background: #ffc url("../img/icon-alert.034cc7d8a67f.svg") 40px 14px no-repeat;
557+
background: #ffc url("../img/icon-alert.21c61971fb51.svg") 40px 14px no-repeat;
558558
background-size: 14px auto;
559559
}
560560

561561
ul.messagelist li.error {
562-
background: #ffefef url("../img/icon-no.439e821418cd.svg") 40px 12px no-repeat;
562+
background: #ffefef url("../img/icon-no.233633bc1364.svg") 40px 12px no-repeat;
563563
background-size: 16px auto;
564564
}
565565

@@ -633,7 +633,7 @@ div.system-message p.system-message-title {
633633
padding: 4px 5px 4px 25px;
634634
margin: 0;
635635
color: #c11;
636-
background: #ffefef url("../img/icon-no.439e821418cd.svg") 5px 5px no-repeat;
636+
background: #ffefef url("../img/icon-no.233633bc1364.svg") 5px 5px no-repeat;
637637
}
638638

639639
.description {
@@ -664,22 +664,22 @@ div.breadcrumbs a:focus, div.breadcrumbs a:hover {
664664

665665
.viewlink, .inlineviewlink {
666666
padding-left: 16px;
667-
background: url("../img/icon-viewlink.41eb31f7826e.svg") 0 1px no-repeat;
667+
background: url("../img/icon-viewlink.a48d0b5895d8.svg") 0 1px no-repeat;
668668
}
669669

670670
.addlink {
671671
padding-left: 16px;
672-
background: url("../img/icon-addlink.d519b3bab011.svg") 0 1px no-repeat;
672+
background: url("../img/icon-addlink.4001bb35b6f9.svg") 0 1px no-repeat;
673673
}
674674

675675
.changelink, .inlinechangelink {
676676
padding-left: 16px;
677-
background: url("../img/icon-changelink.18d2fd706348.svg") 0 1px no-repeat;
677+
background: url("../img/icon-changelink.9f469bf75d66.svg") 0 1px no-repeat;
678678
}
679679

680680
.deletelink {
681681
padding-left: 16px;
682-
background: url("../img/icon-deletelink.564ef9dc3854.svg") 0 1px no-repeat;
682+
background: url("../img/icon-deletelink.4059963bd772.svg") 0 1px no-repeat;
683683
}
684684

685685
a.deletelink:link, a.deletelink:visited {
@@ -748,11 +748,11 @@ a.deletelink:focus, a.deletelink:hover {
748748
}
749749

750750
.object-tools a.viewsitelink, .object-tools a.golink {
751-
background-image: url("../img/tooltag-arrowright.bbfb788a849e.svg");
751+
background-image: url("../img/tooltag-arrowright.5d363e8887ce.svg");
752752
}
753753

754754
.object-tools a.addlink {
755-
background-image: url("../img/tooltag-add.e59d620a9742.svg");
755+
background-image: url("../img/tooltag-add.cf20e2410f14.svg");
756756
}
757757

758758
/* OBJECT HISTORY */

0 commit comments

Comments
 (0)