Commit 7933bb5f authored by Eyad Hasan's avatar Eyad Hasan
Browse files

39 commits behind

parents fda41933 0f5f9af4
Pipeline #1302 passed with stage
in 1 minute and 39 seconds
......@@ -6,7 +6,7 @@ from __future__ import (absolute_import, division, print_function,
from django.test import TestCase
# App Imports
from go.cas_callbacks import pfparse, pfinfo
from .cas_callbacks import pfparse, pfinfo
class CasCallbacksTest(TestCase):
"""
......
......@@ -17,8 +17,8 @@ from django.contrib.auth.models import User
from django.test import TestCase
# App Imports
from go.forms import SignupForm, URLForm, EditForm
from go.models import URL, RegisteredUser
from .forms import SignupForm, URLForm, EditForm
from .models import URL, RegisteredUser
class URLFormTest(TestCase):
"""
......
......@@ -13,7 +13,7 @@ from django.test import TestCase
from django.utils import timezone
# App Imports
from go.models import URL, RegisteredUser
from .models import URL, RegisteredUser
class RegisteredUserTest(TestCase):
"""
......
......@@ -14,7 +14,7 @@ from django.contrib.auth.models import User
from django.test import TestCase, Client
# App Imports
from go.models import URL, RegisteredUser
from .models import URL, RegisteredUser
class IndexTest(TestCase):
"""
......
......@@ -24,8 +24,8 @@ from django.utils import timezone
from ratelimit.decorators import ratelimit
# App Imports
from go.forms import SignupForm, URLForm, EditForm
from go.models import URL, RegisteredUser
from .forms import SignupForm, URLForm, EditForm
from .models import URL, RegisteredUser
def index(request):
......@@ -329,7 +329,7 @@ def delete(request, short):
url = get_object_or_404(URL, short__iexact=short)
# If the RegisteredUser is the owner of the URL
if url.owner == request.user.registereduser:
if url.owner == request.user.registereduser and request.META['HTTP_REFERER'] == request.META['HTTP_HOST']:
# remove the URL
url.delete()
# redirect to my_links
......
html {
position: relative;
min-height: 100%;
font-family: -apple-system, BlinkMacSystemFont,
"Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
"Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
}
body {
/* Margin bottom by footer height */
......@@ -12,7 +16,6 @@ body {
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.valign-center {
height: 60px;
......
Django>=1.11
django-crispy-forms==1.6.0
django-crispy-forms==1.6.1
django-ratelimit==1.0.1
django-redis-cache==1.6.4
git+https://github.com/bruno207/django-qrcode.git
django-redis-cache==1.7.1
git+https://github.com/dhaynespls/django-qrcode.git
git+https://github.com/kstateome/django-cas.git
git+https://github.com/bruno207/django-bootstrap3-datetimepicker.git
hashids==1.1.0
git+https://github.com/dhaynespls/django-bootstrap3-datetimepicker.git
hashids==1.2.0
mysqlclient
redis==2.10.5
requests==2.11.0
simplejson==3.8.2
requests==2.13.0
simplejson==3.10.0
six
setuptools==35.0.1
\ No newline at end of file
-r base.txt
flake8==3.0.4
flake8==3.3.0
pep8==1.7.0
pyflakes==1.2.3
pyflakes==1.5.0
coverage
django-redis-cache==1.6.4
......@@ -9,4 +9,5 @@ python go/manage.py makemigrations
python go/manage.py makemigrations go
python go/manage.py migrate
python go/manage.py createsuperuser --noinput --username=$superuser --email=$superuser$GO_EMAIL_DOMAIN
echo "from django.contrib.auth import get_user_model; User = get_user_model(); me = User.objects.get(username='$superuser'); me.first_name = 'David'; me.last_name = 'Haynes'; me.save(); " | python go/manage.py shell
python go/manage.py runserver 0.0.0.0:8000
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment