Note that there are some explanatory texts on larger screens.

plurals
  1. POwindow.location is not woking
    text
    copied!<p>I'm using jQuery with Django in server-side. What I'm trying to do is to get some text from the user through the form and simultaneously displaying the text in the canvas area like about.me and flavors.me does. Then the user drag the text in the canvas area to the desired position and when they click the next button,the data must be stored in the database and redirect to the homepage. Everything is working perfect(the datas are stored in the database) except when I click the button which I set window.location to <code>"http://127.0.0.1:8000".</code> But I'm not getting to that page when I click the button.</p> <p>I'm getting some errors in Django server:</p> <pre><code>error: [Errno 32] Broken pipe ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 51161) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock </code></pre> <p>Here is my html: <a href="https://gist.github.com/2359541" rel="nofollow">https://gist.github.com/2359541</a></p> <p>Django views.py:</p> <p>from cover.models import CoverModel from django.http import HttpResponseRedirect</p> <pre><code>def coverview(request): if request.is_ajax(): t = request.POST.get('top') l = request.POST.get('left') n = request.POST.get('name') h = request.POST.get('headline') try: g = CoverModel.objects.get(user=request.user) except CoverModel.DoesNotExist: co = CoverModel(top=t, left=l, name=n, headline=h) co.user = request.user co.save() else: g.top = t g.left = l g.name = n g.headline = h g.save() return HttpResponseRedirect("/") </code></pre> <p>urls.py:</p> <pre><code>url(r'^cover/check/$', 'cover.views.coverview'), url(r'^cover/$', login_required(direct_to_template), {'template': 'cover.html'}), </code></pre> <p>Could anyone help me?</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload