Beispiel #1
0
def migrate(request, email, application_name):
    """ Run the migrate command. """
    raw_args = request.POST.get('args', '')
    logging.info('[MIGRATE] got args: %s' % raw_args)
    try:
        args = json.loads(raw_args)
    except:
        args = []
    try:
        return HttpResponse(command(application_name, 'migrate', *args))
    except Exception, e:
        return HttpResponseServerError('Error: %s.' % e)
Beispiel #2
0
def migrate(request, email, application_name):
    """ Run the migrate command. """
    raw_args = request.POST.get("args", "")
    logging.info("[MIGRATE] got args: %s" % raw_args)
    try:
        args = json.loads(raw_args)
    except:
        args = []
    try:
        return HttpResponse(command(application_name, "migrate", *args))
    except Exception, e:
        return HttpResponseServerError("Error: %s." % e)
Beispiel #3
0
def createsuperuser(request, email, application_name):
    """ Run the createsuperuser command. """
    try:
        return HttpResponse(command(application_name, 'createsuperuser'))
    except Exception, e:
        return HttpResponseServerError('Error: %s.' % e)
Beispiel #4
0
def syncdb(request, email, application_name):
    """ Run the syncdb command. """
    try:
        return HttpResponse(command(application_name, 'syncdb', '--noinput'))
    except Exception, e:
        return HttpResponseServerError('Error: %s.' % e)
Beispiel #5
0
def createsuperuser(request, email, application_name):
    """ Run the createsuperuser command. """
    try:
        return HttpResponse(command(application_name, "createsuperuser"))
    except Exception, e:
        return HttpResponseServerError("Error: %s." % e)
Beispiel #6
0
def syncdb(request, email, application_name):
    """ Run the syncdb command. """
    try:
        return HttpResponse(command(application_name, "syncdb", "--noinput"))
    except Exception, e:
        return HttpResponseServerError("Error: %s." % e)