Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it run on Python 3.8 with Django 3.0.7 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pinder/peering_requests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class Request(models.Model):
)

sender = models.ForeignKey(
settings.AUTH_USER_MODEL, related_name="requests_received")
receiver = models.ForeignKey("users.Isp", related_name="requests_sent")
settings.AUTH_USER_MODEL, related_name="requests_received", on_delete=models.CASCADE)
receiver = models.ForeignKey("users.Isp", related_name="requests_sent", on_delete=models.CASCADE)
ixlan_id = models.PositiveIntegerField()

state = models.CharField(
choices=STATES, default=STATE_WAITING, max_length=8)
choices=STATES, default=STATE_WAITING, max_length=12)

sender_is_ready = models.BooleanField(default=False)
receiver_is_ready = models.BooleanField(default=False)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'pinder/base.html' %}
{% load staticfiles %}
{% load static %}
{% block body %}
<div class="margin-top-50" ng-controller="PinderController" ng-init="getRequest('{{ object.id }}')">
<p class="text"><strong>Pinder</strong> Swipe Right On A New Peering Relationship!</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'pinder/base.html' %}
{% load staticfiles %}
{% load static %}
{% block body %}
<div class="margin-top-50" ng-controller="PinderController" ng-init="getRequests()">
<p class="text"><strong>Pinder</strong> Swipe Right On A New Peering Relationship!</p>
Expand Down
2 changes: 1 addition & 1 deletion pinder/pinder/templates/pinder/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<!doctype html>
<html xmlns="http://www.w3.org/1999/html">

Expand Down
2 changes: 1 addition & 1 deletion pinder/pinder/templates/pinder/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'pinder/base.html' %}


{% load staticfiles %}
{% load static %}


{% block body %}
Expand Down
2 changes: 1 addition & 1 deletion pinder/pinder/templates/rest_framework/api.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "rest_framework/base.html" %}


{% load staticfiles %}
{% load static %}


{% block title %}Pinder :: API{% endblock title %}
Expand Down
3 changes: 2 additions & 1 deletion pinder/pinder/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
router = DefaultRouter()
router.register(r'requests', RequestViewSet)

app_name = 'pinder'
urlpatterns = [

url(
r"^api/auth/",
include('rest_framework.urls', namespace="rest_framework")
),
url(r"^api/", include(router.urls, namespace="drf")),
url(r"^api/", include((router.urls, 'rest_framework'), namespace="drf")),
url(r"^$", IndexView.as_view(), name="index"),

url(r"^requests/$", RequestListView.as_view(), name="request-list"),
Expand Down
2 changes: 1 addition & 1 deletion pinder/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class User(AbstractBaseUser, PermissionsMixin):

name = models.CharField(max_length=128)
email = models.EmailField(unique=True)
isp = models.ForeignKey(Isp)
isp = models.ForeignKey(Isp, on_delete=models.CASCADE)

is_staff = models.BooleanField(
"Staff status",
Expand Down
2 changes: 1 addition & 1 deletion pinder/users/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib.auth import login
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.views.generic import RedirectView

from rest_framework.permissions import AllowAny
Expand Down