From 0f456538b56accdad54cbfc7a282b6a6420276b7 Mon Sep 17 00:00:00 2001 From: winkidney Date: Sun, 8 Dec 2019 00:56:22 +0800 Subject: [PATCH] Refactor: Remove old views and templates --- core/urls.py | 16 - pinry/static/css/lightbox.css | 72 --- pinry/static/css/messages.css | 23 - pinry/static/css/pinry.css | 308 ----------- pinry/static/css/vue-pin.css | 16 - pinry/static/js/helpers.js | 88 --- pinry/static/js/lightbox.js | 105 ---- pinry/static/js/messages.js | 23 - pinry/static/js/pin-form.js | 212 ------- pinry/static/js/pinry.js | 187 ------- pinry/static/js/vue/main.js | 522 ------------------ pinry/templates/404.html | 14 - pinry/templates/500.html | 16 - pinry/templates/base.html | 120 ---- pinry/templates/core/pin_form.html | 7 - pinry/templates/core/pins.html | 18 - .../templates/includes/bookmarklet_link.html | 8 - pinry/templates/includes/field.html | 14 - pinry/templates/includes/lightbox-vue.html | 39 -- pinry/templates/includes/messages.html | 5 - pinry/templates/includes/pin_form-vue.html | 42 -- pinry/templates/includes/pin_form.html | 45 -- pinry/templates/includes/vue-pin.html | 66 --- pinry/templates/users/login.html | 21 - pinry/templates/users/private.html | 15 - pinry/templates/users/register.html | 21 - pinry/urls.py | 1 - 27 files changed, 2024 deletions(-) delete mode 100644 core/urls.py delete mode 100644 pinry/static/css/lightbox.css delete mode 100644 pinry/static/css/messages.css delete mode 100644 pinry/static/css/pinry.css delete mode 100644 pinry/static/css/vue-pin.css delete mode 100644 pinry/static/js/helpers.js delete mode 100644 pinry/static/js/lightbox.js delete mode 100644 pinry/static/js/messages.js delete mode 100644 pinry/static/js/pin-form.js delete mode 100644 pinry/static/js/pinry.js delete mode 100644 pinry/static/js/vue/main.js delete mode 100644 pinry/templates/404.html delete mode 100644 pinry/templates/500.html delete mode 100644 pinry/templates/base.html delete mode 100644 pinry/templates/core/pin_form.html delete mode 100644 pinry/templates/core/pins.html delete mode 100644 pinry/templates/includes/bookmarklet_link.html delete mode 100644 pinry/templates/includes/field.html delete mode 100644 pinry/templates/includes/lightbox-vue.html delete mode 100644 pinry/templates/includes/messages.html delete mode 100644 pinry/templates/includes/pin_form-vue.html delete mode 100644 pinry/templates/includes/pin_form.html delete mode 100644 pinry/templates/includes/vue-pin.html delete mode 100644 pinry/templates/users/login.html delete mode 100644 pinry/templates/users/private.html delete mode 100644 pinry/templates/users/register.html diff --git a/core/urls.py b/core/urls.py deleted file mode 100644 index 29c45b3..0000000 --- a/core/urls.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.conf.urls import url -from django.views.generic import TemplateView - - -urlpatterns = [ - url(r'^pins/pin-form/$', TemplateView.as_view(template_name='core/pin_form.html'), - name='pin-form'), - url(r'^pins/tags/(?P(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'), - name='tag-pins'), - url(r'^pins/users/(?P(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'), - name='user-pins'), - url(r'^(?P[0-9]+)/$', TemplateView.as_view(template_name='core/pins.html'), - name='pin-detail'), - url(r'^$', TemplateView.as_view(template_name='core/pins.html'), - name='recent-pins'), -] diff --git a/pinry/static/css/lightbox.css b/pinry/static/css/lightbox.css deleted file mode 100644 index 3330031..0000000 --- a/pinry/static/css/lightbox.css +++ /dev/null @@ -1,72 +0,0 @@ -.lightbox-background { - background: rgba(0, 0, 0, 0.7); - left: 0; - right: 0; - top: 0; - position: absolute; - z-index: 9001; -} - -.lightbox-wrapper { - background-color: rgba(0, 0, 0, 0.7); - background-image: url("../img/loader.gif"); - background-position: center center; - background-repeat: no-repeat; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - left: 50%; - margin-bottom: 100px; - position: absolute; -} - -.lightbox-wrapper img { - max-width: 600px; - -webkit-border-top-right-radius: 3px; - -webkit-border-top-left-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-topleft: 3px; - border-top-right-radius: 3px; - border-top-left-radius: 3px; -} - -.lightbox-data { - color: white; - -webkit-border-bottom-right-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - -moz-border-radius-bottomright: 3px; - -moz-border-radius-bottomleft: 3px; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} - -.lightbox-data .description { - border-bottom: 1px solid #333; - font-family: "Georgia", "Times", "Times New Roman", Serif; - font-size: 16px; - padding: 8px; -} - -.lightbox-data .avatar img { - display: block; - height: 40px; - width: 40px; - margin: 5px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} - -.lightbox-data .text { - font-weight: bold; - margin-top: 3px; -} - -.lightbox-data .text .dim { - color: #999; - font-size: 14px; -} - -.lightbox-data .extra { - padding: 8px 6px; -} diff --git a/pinry/static/css/messages.css b/pinry/static/css/messages.css deleted file mode 100644 index 8ca7676..0000000 --- a/pinry/static/css/messages.css +++ /dev/null @@ -1,23 +0,0 @@ -#messages { - list-style-type: none; - position: absolute; - right: 10px; - top: 60px; - z-index: 200; -} - -#messages li { - border: 1px solid #ccc; - font-size: 16px; - margin: 5px 0; - padding: 18px 28px; -} - -#messages li:hover { - cursor: pointer; - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -ms-transform: scale(1.1); - -o-transform: scale(1.1); - transform: scale(1.1); -} diff --git a/pinry/static/css/pinry.css b/pinry/static/css/pinry.css deleted file mode 100644 index 76caff5..0000000 --- a/pinry/static/css/pinry.css +++ /dev/null @@ -1,308 +0,0 @@ -/* Start Globals */ -body { - background: #F5F5EB; - margin-top: 80px; - font-family: 'Open Sans', sans-serif; -} - -h1, h2, h3, h4, h5, h6 { - font-family: 'Open Sans', sans-serif; - font-weight: 300; -} - -h1 { - font-weight: 700; - font-size: 4em; -} - -h2 { - font-size: 3em; -} - -h3 { - font-size: 2.3em; -} - -a { - cursor: pointer; -} - -#noscript { - font-size: 18px; - line-height: 24px; - margin: 0 auto; - width: 500px; - text-align: center; -} -#app{ - overflow: auto; -} -/* End Globals */ - - -/* Start Navigation */ -.navbar { - background: white; - border: none; - border-radius: 0; -} - -.navbar-brand img { - font-family: 'Monoton', sans-serif; - height: 30px; -} - -.navbar-nav>li>a { - text-transform: uppercase; - font-size: 0.9em; - color: #111 !important; - padding: 10px 20px; -} - -.navbar-nav>li>a.btn { - padding: 5px 10px; - margin: 5px 17px; -} - -@media (min-width: 768px) { - .navbar-nav>li>a { - padding-top: 20px; - padding-bottom: 20px; - } - - .navbar-nav>li>a.btn { - margin-top: 15px; - margin-bottom: 15px; - } -} - -#bookmarklet { - cursor: move; -} -/* End Navigation */ - - -/* Start Forms */ -form { - margin-bottom: 0; -} - -textarea { - height: 70px; -} - -#form h1 { - text-align: center; -} - -#form h3 { - text-align: center; - margin-bottom: 15px; -} - -#form .form-group { - margin-bottom: -1px; -} - -#id_username { - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -#id_email { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -#id_password { - margin-bottom: 15px; - -webkit-border-top-right-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -#submit { - width: 100%; -} - -.qq-upload-button { - background: #eee; - border: 3px dashed #888; - -webit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - color: black; - width: 238px; -} - -.qq-upload-drop-area { - background: #275173; - border: 3px dashed #aaa; - -webit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - color: #ccc; -} - -.qq-upload-success { - -webit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.qq-upload-list li { - background-color: #eee; - -webit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.qq-upload-spinner { - display: none; -} - -.modal-body { - overflow: hidden; -} -/* End Forms */ - - -/* Start Pins */ -#pins { - top: 80px; -} - -.pin { - background: #fff; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: 0 1px 0 #bbb; - -moz-box-shadow: 0 1px 0 #bbb; - box-shadow: 0 1px 0 #bbb; - position: absolute; - width: 240px; -} - -.pin .editor { - background: rgba(255, 255, 255, 0.4); - border: 2px solid rgba(255, 255, 255, 0.4); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - position: absolute; - right: 7px; - top: 7px; - color: white; -} - -.pin:hover .editor { - display: block; -} - -.pin .editor .borderable { - background: rgba(0, 0, 0, 0.8); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - cursor: pointer; - padding: 5px 8px; - display: inline-block; -} - -.pin .image-wrapper { - background-image: url("../img/loader.gif"); - background-position: center center; - background-repeat: no-repeat; -} - -.pin img { - -webkit-border-top-left-radius: 3px; - -moz-border-radius-topleft: 3px; - border-top-left-radius: 3px; - -webkit-border-top-right-radius: 3px; - -moz-border-radius-topright: 3px; - border-top-right-radius: 3px; - cursor: -webkit-zoom-in; - cursor: -moz-zoom-in; - display: block; - margin: 0; - padding: 0; - width: 240px; -} - -.pin p { - border-bottom: 1px solid #ddd; - font-family: 'Georgia', 'Times', 'Times New Roman', serif; - font-size: 12px; - margin-bottom: 0; - padding: 8px; - overflow: hidden; - text-overflow: ellipsis; -} - -.pin strong { - color: #777; - font-weight: normal; -} - -.pin-footer { - color: #777; - cursor: default; - font-size: 12px; - font-weight: bold; - padding: 10px; -} - -.pin-footer .dim { - color: #999; - font-weight: normal; -} - -.pin-footer .avatar { - background: white; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.pin-footer .avatar img { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - height: 30px; - width: 30px; -} - -.pin-footer .text { - line-height: 16px; - margin-top: -1px; - width: 180px; -} - -.spinner { - background: url('../img/loader.gif'); - background-position: center center; - background-repeat: no-repeat; - height: 31px; - margin: 0 auto; - padding: 50px; - width: 31px; -} - -#the-end { - font-family: 'Georgia', 'Times', 'Times New Roman', serif; - font-size: 1.4em; - font-style: italic; - text-align: center; - padding: 50px; -} -/* End Pins */ diff --git a/pinry/static/css/vue-pin.css b/pinry/static/css/vue-pin.css deleted file mode 100644 index d028d67..0000000 --- a/pinry/static/css/vue-pin.css +++ /dev/null @@ -1,16 +0,0 @@ -.fade-enter-active, .fade-leave-active { - transition: opacity .3s; -} - -.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { - opacity: 0; -} - - -.fake-hide { - opacity: 0; -} - -.pin { - transition: opacity .3s; -} diff --git a/pinry/static/js/helpers.js b/pinry/static/js/helpers.js deleted file mode 100644 index 91998d6..0000000 --- a/pinry/static/js/helpers.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Helpers for Pinry - * Descrip: A hodgepodge of useful things to help clean up Pinry's JavaScript. - * Authors: Pinry Contributors - * Updated: Feb 26th, 2013 - * Require: jQuery - */ -var API_BASE = "/api/v2/"; - - -function _getCookie(name) { - var cookieValue = null; - if (document.cookie && document.cookie !== '') { - var cookies = document.cookie.split(';'); - for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); - // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) === (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); - break; - } - } - } - return cookieValue; -} - - -function getCSRFToken() { - return _getCookie('csrftoken'); -} - - -function csrfSafeMethod(method) { - // these HTTP methods do not require CSRF protection - return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); -} - -$.ajaxSetup({ - beforeSend: function (xhr, settings) { - if (!csrfSafeMethod(settings.type) && !this.crossDomain) { - xhr.setRequestHeader("X-CSRFToken", getCSRFToken()); - } - } -}); - -function cleanTags(tags) { - if (typeof tags === 'string' && tags.length > 0) { - tags = tags.split(/[\s,]+/); - for (var i in tags) { - tags[i] = tags[i].trim(); - } - } else { - return []; - } - return tags; -} - -function getPinData(pinId) { - var apiUrl = API_BASE + "pins/" + pinId + '/?format=json'; - return $.get(apiUrl); -} - - -function deletePinData(pinId) { - var apiUrl = API_BASE + 'pins/' + pinId + '/?format=json'; - return $.ajax(apiUrl, { - type: 'DELETE' - }); -} - -function postPinData(data) { - return $.ajax({ - type: "post", - url: API_BASE + "pins/", - contentType: 'application/json', - data: JSON.stringify(data) - }); -} - - -function getUrlParameter(name) { - return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null; -} - -function getDocumentScrollTop() { - var doc = document.documentElement; - return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); -} diff --git a/pinry/static/js/lightbox.js b/pinry/static/js/lightbox.js deleted file mode 100644 index 793aaa5..0000000 --- a/pinry/static/js/lightbox.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Lightbox for Pinry - * Descrip: A lightbox plugin for pinry so that I don't have to rely on some of - * the massive code bases of other lightboxes, this one uses data - * fields to acquire the info we need and dynamically loads comments. - * It also has a nice parallax view mode where the top scrolls and the - * background stays stationary. - * Authors: Pinry Contributors - * Updated: Feb 4th, 2016 - * Require: jQuery, Pinry JavaScript Helpers - */ - - -$(window).load(function() { - // Start Helper Functions - function freezeScroll(freeze) { - freeze = typeof freeze !== 'undefined' ? freeze : true; - if (freeze) { - $('body').data('scroll-level', $(window).scrollTop()); - $('#pins').css({ - 'position': 'fixed', - 'margin-top': -$('body').data('scroll-level') - }); - $(window).scrollTop(0); - /* disable the global pin-loading scroll handler so we don't - load pins when scrolling a selected image */ - $(window).off('scroll'); - } else { - $('#pins').css({ - 'position': 'static', - 'margin-top': 0 - }); - $(window).scrollTop($('body').data('scroll-level')); - /* enable the pin-loading scroll handler unless we've already - loaded all pins from the server (in which case an element - with id 'the-end' exists */ - var theEnd = document.getElementById('the-end'); - if (!theEnd) { - $(window).scroll(scrollHandler); - } - } - } - // End Helper Functions - - - // Start View Functions - function createBox(context) { - freezeScroll(); - $('body').append(renderTemplate('#lightbox-template', context)); - var box = $('.lightbox-background'); - box.css('height', $(document).height()); - $('.lightbox-image-wrapper').css('height', context.image.standard.height); - box.fadeIn(200); - $('.lightbox-image').load(function() { - $(this).fadeIn(200); - }); - $('.lightbox-wrapper').css({ - 'width': context.image.standard.width, - 'margin-top': 80, - 'margin-bottom': 80, - 'margin-left': -context.image.standard.width/2 - }); - if ($('.lightbox-wrapper').height()+140 > $(window).height()) - $('.lightbox-background').height($('.lightbox-wrapper').height()+160); - - box.click(function() { - $(this).fadeOut(200); - setTimeout(function() { - box.remove(); - }, 200); - freezeScroll(false); - }); - } - // End View Functions - - - // Start Global Init Function - window.lightbox = function() { - var links = $('body').find('.lightbox'); - if (pinFilter) { - var promise = getPinData(pinFilter); - promise.success(function(pin) { - createBox(pin); - }); - promise.error(function() { - message('Problem problem fetching pin data.', 'alert alert-danger'); - }); - } - return links.each(function() { - $(this).off('click'); - $(this).click(function(e) { - e.preventDefault(); - var promise = getPinData($(this).data('id')); - promise.success(function(pin) { - createBox(pin); - }); - promise.error(function() { - message('Problem problem fetching pin data.', 'alert alert-danger'); - }); - }); - }); - } - - // End Global Init Function -}); diff --git a/pinry/static/js/messages.js b/pinry/static/js/messages.js deleted file mode 100644 index cc86389..0000000 --- a/pinry/static/js/messages.js +++ /dev/null @@ -1,23 +0,0 @@ -$(document).ready(function() { - window.message = function(text, classes) { - classes = typeof classes !== 'undefined' ? classes : 'alert'; - messageHtml = renderTemplate('#messages-template', { - text: text, - classes: classes - }); - $('#messages').append(messageHtml); - $('#messages li').each(function() { - $(this).delay(3000).fadeOut(300); - var messageDelayed = $(this); - setTimeout(function() { - messageDelayed.remove(); - }, 3300); - }); - } - - if (errors) { - for (var i in errors) { - message(errors[i].text, errors[i].tags); - } - } -}); diff --git a/pinry/static/js/pin-form.js b/pinry/static/js/pin-form.js deleted file mode 100644 index 7e3e0bb..0000000 --- a/pinry/static/js/pin-form.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Pin Form for Pinry - * Descrip: This is for creation new pins on everything, the bookmarklet, on the - * site and even editing pins in some limited situations. - * Authors: Pinry Contributors - * Updated: March 3rd, 2013 - * Require: jQuery, Pinry JavaScript Helpers - */ - - -$(window).load(function() { - var uploadedImage = false; - var editedPin = null; - - // Start Helper Functions - function getFormData() { - return { - url: $('#pin-form-image-url').val(), - referer: $('#pin-form-referer').val(), - description: $('#pin-form-description').val(), - tags: cleanTags($('#pin-form-tags').val()) - } - } - - function createPinPreviewFromForm() { - var context = {pins: [{ - image: {thumbnail: {image: $('#pin-form-image-url').val()}}, - referer: $('#pin-form-referer').val(), - description: $('#pin-form-description').val(), - tags: cleanTags($('#pin-form-tags').val()), - submitter: currentUser, - }]}, - html = renderTemplate('#pins-template', context), - preview = $('#pin-form-image-preview'); - preview.html(html); - preview.find('.pin').width(240); - preview.find('.pin').fadeIn(300); - if (getFormData().url == "") - preview.find('.image-wrapper').height(255); - preview.find('.image-wrapper img').fadeIn(300); - setTimeout(function() { - if (preview.find('.pin').height() > 305) { - $('#pin-form .modal-body').animate({ - 'height': preview.find('.pin').height()+25 - }, 300); - } - }, 300); - } - - function dismissModal(modal) { - modal.modal('hide'); - modal.on('hidden.bs.modal', function() { - modal.remove(); - }); - } - // End Helper Functions - - - // Start View Functions - function createPinForm(editPinId) { - $('body').append(renderTemplate('#pin-form-template', '')); - var modal = $('#pin-form'), - formFields = [ - $('#pin-form-image-url'), - $('#pin-form-referer'), - $('#pin-form-description'), - $('#pin-form-tags') - ], - pinFromUrl = getUrlParameter('pin-image-url'), - pinFromDescription = getUrlParameter('description'), - pinFromReferer = getUrlParameter('referer'); - // If editable grab existing data - if (editPinId) { - var promise = getPinData(editPinId); - promise.success(function(data) { - editedPin = data; - $('#pin-form-image-url').val(editedPin.image.thumbnail.image); - $('#pin-form-image-url').parent().hide(); - $('#pin-form-referer').parent().hide(); - $('#pin-form-image-upload').parent().hide(); - $('#pin-form-description').val(editedPin.description); - $('#pin-form-tags').val(editedPin.tags); - createPinPreviewFromForm(); - }); - } - modal.modal('show'); - // Auto update preview on field changes - var timer; - for (var i in formFields) { - formFields[i].bind('propertychange keyup input paste', function() { - clearTimeout(timer); - timer = setTimeout(function() { - createPinPreviewFromForm() - }, 700); - if (!uploadedImage) - $('#pin-form-image-upload').parent().fadeOut(300); - }); - } - // Drag and drop upload - $('#pin-form-image-upload').dropzone({ - url: API_BASE + "images/", - paramName: 'image', - parallelUploads: 1, - uploadMultiple: false, - maxFiles: 1, - acceptedFiles: 'image/*', - headers: { - 'X-CSRFToken': getCSRFToken(), - }, - success: function(file, resp) { - var image_url = $('#pin-form-image-url'); - image_url.parent().fadeOut(300); - uploadedImage = resp.id; - image_url.val(resp.thumbnail.image); - createPinPreviewFromForm(); - }, - error: function (error) { - message('Problem uploading image.', 'alert alert-error'); - }, - }); - // If bookmarklet submit - if (pinFromUrl) { - $('#pin-form-image-upload').parent().css('display', 'none'); - $('#pin-form-image-url').val(pinFromUrl); - $('#pin-form-referer').val(pinFromReferer); - $('#pin-form-description').val(pinFromDescription); - $('.navbar').css('display', 'none'); - modal.css({ - 'margin-top': -35, - 'margin-left': -281 - }); - } - // Submit pin on post click - $('#pin-form-submit').click(function(e) { - e.preventDefault(); - $(this).off('click'); - $(this).addClass('disabled'); - if (editedPin) { - var apiUrl = API_BASE + 'pins/' + editedPin.id + '/?format=json'; - var data = { - description: $('#pin-form-description').val(), - tags: cleanTags($('#pin-form-tags').val()) - }; - var promise = $.ajax({ - type: "patch", - url: apiUrl, - contentType: 'application/json', - data: JSON.stringify(data) - }); - promise.success(function(pin) { - pin.editable = true; - var renderedPin = renderTemplate('#pins-template', { - pins: [ - pin - ] - }); - $('#pins').find('.pin[data-id="'+pin.id+'"]').replaceWith(renderedPin); - tileLayout(); - lightbox(); - dismissModal(modal); - editedPin = null; - }); - promise.error(function() { - message('Problem updating image.', 'alert alert-danger'); - }); - } else { - var data = { - referer: $('#pin-form-referer').val(), - description: $('#pin-form-description').val(), - tags: cleanTags($('#pin-form-tags').val()) - }; - if (uploadedImage) { - data.image_by_id = uploadedImage; - } else { - data.url = $('#pin-form-image-url').val(); - } - var promise = postPinData(data); - promise.success(function(pin) { - if (pinFromUrl) return window.close(); - pin.editable = true; - pin = renderTemplate('#pins-template', {pins: [pin]}); - $('#pins').prepend(pin); - tileLayout(); - lightbox(); - dismissModal(modal); - uploadedImage = false; - }); - promise.error(function() { - message('Problem saving image.', 'alert alert-danger'); - }); - } - }); - $('#pin-form-close').click(function() { - if (pinFromUrl) return window.close(); - dismissModal(modal); - }); - createPinPreviewFromForm(); - } - // End View Functions - - - // Start Init - window.pinForm = function(editPinId) { - editPinId = typeof editPinId !== 'undefined' ? editPinId : null; - createPinForm(editPinId); - } - - if (getUrlParameter('pin-image-url')) { - createPinForm(); - } - // End Init -}); diff --git a/pinry/static/js/pinry.js b/pinry/static/js/pinry.js deleted file mode 100644 index d34d91c..0000000 --- a/pinry/static/js/pinry.js +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Pinry - * Descrip: Core of pinry, loads and tiles pins. - * Authors: Pinry Contributors - * Updated: Apr 5th, 2013 - * Require: jQuery, Pinry JavaScript Helpers - */ - - -$(window).load(function() { - /** - * tileLayout will simply tile/retile the block/pin container when run. This - * was put into a function in order to adjust frequently on screen size - * changes. - */ - window.tileLayout = function() { - var blockContainer = $('#pins'), - blocks = blockContainer.children('.pin'), - blockMargin = 15, - blockWidth = 240, - rowSize = Math.floor(blockContainer.width()/(blockWidth+blockMargin)), - colHeights = [], - rowMargins = [], - marginLeft = 0; - - // Fill our colHeights array with 0 for each row we have - for (var i=0; i < rowSize; i++) colHeights[i] = 0; - // Fill out our rowMargins which will be static after this - for (var i=0; i < rowSize; i++) { - // Our first item has a special margin to keep things centered - if (i == 0) rowMargins[0] = (blockContainer.width()-rowSize*(blockWidth+blockMargin))/2; - else rowMargins[i] = rowMargins[i-1]+(blockWidth+blockMargin); - } - // Loop through every block - for (var b=0; b < blocks.length; b++) { - // Get the jQuery object of the current block - block = blocks.eq(b); - // Position our new pin in the shortest column - var sCol = 0; - for (var i=0; i < rowSize; i++) { - if (colHeights[sCol] > colHeights[i]) sCol = i; - } - block.css({ - 'margin-left': rowMargins[sCol], - 'margin-top': colHeights[sCol], - }); - block.fadeIn(300); - colHeights[sCol] += block.height()+(blockMargin); - } - - // Open add-to-board panel - $('.glyphicon-heart').each(function() { - var thisPin = $(this); - thisPin.off('click'); - thisPin.click(function() { - thisPin.off('click'); - pinForm($(thisPin).data('id')); - }); - }); - - // Edit pin if pencil icon clicked - $('.glyphicon-pencil').each(function() { - var thisPin = $(this); - thisPin.off('click'); - thisPin.click(function() { - thisPin.off('click'); - pinForm(thisPin.data('id')); - }); - }); - - // Delete pin if trash icon clicked - $('.glyphicon-trash').each(function() { - var thisPin = $(this); - thisPin.off('click'); - thisPin.click(function() { - thisPin.off('click'); - var promise = deletePinData(thisPin.data('id')); - promise.success(function() { - thisPin.closest('.pin').remove(); - tileLayout(); - }); - promise.error(function() { - message('Problem deleting image.', 'alert alert-danger'); - }); - }); - }); - - // Show edit-buttons only on mouse over - $('.pin').each(function(){ - var thisPin = $(this); - thisPin.find('.editor').hide(); - thisPin.off('hover'); - thisPin.hover(function() { - thisPin.find('.editor').stop(true, true).fadeIn(300); - }, function() { - thisPin.find('.editor').stop(true, false).fadeOut(300); - }); - }); - - $('.spinner').css('display', 'none'); - blockContainer.css('height', colHeights.sort().slice(-1)[0]); - } - - /** - * On scroll load more pins from the server - */ - window.scrollHandler = function() { - var windowPosition = $(window).scrollTop() + $(window).height(); - var bottom = $(document).height() - 100; - if(windowPosition > bottom) loadPins(); - } - - /** - * Load our pins using the pins template into our UI, be sure to define a - * offset outside the function to keep a running tally of your location. - */ - - function isPinEditable(pinObject) { - return pinObject.submitter.username === currentUser.username - } - - function loadPins() { - // Disable scroll - $(window).off('scroll'); - - // Show our loading symbol - $('.spinner').css('display', 'block'); - - // Fetch our pins from the api using our current offset - var apiUrl = API_BASE + 'pins/?format=json&ordering=-id&limit=50&offset='+String(offset); - if (tagFilter) apiUrl = apiUrl + '&tags__name=' + tagFilter; - if (userFilter) apiUrl = apiUrl + '&submitter__username=' + userFilter; - $.get(apiUrl, function(pins_page) { - // Set which items are editable by the current user - var pins = pins_page.results; - for (var i=0; i < pins.length; i++) { - pins[i].editable = isPinEditable(pins[i]); - pins[i].tags.sort(function (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()); - }); - } - - // Use the fetched pins as our context for our pins template - var template = Handlebars.compile($('#pins-template').html()); - var html = template({pins: pins}); - - // Append the newly compiled data to our container - $('#pins').append(html); - - // We need to then wait for images to load in and then tile - tileLayout(); - lightbox(); - $('#pins').ajaxStop(function() { - $('img').load(function() { - $(this).fadeIn(300); - }); - }); - - if (pins.length < apiLimitPerPage) { - $('.spinner').css('display', 'none'); - if ($('#pins').length !== 0) { - var theEnd = document.createElement('div'); - theEnd.id = 'the-end'; - $(theEnd).html('— End —'); - $(theEnd).css('padding', 50); - $('body').append(theEnd); - } - } else { - $(window).scroll(scrollHandler); - } - }); - - // Up our offset, it's currently defined as 50 in our settings - offset += apiLimitPerPage; - } - - - // Set offset for loadPins and do our initial load - var offset = 0; - loadPins(); - - // If our window gets resized keep the tiles looking clean and in our window - $(window).resize(function() { - tileLayout(); - lightbox(); - }) -}); diff --git a/pinry/static/js/vue/main.js b/pinry/static/js/vue/main.js deleted file mode 100644 index 54cf156..0000000 --- a/pinry/static/js/vue/main.js +++ /dev/null @@ -1,522 +0,0 @@ -var events = new Vue({}); -var eventsName = { - pinReflowDone: "single-pin-reflow-done", - allPinReflowDone: "all-pin-reflow-done", - pinView: { - open: "view-single-pin", - close: "close-pin-view", - }, - pinForm: { - close: "pin_form.close", - open: "pin_form.open", - } -}; - -function fetchPins(offset) { - var apiUrl = API_BASE + 'pins/?format=json&ordering=-id&limit=50&offset=' + String(offset); - if (tagFilter) apiUrl = apiUrl + '&tags__name=' + tagFilter; - if (userFilter) apiUrl = apiUrl + '&submitter__username=' + userFilter; - return axios.get(apiUrl) -} - -var utils = { - getDocumentHeight: function () { - var body = document.body, - html = document.documentElement; - return Math.max( - body.scrollHeight, body.offsetHeight, - html.clientHeight, html.scrollHeight, - html.offsetHeight, - ); - }, - getWindowHeight: function () { - return window.innerHeight - } -}; - -function EventCounter(countEvent, triggerEvent, triggerTimes) { - - var self = { - id: new Date().getTime(), - count: 0, - targetCount: triggerTimes, - triggerEvent: countEvent, - countEvent: countEvent, - }; - events.$on( - countEvent, - function () { - self.count += 1; - if (self.count >= self.targetCount) { - events.$emit(triggerEvent) - } - } - ); - self.resetAfterReflow = function (targetCount) { - self.count = 0; - self.targetCount = targetCount; - }; - self.reset = function (targetCount) { - self.targetCount = targetCount; - }; - - return self; -} - - -function HeightTable(blockMargin) { - var self = { - data: {} - }; - - function get(obj, index) { - if (!obj.data.hasOwnProperty(index)) { - return null - } - return obj.data[index]; - } - - function set(obj, index, value) { - if (!obj.data.hasOwnProperty(index)) { - obj.data[index] = value - } - return obj.data[index]; - } - - function getHeightOffset(obj, indexOfElement, rowSize) { - var height = 0; - for (var index = rowSize - 1; index < indexOfElement; index += rowSize) { - var value = obj.get(index); - if (value === null) { - console.log("Error occurs while loading elements's height offset"); - return null - } - height += (value + blockMargin); - } - return height - } - - self.get = function (index) { - return get(self, index); - }; - - self.set = function (index, value) { - return set(self, index, value) - }; - self.getHeightOffset = function (index, rowSize) { - return getHeightOffset(self, index, rowSize); - }; - self.getMaxHeight = function (rowSize, blockMargin) { - var size = Object.keys(self.data).length; - var heightArray = []; - for (var column = 0; column < rowSize; column++) { - heightArray.push(0); - } - for (var index = 0; index < size; index++) { - var column = index % rowSize; - heightArray[column] = heightArray[column] + self.get(index) + blockMargin; - } - return Math.max(...heightArray); - }; - return self; -} - -Vue.component( - 'pin-form', - { - data: function () { - return {}; - }, - props: ['url', 'show'], - template: "#pin-form-template", - mounted: function () { - this.initilize(); - events.$on( - eventsName.pinForm.open, - this.showModal, - ) - }, - methods: { - getModal: function () { - return $('#pin-form'); - }, - initilize: function () { - $('#pin-form-image-upload').dropzone( - { - url: API_BASE + "images/", - paramName: 'image', - parallelUploads: 1, - uploadMultiple: false, - maxFiles: 1, - acceptedFiles: 'image/*', - headers: { - 'X-CSRFToken': getCSRFToken(), - }, - success: function (file, resp) { - var image_url = $('#pin-form-image-url'); - image_url.parent().fadeOut(300); - uploadedImage = resp.id; - image_url.val(resp.thumbnail.image); - // createPinPreviewFromForm(); - }, - error: function (error) { - message('Problem uploading image.', 'alert alert-error'); - }, - }, - ); - }, - showModal: function () { - var modal = this.getModal(); - modal.show(); - }, - hideModal: function () { - var modal = this.getModal(); - modal.hide(); - }, - } - } -); - - -Vue.component( - 'light-box', - { - data: function () { - return { - backgroundStyle: null, - lightBoxWrapperStyle: null, - lightBoxImageWrapperStyle: null, - } - }, - props: ['pin'], - template: "#lightbox-template", - mounted: function () { - var documentHeight = utils.getDocumentHeight(); - var imageWidth = this.pin.image.standard.width; - var imageHeight = this.pin.image.standard.height; - var windowHeight = utils.getWindowHeight(); - var backgroundHeight = documentHeight; - var lightBoxWrapperStyle = { - 'width': imageWidth + "px", - 'marginTop': '80px', - 'marginBottom': '80px', - 'margin-left': -imageWidth / 2 + "px", - }; - var wrapper = this.$el.querySelector(".lightbox-wrapper"); - - if (wrapper.getBoundingClientRect().height + 140 > windowHeight) { - var wrapperHeight = wrapper.getBoundingClientRect().height; - backgroundHeight = wrapperHeight + 160; - } - this.backgroundStyle = { - height: backgroundHeight + 'px', - }; - this.lightBoxImageWrapperStyle = { - height: imageHeight + 'px', - }; - this.lightBoxWrapperStyle = lightBoxWrapperStyle; - }, - methods: { - onCloseView: function () { - events.$emit(eventsName.pinView.close); - } - } - } -); - - -Vue.component('pin', { - data: function () { - return { - 'loaded': false, - 'editable': true, - 'active': false, - 'imageStyle': null, - 'pinStyle': null, - 'height': null, - 'heightOffset': null, - } - }, - props: ['pin', 'args', 'index', 'heightTable'], - template: '#pin-template', - created: function () { - var self = this; - events.$on("reflow", function () { - self.reflow(); - }); - }, - mounted: function () { - this.reflow(); - this.$emit("rendered", {index: this.index, height: this.height}); - }, - updated: function () { - events.$emit(eventsName.pinReflowDone); - }, - methods: { - showImageDetail: function (event) { - events.$emit(eventsName.pinView.open, this.pin); - if (event) event.preventDefault(); - }, - reflow: function () { - this.heightOffset = this.heightTable.getHeightOffset(this.index, this.args.rowSize); - this.imageStyle = this.getImageStyle(); - this.pinStyle = this.getPinStyle(); - this.height = this.getTextHeight() + this.pin.image.thumbnail.height; - }, - getImageStyle: function () { - return { - width: this.pin.image.thumbnail.width + 'px', - height: this.pin.image.thumbnail.height + 'px', - } - }, - getPinStyle: function () { - var self = this; - var marginTop = self.heightOffset; - var marginLeft = 0; - - function isFirstOne(rowSize, index) { - index = index + 1; - if ((index % rowSize) === 1) { - return true; - } - } - - function getRowNumber(rowSize, index) { - index = index + 1; - var rowNumber = Math.floor(index % rowSize); - if (rowNumber === 0) { - return rowSize; - } - return rowNumber; - } - - if (isFirstOne(self.args.rowSize, self.index)) { - marginLeft = self.args.rowStartMargin; - } else { - var marginPerBlock = self.args.blockWidth + self.args.blockMargin; - var rowNumber = getRowNumber(self.args.rowSize, self.index); - marginLeft = self.args.rowStartMargin + marginPerBlock * (rowNumber - 1); - } - return { - 'margin-left': marginLeft + 'px', - 'margin-top': marginTop + 'px', - }; - }, - onImageLoad: function () { - this.loaded = true; - }, - getAvatar: function () { - return "//gravatar.com/avatar/" + this.pin.submitter.gravatar; - }, - getUserLink: function () { - return "/pins/users/" + this.pin.submitter.username + "/" - }, - getTagLink: function (tag) { - return "/pins/tags/" + tag + "/" - }, - getTextHeight: function () { - var element = this.$el.querySelector(".pin-description"); - return element.getBoundingClientRect().height; - }, - } -}); - - -Vue.component('pin-container', { - data: function () { - return { - args: { - "containerWidth": 0, - "blockWidth": 240, - "blockMargin": 15, - "rowSize": 0, - "rowStartMargin": 0, - "rowEndMargin": 0, - }, - "pins": [], - "heightTable": [], - "counter": null, - "containerStyle": null, - status: { - loading: true, - hasNext: true, - offset: 0, - }, - }; - }, - template: "#pin-container-template", - created: function () { - this.heightTable = HeightTable(this.args.blockMargin); - this.loadMore(); - var self = this; - window.addEventListener("optimizedResize", function () { - self.reflow(); - }); - self.bindScrollHandler(); - self.counter = EventCounter( - eventsName.pinReflowDone, - eventsName.allPinReflowDone, - self.pins.length, - ); - events.$on(eventsName.allPinReflowDone, this.updateContainerStyle); - }, - mounted: function () { - this.reflow(); - }, - methods: { - updateContainerStyle: function () { - var height = this.heightTable.getMaxHeight( - this.args.rowSize, - this.args.blockMargin, - ); - this.containerStyle = { - height: height + "px", - }; - }, - loadMore() { - var self = this; - self.markAsLoading(); - fetchPins(self.status.offset).then( - function (res) { - var newPins = self.pins.concat(res.data.results); - self.counter.reset(newPins.length); - self.pins = newPins; - self.status.offset += res.data.results.length; - if (res.data.next === null) { - self.markAsLoaded(false); - } else { - self.markAsLoaded(true); - } - }, - ); - }, - markAsLoaded: function (hasNext) { - this.status.hasNext = hasNext; - this.status.loading = false; - this.$emit( - "loaded", - ); - if (!hasNext) { - this.$emit("no-more-pins") - } - }, - markAsLoading: function () { - this.status.loading = true; - this.$emit( - "loading", - ); - }, - bindScrollHandler: function () { - var self = this; - - scrollHandler = function () { - if (self.status.loading || !self.status.hasNext) { - return - } - var windowPosition = getDocumentScrollTop() + window.innerHeight; - var bottom = utils.getDocumentHeight() - 100; - if (windowPosition > bottom) { - self.loadMore(); - } - }; - window.addEventListener('scroll', function (e) { - scrollHandler(); - } - ); - }, - updateChildHeight: function (childArg) { - this.heightTable.set(childArg.index, childArg.height); - }, - reflow: function () { - this.counter.resetAfterReflow(self.pins.length); - this.updateArguments(); - events.$emit("reflow"); - }, - updateArguments: function () { - var blockContainer = this.$el; - var containerWidth = blockContainer.clientWidth; - var blockMargin = this.args.blockMargin, - blockWidth = this.args.blockWidth, - rowSize = Math.floor(containerWidth / (blockWidth + blockMargin)); - var rowStartMargin = (containerWidth - rowSize * (blockWidth + blockMargin)) / 2; - var rowEndMargin = rowStartMargin - blockMargin; - - this.args.containerWidth = containerWidth; - this.args.blockWidth = blockWidth; - this.args.blockMargin = blockMargin; - this.args.rowSize = rowSize; - this.args.rowStartMargin = rowStartMargin; - this.args.rowEndMargin = rowEndMargin; - }, - }, -}); - -(function () { - var previousResize = 0; - var throttle = function (type, name, obj) { - obj = obj || window; - var running = false; - var func = function () { - if (running) { - return; - } - var now = new Date().getTime(); - if ((now - previousResize) < 200) { - return - } - previousResize = now; - running = true; - requestAnimationFrame(function () { - obj.dispatchEvent(new CustomEvent(name)); - running = false; - }); - }; - obj.addEventListener(type, func); - }; - - throttle("resize", "optimizedResize"); -})(); - - -var app = new Vue({ - el: '#app', - data() { - return { - loading: true, - noMore: false, - currentPin: null, - } - }, - created: function () { - events.$on( - eventsName.pinView.open, - this.onViewPin, - ); - events.$on( - eventsName.pinView.close, - this.onClosePin, - ); - }, - methods: { - showPinForm: function () { - events.$emit( - eventsName.pinForm.open, - ) - }, - onViewPin: function (pin) { - this.currentPin = pin; - }, - onClosePin: function (pin) { - this.currentPin = null; - }, - onLoaded: function () { - this.loading = false; - }, - onLoading: function () { - this.loading = true; - }, - onNoMore: function () { - this.noMore = true; - } - }, -}); diff --git a/pinry/templates/404.html b/pinry/templates/404.html deleted file mode 100644 index 060bcdd..0000000 --- a/pinry/templates/404.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} - -{% block title %}404{% endblock %} - -{% block yield %} -
-
-
-

404

-

This page does not exist.

-
-
-
-{% endblock %} diff --git a/pinry/templates/500.html b/pinry/templates/500.html deleted file mode 100644 index 5c4e77f..0000000 --- a/pinry/templates/500.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} - -{% block title %}500{% endblock %} - -{% block yield %} -
-
-
-

