Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


About storfront/get_started and api server #5

prim opened this Issue · 6 comments

2 participants

#url(r'^get-started/$', 'storefront.views.get_started', name='get_started'),
          <form id="signup">
            <div class="form_sec">
              <div class="input_bg">
                <label><span class="none">&nbsp;</span>
                <input type="text" emptyvalue="Email" class="empty" name="" id="email" />
              <input type="submit" value="SIGN UP" class="signup"/>
              <span class="none">&nbsp;</span> </label>
              <div id="email_error"></div>
  if request.is_ajax() and request.method == 'POST':
  • It seem need AJAX, but I cant find any js file or js code will this AJAX request.

  • I am a web newbie, not familiar with Django. If I ask stupid question, sorry.
    Thanks for your reply.

if request.method == 'POST':
<input type="text" emptyvalue="Email" class="empty" name="email" id="email" />
  • Change some email address in code, create a account now... :)
from lib.indextank.client import ApiClient, IndexAlreadyExists, TooManyIndexes, InvalidDefinition, InvalidQuery
  • I change all "lib.indextank.client" to "indextank.client", I have setup the python client, Do I did it right?
  • Here are so many "" write in code, so I use dnsmasq to make "" point to my machine.
  • Run api server on port 80
  • But still cant run REST api server in the right way. When I try to create a index on page "", api server always give me useless trackback, can find out where go wrong.

  • Here is the account info:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/django/core/servers/", line 280, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/lib/pymodules/python2.6/django/core/servers/", line 674, in __call__
    return self.application(environ, start_response)
  File "/usr/lib/pymodules/python2.6/django/core/handlers/", line 241, in __call__
    response = self.get_response(request)
  File "/usr/lib/pymodules/python2.6/django/core/handlers/", line 130, in get_response
    return self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/lib/pymodules/python2.6/django/core/handlers/", line 180, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/usr/lib/pymodules/python2.6/django/views/", line 23, in server_error
    t = loader.get_template(template_name) # You need to create a 500.html template.
  File "/usr/lib/pymodules/python2.6/django/template/", line 157, in get_template
    template, origin = find_template(template_name)
  File "/usr/lib/pymodules/python2.6/django/template/", line 138, in find_template
    raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html
[10/Jan/2012 14:48:02] "GET HTTP/1.1" 500 1273

I just added the missing js back. We removed it when we disabled new signups on, and forgot to enable it back.

The commit with the change is 8909646


Er, how to handle the api server 500? It seems always get a uncaught exception.


mmm that looks like:

  • you are getting an error while creating the index
  • there's no template for status 500 to render that error

Is that the only error you get on the API log ? Don't you get an error before that? Maybe on /data/logs/apierrors.log ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.