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