0.0.26
route сreate
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
from django.urls import path
|
||||
# from AuthApp.js_views import *
|
||||
# from AuthApp.import_funcs import *
|
||||
from AuthApp.js_views import *
|
||||
from .js_views import *
|
||||
from django.contrib.auth import views
|
||||
from RoutesApp.js_views import new_route_view_ajax
|
||||
|
||||
urlpatterns = [
|
||||
path('registration/', registration_ajax, name='registration_ajax'),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
from uuid import uuid1
|
||||
from AuthApp.models import *
|
||||
from .models import *
|
||||
from django.contrib import auth
|
||||
from django.http import HttpResponse, Http404, JsonResponse
|
||||
from django.template import loader, RequestContext
|
||||
@@ -24,17 +24,7 @@ def my_routes_ajax(request):
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
|
||||
|
||||
def new_route_view_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
from RoutesApp.forms import RegistrationForm
|
||||
Dict = {
|
||||
'form': RegistrationForm()
|
||||
}
|
||||
|
||||
html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request)
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
|
||||
|
||||
def login_ajax(request):
|
||||
|
||||
Reference in New Issue
Block a user