Selaa lähdekoodia

Fix: Fix context name-conflicts for user-page

pull/139/head
winkidney 5 vuotta sitten
vanhempi
commit
a5a876b1aa
3 muutettua tiedostoa jossa 2 lisäystä ja 4 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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>


Ladataan…
Peruuta
Tallenna