Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
django model column not appearing in postgre db on AWS
I have deployed a django app on heroku and I have connected postgre db on AWS. I have a Article model and columns like author, tile, Slug are all appearing in Postgre db except for the likes. It is appearing in the sqlite3 though. I added the Likes field recently and ran the makemigrations and migrate commands. But i am still facing the issue. migrations file # Generated by Django 3.0.5 on 2020-05-26 17:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Article', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=50)), ('slug', models.SlugField()), ('body', models.TextField()), ('date', models.DateTimeField(auto_now_add=True)), ('thumbnail', models.ImageField(upload_to='profile_pics')), ('author', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ('likes', models.ManyToManyField(related_name='article_like', to=settings.AUTH_USER_MODEL)), ], ), ] models.py from django.db import models from django.contrib.auth.models import User # Create your models here. class Article(models.Model): author = models.ForeignKey(User, default=None, on_delete=models.CASCADE) title = models.CharField(max_length=50) slug = models.SlugField() body = models.TextField() date = models.DateTimeField(auto_now_add=True) thumbnail = models.ImageField(blank=False, upload_to='profile_pics') likes = models.ManyToManyField(User, blank=False, related_name='article_like') def __str__(self): return self.title def __repr__(self): return self.title def snippet(self): return self.body[:50]+'...' def getslug(self): bad_chars = [';', ':', '!', '*', '$','&','^','#','(','-',')'] for char in bad_chars: if char in self.title: title = self.title.replace(char, … -
How to fix SMTPAuthenticationError in Django
I am trying to send a mail to a user to activate their account when they register. I used the send_mail function in Django and Google stmp. Here is my settings.py EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'sm******e@gmail.com' EMAIL_HOST_PASSWORD = '*******' EMAIL_PORT = 587 EMAIL_USE_TLS = True I have turned on access for less secured apps and unlockedcaptcha. I have read a number of things none seems to be working. I have also tried changing the order of arrangement of the piece of code above. Nothing is working. I keep getting this error and other variants (534, b'5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv\n5.7.14 lY_yuZp3YjByqaX8J_3Ixrd9McIpBdalv5CzBicW4GI6_NxwD5J78C5qu4p1i1d4_CZak\n5.7.14 I7sN3nAcOy4bQa2gJw_8migeiV5qTHdLVtRIYGLr4OTQuHijuaraS4gOwlv8EqhG>\n5.7.14 Please log in via your web browser and then try again.\n5.7.14 Learn more at\n5.7.14 https://support.google.com/mail/answer/78754 qo21sm499096ejb.105 - gsmtp') The link in the error is no longer available. Somebody should help please. Finally, here is the code to my views.py def register(request): if request.method == 'POST': first_name = request.POST['first_name'] last_name = request.POST['last_name'] username = request.POST['username'] email = request.POST['email'] password = request.POST['password'] password2 = request.POST['password'] if password == password2: if User.objects.filter(username=username).exists(): messages.error(request, 'username already exists') return redirect('register') else: user = User.objects.create_user(first_name=first_name, last_name = last_name, username=username, email=email, password=password) user.save() id=user.id subject = 'Welcome to LifeStream' message= '"Hi!\nHow … -
"AttributeError: 'NoneType' object has no attribute 'session' " when override SignupForm in django allauth app
I tried to implement django allauth app with SignupForm override, my code almost works when entering data into the signup form and saves users, but after save, I redirected to a new page that showed me 'NoneType' object has no attribute 'session' AttributeError. urls.py from django.urls import path from .views import login, logout, AllauthSignUpView app_name = 'register' urlpatterns = [ path('login/', login, name='login'), path('signup/', AllauthSignUpView.as_view(), name='signup'), path('logout/', logout, name='logout'), ] views.py override SignupView As follows as: from django.shortcuts import render, HttpResponseRedirect from .form import AllauthLoginForm, AllauthSignUpForm from allauth.account.views import SignupView from django.urls import reverse_lazy class AllauthSignUpView(SignupView): template_name = 'register/signup.html' form_class = AllauthSignUpForm success_url = reverse_lazy('core:home') #Redirect to home.html def form_valid(self, form): # This method is called when valid form data has been POSTed. if form.is_valid(): form.save() form.clean() return HttpResponseRedirect('core:home') #Redirect to home.html # It should return an HttpResponse. return super().form_valid(form) def get_context_data(self, **kwargs): context = super(AllauthSignUpView, self).get_context_data(**kwargs) signUpForm = AllauthSignUpForm(self.request.POST or None) context['form'] = signUpForm return context form.py override SignupForm As follows as: from allauth.account.forms import LoginForm, SignupForm from django import forms class AllauthSignUpForm(SignupForm): def __init__(self, *args, **kwargs): super(AllauthSignUpForm, self).__init__(*args, **kwargs) self.fields['username'] = forms.CharField( label='', widget=forms.TextInput( attrs={ 'class': 'signup_name_inp text-right mb-4 border-top-0 border-right-0 border-left-0', 'placeholder': 'نام کاربری', 'dir': 'rtl', } … -
Using django rest framework, how do I use pagination only when the page parameter is supplied?
I am using django rest framework for my project. I don't currently have pagination setup for my models and would like to keep using it like that, while at the same time use pagination when a special parameter (like "api/endpoint/?page=1") is supplied. Is there a way I could achieve that? -
Adding categories to a Django products page
I'm looking to add a categories option into my product page. I've got the categories listed within my product models, but I'm stuck on what I would need to add in order to create a category selection on my product page. The main thing I want to find out is what would I add for the urls on each category? I'm just curious if anyone could share some knowledge on when they have added category options into their Django websites? FYI, here is my Product model with the categories above it. CATEGORY_CHOICES = ( ('Website Development', 'Website Development'), ('Social Media Management', 'Social Media Management'), ('Website Traffic', 'Website Traffic Increase'), ) class Product(models.Model): name = models.CharField(max_length=38, default='') category = models.CharField(choices=CATEGORY_CHOICES, max_length=25, default='') description = models.TextField() price = models.DecimalField(max_digits=6, decimal_places=2) image = models.ImageField(upload_to='images') tags = models.ManyToManyField(Tag) def __str__(self): return self.name -
How to download music file into users' directory in hosted website?
I'm using Python (Django) with the youtube_dl library to allow users download youtube videos into their local directory. The code runs fine in local host (downloads into my directory) but when I test it in Heroku, nothing happens. No files in the download directory. Please help? Here is my views.py. def home_page_view(request): file = None video_url = '' if request.method == "POST": form = DownloadForm(request.POST) if form.is_valid(): url = form.cleaned_data.get('link') music_download(url) else: form = DownloadForm() context = { 'file': video_url, 'form': form, } return render(request, 'audio_download/home.html', context) class MyLogger(object): def debug(self, msg): pass def warning(self, msg): pass def error(self, msg): print(msg) def my_hook(d): if d['status'] == 'finished': print('Done downloading, now converting ...') def music_download(url): homedir = os.path.expanduser("~") ydl_opts = { 'format': 'bestaudio/best', 'outtmpl': homedir + '/Downloads/%(title)s-%(id)s.%(ext)s', 'postprocessors': [{ 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality': '192', }], 'logger': MyLogger(), 'progress_hooks': [my_hook], } with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download([url]) -
How to allow more than one image upload on django?
Currently I have a pictures model, that allows an image upload per class product (Foreign key). However I would like to upload more than one image per product Below shows my models.py for Class picture. def get_image_filename(instance,filename): id = instance.product.id return "picture_image/%s" % (id) def path_and_rename(instance, filename): upload_to = 'images' ext = filename.split('.'[-1]) if instance.pk: filename = '{}.{}'.format(instance.pk, ext) else: filename = '{}.{}'.format(uuid4().hex, ext) return os.path.join(upload_to, filename) class Picture(models.Model): product_pic = models.ImageField(null=True, blank=True,upload_to=path_and_rename) product = models.ForeignKey(Product, null=True, on_delete=models.SET_NULL ) date_created = models.DateTimeField(auto_now_add=True, null=True) How does one allow more than one image upload on django? -
Django 3 and django-select2
I am curious, since there is select2 implementation in Django admin using autocomplete_fields, why it is not also available outside of admin to my apps? I am using django-select2 but keep wondering myself am I doing this wrong and cant find any answers around. -
I am loading the i18n but still gives me error when I run the server
So I am using i18n tag and it works very well in all pages... I made a new app and added a template to it and I used {% trans '' %} to translate the strings but it gives me error when I submit a form in the page Can anyone tell me what can be the problem? -
How to Search the customer (customer aadhar field) in customer_billings table as foreign key and we want to save the other fields in data
I have the 2 tables like the customer and customer_billing table, How to filter the customer aadhar number and get the details in the customer table and I want to save the other fields in customer_billing in the database, Request to please help in this issue class customer(models.Model): customer_Firstname = models.CharField(max_length = 20, null=True ) customer_Fathername = models.CharField(max_length = 20, null=True) customer_Aadharnumber = models.CharField(max_length = 12, unique=True) customer_contact_no = models.CharField(max_length = 20, null=True) customer_address = models.CharField(max_length = 50, null=True) customer_advance = models.CharField(max_length = 50, blank=True) customer_created = models.DateTimeField(null=True,auto_now_add=True) class Customer_Billing(models.Model): vehicle_number = models.CharField(max_length = 12, null=True) customer = models.ForeignKey(customer,on_delete = models.SET_NULL, null=True) vehicle = models.ForeignKey(vehicle,on_delete = models.SET_NULL, null=True) product_current_price = models.ForeignKey(product_current_price,on_delete = models.SET_NULL, null=True) load = models.CharField(max_length = 20, null=True) empty = models.CharField(max_length = 20, null=True) Acurate_Mango_Weight = models.CharField(max_length = 20, null=True) mango_suite = models.CharField(max_length = 20, null=True) Final_price = models.DecimalField(max_digits=1000, decimal_places=2) -
Django change registration username max_length
in the file 0008_alter_user_username_max_length.py, as a migration, the output text for the registration template is shown, along with the max length setting for the username. Altering this file and then pushing the migration, however, does not work. What have I done, and how may I change the username max_length and help_text? -
image upload in Django with forms
I have been facing a issue while uploading a image in my Django app. When i upload images from "admin" panel the images are uploaded and visible in browser as expected. But while uploading from template forms, it picks up the default image and not the one i try to upload. Please help me out here, what needs to change here. Here is my code: settings.py STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR,'static') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR,'media') urls.py urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) template.html <img class="rounded" src="{{post.pic.url}}" style="width: 500px; height: 500px; float: left; margin-right: 15px; margin-bottom: 10px;"/> Let me know where am I missing any point or any configuration? -
im going through a django tutorial im stuck at a place.where my error is OperationalError at / no such table: django_session
im trying to make a form im stuck at place the error is opertionalerror .. and many comments was like they told me too migrate ...even if i migrate im getting a error there my error is my code part is: -
How to define a correctly .create() method for Django-Rest-Framework with mongoengine in nested serializers
I am sending an API post request with the following in the request body to be serialized as the EventSerializer document with owners persisted as a list of embedded documents: { "name": "string", "name_english": "string", "starts_on": "2020-05-21T18:46:05.049Z", "ends_on": "2020-05-21T18:46:05.049Z", "local": "string", "description": "string", "owners": [ { "first_name": "string", "last_name": "string", "email": "user@example.com", "id": "5ec6dd64d581f76fbfad60eb" } ] } models.py: class UserRef(EmbeddedDocument): id = fields.ReferenceField(User, required=True) first_name = fields.StringField(max_length=255, required=True) last_name = fields.StringField(max_length=255, required=True) email = fields.EmailField(max_length=255, required=True) class Event(Document): name = fields.StringField(max_length=255, required=True) name_english = fields.StringField(max_length=255, required=True) starts_on = fields.DateTimeField(required=True) ends_on = fields.DateTimeField(required=True) local = fields.StringField(max_length=255, required=True) description = fields.StringField(max_length=255, required=True) owners = fields.EmbeddedDocumentListField(UserRef, required=False) serializers.py: class UserRefSerializer(serializers.EmbeddedDocumentSerializer): class Meta: model = UserRef class EventSerializer(serializers.DocumentSerializer): owners = UserRefSerializer(many=True) class Meta: ref_name = "Event" model = Event fields = ["id", "name", "name_english", "starts_on", "ends_on", "local", "description", "owners"] def create(self, validated_data): owners_data = validated_data.pop("owners") event = Event.objects.create(**validated_data) event.owners = [] for owner_data in owners_data: event.owners.append(owner_data) event.save() return event views.py: class EventViewSet(viewsets.ModelViewSet): queryset = Event.objects.all() serializer_class = EventSerializer When I run the post request, the Event object does get persisted; however, the owners list (a list of embedded documents) is not persisted inside the Event. It's just set to a blank list [ ]. … -
Is there a way to handle Spotify authentication flow using express and django-social-auth?
I'm creating an application that runs react on the UI rendered on the server side using express.js. I intend to login with Spotify and play music from my spotify account. I'd also like to use Django to manage user sessions and other data that I plan to load that's not related to Spotify services but would be linked to my User model in Django. Is there a way for me to integrate django-social-auth with this SSR react app. Ideally, i'd like the Spotify authentication to take place express to django and not do much work on the UI for that. I'm sorry I don't have code samples at the moment since I'm still in the setting up phase for this. -
Django Rest Framework: Using destroy with other params than pk
I was wondering if it's possible to use destroy with other params on a GenericViewSet. Like this : curl DELETE https://localhost/api/custom-url?first_param=123&second_param=1 instead of this : curl DELETE https://localhost/api/custom-url/1 I tried overriding destroy method but it didn't work: class ExampleViewSet(mixins.ListModelMixin, mixins.RetrieveModelMixin, mixins.CreateModelMixin, mixins.DestroyModelMixin, viewsets.GenericViewSet): queryset = My_model.objects.all() serializer_class = MySerializerSerializer def destroy(self, request, *args, **kwargs): first_param = kwargs.get('user_id') second_param = kwargs.get('season_id') try: instance = My_model.objects.get(first_field=first_param, second_field=second_param) except ObjectDoesNotExist: return Response(status=status.HTTP_304_NOT_MODIFIED) self.perform_destroy(instance) return Response({'message':'yes!!!'}, status=status.HTTP_200_OK) -
Convert rest_framework.response.Response to requests.models.Response
Our microservices are setup as illustrated by the example below. # microservices.py from rest_framework.views import APIView from rest_framework.response import Response class MicroServiceView(APIView): # View registered to /microservice-api/ def post(self, request): response_data = { "status": "success" } return Response(response_data) # microservice_interface.py import requests def get_response_for_microservice(): return requests.get("https://server.domain.com/microservice-api/") # main_view.py from rest_framework.views import APIView from rest_framework.response import Response from microservice_interface import get_response_for_microservice class mainView(APIView): def post(self, request): service_response = get_response_for_microservice() response_json = response.json() return Response(response_json) Currently our main server and microservice server is the same. So to reduce the network overhead, I want to change the microservice interface to directly call the microservice view. How can I achieve this? When I tried # microservice_interface.py from microservices import MicroServiceView def get_response_for_microservice(original_request): return MicroServiceView.as_view(original_request) I got an error that said AssertionError: The request argument must be an instance of django.http.HttpRequest, not rest_framework.request.Request. So I modified the code a little bit. # microservice_interface.py from microservices import MicroServiceView def get_request_for_microservice(original_request): microservice_request = HttpRequest() microservice_request.method = original_request.method microservice_request.META = original_request.META microservice_request.POST.update(dict(original_request.POST)) microservice_request.GET.update(dict(original_request.GET)) return microservice_request def get_response_for_microservice(original_request): microservice_request = get_request_for_microservice(original_request) return MicroServiceView.as_view(microservice_request) After this, I faced another problem. In the mainView I got an error AttributeError: 'Response' object has no attribute 'json' Upon investigation, I found that MicroServiceView.as_view(microservice_request) … -
Multiple select Django keeps throwing not a valid value
I want to be able to select multiple categories when a blog post is created. I can do this without a problem on Django admin but I can't do it using a bootstrap form. I have a bootstrap form that a user will be able to see the list of categories available in the database. I can show the values in the dropdown menu and I am able to select multiple categories, but when I hit post, it keeps saying {category} is not a valid value. I have tried save_m2m() but it didn't work either. A post can have multiple categories and a category can have multiple post. I can't figure out if it's in my model or form or the html file itself. models.py class Category(models.Model): category_name = models.CharField(max_length=255) slug = models.SlugField(blank=True, unique=True) date_created = models.DateTimeField(auto_now_add=True, verbose_name='date created') date_updated = models.DateTimeField(auto_now=True, verbose_name='date updated') class Meta: verbose_name_plural = 'categories' def __str__(self): return self.category_name class BlogPost(models.Model): STATUS = ( ('draft', 'Draft'), ('published', 'Published'), ) title = models.CharField(max_length=500, null=False, blank=False) body = models.TextField(max_length=5000, null=False, blank=False) image = models.ImageField(upload_to=upload_location, null=False, blank=False) date_published = models.DateTimeField(auto_now_add=True, verbose_name='date published') date_updated = models.DateTimeField(auto_now=True, verbose_name='date updated') author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) slug = models.SlugField(blank=True, unique=True) category = models.ManyToManyField(Category) status … -
Javascript code printing in django html template
I have a simple blog website in django that contains code to play embedded videos from Twitch if a video URL is given in the Post model. The model functions appear to be working but I'm running into issues in the html template itself. The javascript code is printing directly into the blog post instead of running the script to embed the video: Here's the snippet of code from the html template: <div class="fsize-16 lheight-26 mt15" data-trim="140"> {% if post.video_URL %} <script src= "http://player.twitch.tv/js/embed/v1.js"></script> <div id='youtubeplayer'></div> <script type="text/javascript"> var options = { width: 800, height: 500, video: "{{ post.get_video_id }}" }; var player = new Twitch.Player("youtubeplayer", options); player.setVolume(0.5); </script> {% endif %} </div> Any ideas would be greatly appreciated. -
Import Statement Inconsistencies
Why does the 2nd statement below not work even though it is functionally equivalent to the 1st? from django.shortcuts import render # works import django.shortcuts.render as render # doesn't work -
How to reset selectable fields in Django app using jQuery
I was recently asked to take over a partially-written Django app. The Python, I can handle, but I have no Javascript experience and this uses jQuery to do a bunch of form manipulations. Upon form submission, the form itself should be reset to a pristine state. However, while the reset appears to mostly work, any select fields (single or multiple), appear on the web page to retain their old values. The fields are defined something like this in the Django app business_unit = forms.ChoiceField( label='Business unit', required=True, choices=BUSINESS_UNIT_CHOICES, widget=forms.Select(attrs={'data-placeholder':'Select one', 'data-minimum-results-for-search':'10', 'data-tags':'true'}), ) And the reset is performed via $('#custom-form').trigger('reset'); All the simple text fields are cleared. The select fields values are actually cleared (they contain no values), but on the web form, they appear to still be populated. Any suggestions what I'm missing? -
Removing a single product from the cart in Django
I'm currently trying to create a view that allows you to remove a single item from the cart in Django. I've got a view that allows you to add a single product to the cart, but I'm having no luck creating a view that allows you to remove a single product. FYI, I'm using Django version 1. This is my 'add_to_cart' view: def add_to_cart(request, id) cart = request.session.get('cart', {}) cart[id] = cart.get(id, 1) request.session['cart'] = cart return redirect(reverse('products')) This is my 'remove_from_cart' view (that doesn't work): def remove_from_cart(request, id): cart = request.session.get('cart', {}) cart[id] = cart.get(id, 0) request.session['cart'] = cart return redirect(reverse('view_cart')) Any help would be greatly appreciated. -
Trying to implement HTML Template into first Django project. Movies not showing
I am following along an online Python tutorial and I am have to create an HTML template in which creates a table for the end user to see the movies in the inventory. I have followed the teachers instructions step-by-by step but when I refresh the browser page, it only shows the class attributes that I listed in the HTML. The code that I wrote is below: index.html file: <table class="table"> <thead> <tr> <th>Title</th> <th>Genre</th> <th>Stock</th> <th>Daily Rate</th> </tr> </thead> <tbody> {% for movie in movies %} <tr> <td>{{ movie.title }}</td> <td>{{ movie.genre }}</td> <td>{{ movie.number_in_stock }}</td> <td>{{ movie.daily_rate }}</td> </tr> {% endfor %} </tbody> </table> and the views.py file: from django.http import HttpResponse from django.shortcuts import render from .models import Movie def index(request): movies = Movie.objects.all() return render(request, 'index.html', {' movies': movies}) Here is what results on my web browser: enter image description here If someone knows why this is not working, any help would be awesome! -
Python module not getting installed on Heroku
I have a Django application that, when trying to deploy to Heroku, complains about not finding the 'Crypto' module: ... remote: Verifying deploy... done. remote: Running release command... remote: remote: Traceback (most recent call last): remote: File "/app/.heroku/python/lib/python3.8/site-packages/rest_framework/settings.py", line 177, in import_from_string remote: return import_string(val) remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string remote: module = import_module(module_path) remote: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module remote: return _bootstrap._gcd_import(name[level:], package, level) remote: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import remote: File "<frozen importlib._bootstrap>", line 991, in _find_and_load remote: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked remote: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked remote: File "<frozen importlib._bootstrap_external>", line 783, in exec_module remote: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed remote: File "/app/oda_project/users/authentication.py", line 14, in <module> remote: from Crypto.Cipher import AES remote: ModuleNotFoundError: No module named 'Crypto' Works fine locally on my machine, and I have added the module to requirements.txt. Even tried installing with the Heroku CLI. Has anyone successfully used python cryptography on Heroku, and how? I am using the module to encrypt/decrypt strings. Thanks. -
Django not connecting to iframe
The iframe displays that it cannot connect. I've tried using the default xframe_options_exempt decorator on the view, aswell as django-csp's @csp_exempt to no avail. view @csp_exempt @login_required def new_pull(request): """Create a new pull request""" if request.method != 'POST': # No data submitted; create a blank form form = PullForm() else: # POST data submitted; process data form = PullForm(data=request.POST) if form.is_valid(): new_pull = form.save(commit=False) new_pull.owner = request.user new_pull.save() # Display a blank or invalid form. context = {'form': form} return render(request, 'learning_logs/new_pull.html', context) base.html {% if user.is_authenticated %} <br> <iframe src="{% url 'learning_logs:new_pull' %}" title="Pull request Iframe"></iframe> <iframe src="learning_logs/new_pull.html" title="Pull request Iframe"></iframe> {% endif %} new_pull.html <div class="pull container text-center border-top mt-5"> <h5 class="mt-2">Pull request</h5> <p>New pull request:</p> <form action="{% url 'learning_logs:new_pull' %}" method='post'> {% csrf_token %} {% bootstrap_form form %} {% buttons %} <button name="submit" class="btn btn-green pl-2 pr-2"> <i class="fas fa-plus-circle"></i> Create pull </button> {% endbuttons %} <input type="hidden" name="next" value="{% url 'learning_logs:bug_tracker' %}" /> </form> </div>