Browse Source

Fix: Fix context name-conflicts for user-page

pull/139/head
winkidney 5 years ago
parent
commit
a5a876b1aa
3 changed files with 2 additions and 4 deletions
  1. +1
    -1
      core/urls.py
  2. +0
    -2
      pinry/static/js/pin-form.js
  3. +1
    -1
      pinry/templates/base.html

+ 1
- 1
core/urls.py View File

@@ -7,7 +7,7 @@ urlpatterns = [
name='pin-form'),
url(r'^pins/tags/(?P<tag>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
name='tag-pins'),
url(r'^pins/users/(?P<user>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
url(r'^pins/users/(?P<username>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
name='user-pins'),
url(r'^(?P<pin>[0-9]+)/$', TemplateView.as_view(template_name='core/pins.html'),
name='pin-detail'),


+ 0
- 2
pinry/static/js/pin-form.js View File

@@ -15,7 +15,6 @@ $(window).load(function() {
// Start Helper Functions
function getFormData() {
return {
submitter: currentUser,
url: $('#pin-form-image-url').val(),
referer: $('#pin-form-referer').val(),
description: $('#pin-form-description').val(),
@@ -25,7 +24,6 @@ $(window).load(function() {

function createPinPreviewFromForm() {
var context = {pins: [{
submitter: currentUser,
image: {thumbnail: {image: $('#pin-form-image-url').val()}},
referer: $('#pin-form-referer').val(),
description: $('#pin-form-description').val(),


+ 1
- 1
pinry/templates/base.html View File

@@ -36,7 +36,7 @@
},
pinFilter = "{{ request.resolver_match.kwargs.pin }}",
tagFilter = "{{ request.resolver_match.kwargs.tag }}",
userFilter = "{{ request.resolver_match.kwargs.user }}";
userFilter = "{{ request.resolver_match.kwargs.username }}";
</script>
<!-- End JavaScript Variables -->
</head>


Loading…
Cancel
Save