500

-

Something went wrong! If you figure out what it was please - submit an issue on Pinry's - GitHub Issue's page.

-
-
-
-{% endblock %} diff --git a/pinry/templates/base.html b/pinry/templates/base.html deleted file mode 100644 index 9f4d532..0000000 --- a/pinry/templates/base.html +++ /dev/null @@ -1,120 +0,0 @@ - -{% load staticfiles compress %} - - - - - {% block title %}Pinry{% endblock %} - - - - - - {% compress css %} - - - - - {% endcompress %} - {% compress css inline %} - {% block extra_css %}{% endblock %} - {% endcompress %} - - - - - - - - -
- - - - - -
    - - - -
    - -
    - - - - {% block yield %}{% endblock %} - -
    - -{% include 'includes/vue-pin.html' %} -{% include 'includes/lightbox-vue.html' %} -{% include 'includes/pin_form-vue.html' %} -{% block extra_templates %}{% endblock %} - - - - - - - - -{% compress js %} - - -{% endcompress %} -{% compress js inline %} - {% block extra_js %}{% endblock %} -{% endcompress %} - - - diff --git a/pinry/templates/core/pin_form.html b/pinry/templates/core/pin_form.html deleted file mode 100644 index b4af1e5..0000000 --- a/pinry/templates/core/pin_form.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Pin Form{% endblock %} - -{% block yield %} -
    -{% endblock %} diff --git a/pinry/templates/core/pins.html b/pinry/templates/core/pins.html deleted file mode 100644 index 1b6c708..0000000 --- a/pinry/templates/core/pins.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block yield %} - - -
    - - - - - -{% endblock %} diff --git a/pinry/templates/includes/bookmarklet_link.html b/pinry/templates/includes/bookmarklet_link.html deleted file mode 100644 index 6c6848b..0000000 --- a/pinry/templates/includes/bookmarklet_link.html +++ /dev/null @@ -1,8 +0,0 @@ - - Bookmarklet - diff --git a/pinry/templates/includes/field.html b/pinry/templates/includes/field.html deleted file mode 100644 index 9d39b41..0000000 --- a/pinry/templates/includes/field.html +++ /dev/null @@ -1,14 +0,0 @@ -{% load bootstrap_field %} - -
    - {{ field|bootstrap_field:"form-control input-lg" }} - {% if field.errors %} - - {% if field.errors %} - {% for error in field.errors %} - {{ error|escape }} - {% endfor %} - {% endif %} - - {% endif %} -
    diff --git a/pinry/templates/includes/lightbox-vue.html b/pinry/templates/includes/lightbox-vue.html deleted file mode 100644 index 127fab0..0000000 --- a/pinry/templates/includes/lightbox-vue.html +++ /dev/null @@ -1,39 +0,0 @@ -{% verbatim %} - -{% endverbatim %} diff --git a/pinry/templates/includes/messages.html b/pinry/templates/includes/messages.html deleted file mode 100644 index bace833..0000000 --- a/pinry/templates/includes/messages.html +++ /dev/null @@ -1,5 +0,0 @@ -{% verbatim %} - -{% endverbatim %} diff --git a/pinry/templates/includes/pin_form-vue.html b/pinry/templates/includes/pin_form-vue.html deleted file mode 100644 index 7e68030..0000000 --- a/pinry/templates/includes/pin_form-vue.html +++ /dev/null @@ -1,42 +0,0 @@ -{% verbatim %} - -{% endverbatim %} diff --git a/pinry/templates/includes/pin_form.html b/pinry/templates/includes/pin_form.html deleted file mode 100644 index bd86fd6..0000000 --- a/pinry/templates/includes/pin_form.html +++ /dev/null @@ -1,45 +0,0 @@ -{% verbatim %} - -{% endverbatim %} diff --git a/pinry/templates/includes/vue-pin.html b/pinry/templates/includes/vue-pin.html deleted file mode 100644 index 7fd2c45..0000000 --- a/pinry/templates/includes/vue-pin.html +++ /dev/null @@ -1,66 +0,0 @@ -{% verbatim %} - - - - -{% endverbatim %} diff --git a/pinry/templates/users/login.html b/pinry/templates/users/login.html deleted file mode 100644 index d5eb514..0000000 --- a/pinry/templates/users/login.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Login{% endblock %} - -{% block yield %} -
    -
    -
    -

    Login

    -

    We've missed you! Check out what's new.

    -
    - {% csrf_token %} - {% for field in form %} - {% include "includes/field.html" %} - {% endfor %} - -
    -
    -
    -
    -{% endblock %} diff --git a/pinry/templates/users/private.html b/pinry/templates/users/private.html deleted file mode 100644 index fb6eb32..0000000 --- a/pinry/templates/users/private.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Private{% endblock %} - -{% block yield %} -
    -
    -
    -

    Private

    -

    This website is set to private. You need to login before you - can view any content.

    -
    -
    -
    -{% endblock %} diff --git a/pinry/templates/users/register.html b/pinry/templates/users/register.html deleted file mode 100644 index 9eb2dec..0000000 --- a/pinry/templates/users/register.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Register{% endblock %} - -{% block yield %} -
    -
    -
    -

    Join Us

    -

    And start pinning what your interests are.

    -
    - {% csrf_token %} - {% for field in form %} - {% include "includes/field.html" %} - {% endfor %} - -
    -
    -
    -
    -{% endblock %} diff --git a/pinry/urls.py b/pinry/urls.py index e7054ed..aae9654 100644 --- a/pinry/urls.py +++ b/pinry/urls.py @@ -19,7 +19,6 @@ urlpatterns = [ # old api and views url(r'^admin/', include(admin.site.urls)), - url(r'', include('core.urls', namespace='core')), url(r'^api/v2/profile/', include('users.urls', namespace='users')), ]