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

Commit

Permalink
Merge pull request #14 from superproyectos/realease
Browse files Browse the repository at this point in the history
Merge branch 'develop' into realease
  • Loading branch information
superproyectos authored Nov 18, 2018
2 parents 3584824 + 072ee47 commit 5da574d
Show file tree
Hide file tree
Showing 310 changed files with 4,667 additions and 34 deletions.
Empty file added collection_address/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions collection_address/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class CollectionAddressConfig(AppConfig):
name = 'collection_address'
Empty file.
3 changes: 3 additions & 0 deletions collection_address/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
Empty file added collection_order/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions collection_order/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class OrderConfig(AppConfig):
name = 'collection_order'
17 changes: 17 additions & 0 deletions collection_order/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from django.db import models
from user.models import User
from collection_address.models import CollectionAddress
from package.models import Package
from delivery_address.models import DeliveryAddress


# Create your models here.

class CollectionOrder(models.Model):
collection_order_id = models.AutoField(primary_key = True)
user_id = models.OneToOneField(User, on_delete = models.SET_NULL, null = True)
package_id = models.ForeignKey(Package, on_delete = models.CASCADE, null = False, blank = False)
collection_address_id = models.OneToOneField(CollectionAddress, on_delete = models.CASCADE, null = True)
delivery_address_id = models.OneToOneField(DeliveryAddress, on_delete = models.CASCADE, null = True)
recipientsName = models.CharField(max_length = 35)
recipientsSurname = models.CharField(max_length = 35)
3 changes: 3 additions & 0 deletions collection_order/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions collection_order/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added delivery_address/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions delivery_address/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class CoordinatesConfig(AppConfig):
name = 'delivery_address'
Empty file.
18 changes: 18 additions & 0 deletions delivery_address/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from django.db import models


# Create your models here.

class DeliveryAddress(models.Model):
delivery_address_id = models.AutoField(primary_key = True)
line1 = models.CharField(max_length = 35, null = True)
line2 = models.CharField(max_length = 35, null = True)
zipCode = models.CharField(max_length = 35, null = True)
city = models.CharField(max_length = 35, null = True)
country = models.CharField(max_length = 35, null = True)
description = models.CharField(max_length = 150, null = True)
longitude = models.DecimalField(max_digits = 20, decimal_places = 12, null = True)
latitude = models.DecimalField(max_digits = 20, decimal_places = 12, null = True)

def __str__(self):
return self.description
3 changes: 3 additions & 0 deletions delivery_address/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions delivery_address/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
15 changes: 15 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python
import os
import sys

if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mappy.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
Empty file added mappy/__init__.py
Empty file.
40 changes: 40 additions & 0 deletions mappy/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,43 @@
# https://github.com/philippbosch/django-geoposition

GEOPOSITION_GOOGLE_MAPS_API_KEY = 'AIzaSyAyMn7siHMk2mTSEcVJj5GW6-PI74VmeWI'

AUTH_USER_MODEL = 'user.User'

SITE_ID = 1

REST_AUTH_SERIALIZERS = {
'LOGIN_SERIALIZER': 'user.login_serializer.LoginSerializer',
}

REST_AUTH_REGISTER_SERIALIZERS = {
'REGISTER_SERIALIZER': 'user.registration_serializer.RegisterSerializer',
}

# This is required otherwise it asks for email server
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# ACCOUNT_EMAIL_REQUIRED = True
# AUTHENTICATION_METHOD = 'EMAIL'
# ACCOUNT_EMAIL_VERIFICATION = 'optional'

ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
ACCOUNT_EMAIL_VERIFICATION = 'none'

# Following is added to enable registration with email instead of username
AUTHENTICATION_BACKENDS = (
# Needed to login by username in Django admin, regardless of `allauth`

# `allauth` specific authentication methods, such as login by e-mail
"allauth.account.auth_backends.AuthenticationBackend",
)

REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
),
}
django_heroku.settings(locals())
2 changes: 2 additions & 0 deletions mappy/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
path('', include('pages.urls')),
path('api/', include('api.urls')),
]

urlpatterns += static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)
16 changes: 16 additions & 0 deletions mappy/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for mappy project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mappy.settings')

application = get_wsgi_application()
Empty file added package/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions package/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class PackageConfig(AppConfig):
name = 'package'
Empty file added package/migrations/__init__.py
Empty file.
9 changes: 9 additions & 0 deletions package/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.db import models


# Create your models here.

class Package(models.Model):
package_id = models.AutoField(primary_key = True)
weight = models.DecimalField(max_digits = 20, decimal_places = 12, null = True)
description = models.CharField(max_length = 35, null = True)
3 changes: 3 additions & 0 deletions package/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions package/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Binary file modified staticfiles/admin/css/autocomplete.css.gz
Binary file not shown.
24 changes: 12 additions & 12 deletions staticfiles/admin/css/base.7ea12481fb59.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DJANGO Admin styles
*/

@import url("fonts.cc6140298ba7.css");
@import url("fonts.ecfb8916876b.css");

body {
margin: 0;
Expand Down Expand Up @@ -357,7 +357,7 @@ table thead th.sorted .sortoptions a {
width: 14px;
height: 14px;
display: inline-block;
background: url("../img/sorting-icons.3a097b59f104.svg") 0 0 no-repeat;
background: url("../img/sorting-icons.bbfc41068350.svg") 0 0 no-repeat;
background-size: 14px auto;
}

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

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

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

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

.description {
Expand Down Expand Up @@ -664,22 +664,22 @@ div.breadcrumbs a:focus, div.breadcrumbs a:hover {

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

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

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

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

a.deletelink:link, a.deletelink:visited {
Expand Down Expand Up @@ -748,11 +748,11 @@ a.deletelink:focus, a.deletelink:hover {
}

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

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

/* OBJECT HISTORY */
Expand Down
Loading

0 comments on commit 5da574d

Please sign in to comment.