Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
FileField not working with ArrayField in Django
Using FileField inside ArrayField in Django For Multiple File Uploads but ArrayField is taking the files as string and not saving the files. If the Above Cannot work is there any other working way in Django for Multiple File Upload. I have tried some of the solutions available but none of those seemed/worked relevently for the case Models.py class Questions(models.Model): def content_file_name(self, name): return outside_asset = ArrayField(models.FileField(upload_to=content_file_name, blank = True,default=False),default=[],blank=True) unquoted_shares = ArrayField(models.FileField(upload_to=content_file_name, blank = True,default=False),default=[],blank=True) capital_gains = ArrayField(models.FileField(upload_to=content_file_name, blank = True,default=False),default=[],blank=True) class Meta: db_table = 'Questionnarie' managed = True views.py outside_asset_list = [] unquoted_shares_list = [] capital_gains_list = [] if form.is_valid(): for x in request.FILES: val = x print('val :', val) files = request.FILES.getlist(val) print('files inside loop :', files) if val == 'outside_asset': for f in files: filename = f outside_asset_list.append(filename) print(outside_asset_list) print('files :', outside_asset_list) elif val == 'unquoted_shares': for f in files: filename = f unquoted_shares_list.append(filename) print('files :', unquoted_shares_list) elif val == 'capital_gains': for f in files: filename = f capital_gains_list.append(filename) print('files :', capital_gains_list) Questions.objects.create(user=user, year=year, outside_asset= outside_asset_list, unquoted_shares=[unquoted_shares_list], capital_gains=[capital_gains_list]) return Response.... All the files sent in request should be uploaded to a specific folder and their path should be saved as a list in the database in … -
How to dynamically populate a many-to-many field in a Django admin form by calling a custom function?
Let's say I have the following model class Plasmid (models.Model): name = models.CharField("name", max_length=255, unique=True, blank=False) map = models.FileField("plasmid map") formz_elements = models.ManyToManyField(FormZBaseElement) and a function called get_plasmid_map_features, which takes a Plasmid.map, analyzes it, and returns a list of formz_elements. I'd like to implement a custom button in the admin Plasmid form (e.g. "Click here to get plasmid features"), which would populate the formz_elements field WITHOUT having to hit Save(I can accomplish this upon form submission easily!), while leaving the values of all other fields untouched (i.e. I only want to change the formz_elements field). Any suggestions? Thanks in advance. -
On loading user email list, showing [email protected] for few seconds in django template?
On loading user email list, showing [email protected] for few seconds in django template. Showing [email protected] It is showing when first time loaded, only for few time. Not found any solution. If any body have any suggestion please reply. On loading, showing [email protected] after few seconds showing email like user@mail.com -
Sessions not saved
My sessions stopped saving after I added a middleware that redirects to the login page if a user hasn't logged in yet. It was working before adding the middleware. I tried using request.sessions.save() and request.session.modified = True but it did not solve the problem Here is my middleware: class LoginMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): if "name" not in request.session: if request.GET.get("login_name"): request.session["name"] = request.GET.get("login_name") request.session.modified = True response = response = self.get_response(request) else: response = render(request, 'login.html') else: response = self.get_response(request) return response Here is my login view: def Login(request): if "name" in request.session: return foo(request) else: if request.GET.get("login_name"): request.session["name"] = request.GET.get("login_name") request.session.modified = True else: return render(request, 'login.html') return foo(request) Here is my login HTML: <form action="" method="GET"> <input type="text" name="login_name" required> <button type="submit" class="btn btn-success">Submit</button> </form> Here is my URL: urlpatterns = [ path('', views.Login, name='login'), url(foo', views.foo, name='foo'), ] The middleware is added in settings, and it is called. It's supposed to redirect to the login page if there is no request.session["name"], which it does. When I call request.session["name"] from other views, it returns None. Previously, it returned the saved name. Any recommendations? -
Plz help me with this django task
A website that will first randomly generate a number unknown to the website visitor. The visitor needs to guess what that number is. (In other words, the visitor needs to be able to input information.) If the visitor’s guess is wrong, the program should return some sort of indication as to how wrong (e.g. The number is too high or too low). If the visitor guesses correctly, a positive indication should appear. You’ll need functions to check if the visitor input is an actual number, to see the difference between the inputted number and the randomly generated numbers, and to then compare the numbers. -
Django -How to setup the django server for my external address ex : 10.190.12.32 and this ip address has provided of my client
I followed the instructions here to run Django using the built-in webserver and was able to successfully run it using python manage.py runserver. If I access 127.0.0.1:port locally from the webserver, I get the Django page indicating it worked. http://mywebserver:port_django_runs_on I Tried with the above but didn't worked The web server is running so it must be accessible from the outside, I'm just not sure how. I am running Linux with Apache, though I have not configured Django with Apache. Any ideas on how to do this? -
Serialized data from RetrieveAPIView arriving jumbled
I have a serializer that takes prices and matching transaction dates from a model and sends it on via RetrieveAPIView, to be picked up by a ChartJS price chart on the other end: class MyPriceSerializer(serializers.Serializer): prices = serializers.SerializerMethodField() price_dates = serializers.SerializerMethodField() def get_prices(self, obj): return obj.prices.values_list('price', flat=True) def get_price_dates(self, obj): qs = obj.prices.all() qs = qs.extra(select={'datestr':"to_char(price_date, 'DD Mon HH24:MI')"}) return qs.values_list('datestr', flat=True) class ChartData(RetrieveAPIView): queryset = Market.objects.all().prefetch_related('prices') authentication_classes = [] permission_classes = [] serializer_class = MyPriceSerializer My problem is that the data is arriving in a jumbled order, as can be seen from the price_dates here: HTTP 200 OK Allow: GET, HEAD, OPTIONS Content-Type: application/json Vary: Accept { "prices": [ 0.55, 0.57, 0.5, 0.43, 0.45, 0.57, 0.55, 0.48, 0.4, 0.52, 0.6, 0.52, 0.45, 0.43 ], "price_dates": [ "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:09", "24 Jul 12:11", "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:09", "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:08", "24 Jul 12:09" ] } Why is that? Further details: I've confirmed that the prices and price dates are in order in the model itself. For database, I'm using PostgreSQL11. -
Create Rating starts in django
I am new to the django, and I work on datascience project that aims to create a web application that interact with user in order to gather same date in first step after that make recommendation to the user, My issue is I have I model Countries that has country_name, user_rating, and user_id as ManyToMany fields, how I can give to the use the chose to rate country name using the stars rating and then save the rating in user_rating field ? -
How to embed pinterest link to wagtail
I can embed instagram post link or facebook post link to richText of wagtail but i try to add pinterest link wagtail return validation error Wagtail has oembed provider lists like this herespeakerdeck = { "endpoint": "https://speakerdeck.com/oembed.{format}", "urls": [ r'^http(?:s)?://speakerdeck\.com/.+$', ], } app_net = { "endpoint": "https://alpha-api.app.net/oembed", "urls": [ r'^http(?:s)?://alpha\.app\.net/[^#?/]+/post/.+$', r'^http(?:s)?://photos\.app\.net/[^#?/]+/.+$', ], } youtube = { "endpoint": "http://www.youtube.com/oembed", "urls": [ r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/watch.+$', r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/v/.+$', r'^http(?:s)?://youtu\.be/.+$', r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/user/.+$', r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/[^#?/]+# [^#?/]+/.+$', r'^http(?:s)?://m\.youtube\.com/index.+$', r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/profile.+$', r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/view_play_list.+$', r'^http(?:s)?://(?:[-\w]+\.)?youtube\.com/playlist.+$', ], } i looked for pinterest , and i did not found it. -
Django login method not redirecting with logged in user
I've got a LoginForm that I use to log my user in. When they show up to the site they're presented with a log_in form - once they login, I want it to take them to an app launcher page. Currently - when they try to login, it just reloads the log_in page. The app is called 'launcher' My views look like this: def log_in(request): if request.user.is_authenticated: return redirect("launcher:launcher") form = LoginForm(request.POST or None) if request.POST and form.is_valid(): user = form.login(request) if user: try: login(request, user) except Exception as e: logger.warning( "Issue logging in %s, %s", user, request, ) return redirect('launcher:launcher') else: return render(request, "launcher/login.html", {"form": form}) def log_out(request): logout(request) return render(request, "launcher/thanks.html", {"reason": "logged out"}) @login_required(login_url="launcher:log_in") def launcher(request): if not request.user.groups.all(): return render(request, "launcher/no_apps.html") return render( request, "launcher/launcher.html", { "apps": App.objects.filter( groups__in=request.user.groups.all() ).distinct() }, ) The user is logged in and everything but it is failing on this line: return redirect('launcher:launcher') I can't seem to figure out why the logged in user isn't getting passed along when redirected. It is hitting the @login_required decorator on the launcher method and redirecting the (currently logged in) user to the log_in page again. -
How to enable date formatting during edit while still applying crispy forms at the same time
On displaying edit form, date field format is YYYY-MM-DD yet I would like it to display in form of MM/DD/YYYY since am using the bootstrap date picker which I have configured to MM/DD/YYYY. I tried rendering the date using the django defined date filters along side the crispy forms in this way {% load crispy_forms_tags %} <form method="post" novalidate> <div> {{ form.start_date|date: "d M Y"}} </div> </form> The output should be the new date in format MM/DD/YYYY though it says Could not parse the remainder: ': "d M Y"' from 'form.start_date|date: "d M Y"' -
How to write custom views for admin in django?
I have user list in the user admin which has a coloum named domain(email-domain), Now when a user logs in with his mail id, he should only see users of his domain, not other domains. For ex if sourabh@gmail.com is logging in then only gmail users should be visible. Admin screenshot admin.py from .models import User from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin class UserAdmin(BaseUserAdmin): list_display = ('email', 'domain','admin', 'is_active', 'is_staff') list_filter = ('admin', 'is_staff', 'is_active', 'groups', 'domain') fieldsets = ( (None, {'fields': ('email', 'password', 'domain')}), ('Permissions',{ 'fields': ( 'is_active', 'is_staff', 'is_superuser', )}), ) add_fieldsets = ( (None, { 'classes': ('wide',), 'fields': ('email', 'password1', 'password2')} ), ) search_fields = ('email',) ordering = ('email',) filter_horizontal = () admin.site.register(User, UserAdmin) models.py from django.contrib.auth.models import BaseUserManager, AbstractBaseUser, PermissionsMixin from django.db import models class MyUserManager(BaseUserManager): def _create_user(self, email, password, domain, is_staff, is_superuser, **extra_fields): if not email: raise ValueError('Users must have an email address') email = self.normalize_email(email) user = self.model( email=email, domain = domain, is_staff=is_staff, is_active=True, is_superuser=is_superuser, **extra_fields ) user.set_password(password) user.save(using=self._db) return user def create_user(self, email, password, domain, **extra_fields): return self._create_user(email, password, domain, False, False, **extra_fields) def create_superuser(self, email, password, domain, **extra_fields): user=self._create_user(email, password, domain, True, True, **extra_fields) user.save(using=self._db) return user class … -
Dictionary value in Python
I have a program which takes a csv file and saves the csv data into a Dictionary and then compares the keys of that dictionary with the values fetched from the database. If a dictionary key is equal to a database value then I want to save that said key with it's respected value in another dictionary for later use. But I am unable to understand how to save the values because I don't know how to iterate through a loop. def LCR(request): template = "LCR\LCR.html" dest = Destination.objects.values_list('dest_num', flat=True) rates = {} # my main dictionary which gets populated later on ratelist = {} csv_file = open(r'.\adoc.csv') data_set = csv_file.read().decode("UTF-8") io_string = io.StringIO(data_set) next(io_string) for column in csv.reader(io_string, delimiter=str(u",")): rates[column[0]] = column[1] for desNum in dest: desNum = str(desNum) # print type(desNum) for num in desNum: for venNum in rates: for VN in venNum: # print rates if num[:2] == VN[:2]: ratelist[venNum] = [rates.values()] I expect to populate ratelist dictionary with both the key and it's respected value. -
How to catch errors from form in Django?
I have a collapse div with login/sign-up forms. How I can catch errors if they are? My form in html: <form method="post" action="{% url 'login' %}"> {% csrf_token %} <p><label for="id_username">Username:</label> <input id="id_username" type="text" name="username" maxlength="30" /></p> <p><label for="id_password">Password:</label> <input type="password" name="password" id="id_password" /></p> <input type="submit" value="Log in" /> <input type="hidden" name="next" value="{{ request.get_full_path }}" /> </form> -
How DB structure of registration system should look like?
I am using Postgres as a DB and Django for backend for registration CRM project and I can't choose right DB structure for the project. Actually users should be able to register and sign in, after that they fill 4 different forms like personal info form, education form etc. I have never work on such projects. Which way is better for such purposes? Which tables should I create, which relations should I create? If you have an experience in such structure advice me best practices, thank you in advance. Any help will be appreciated. -
How to point an additional custom Django admin site to separate templates (whilst retaining the default admin site)
New here - appreciate this might be a fairly simple problem! I am creating a custom admin site to run in addition to the default admin (with different functionality). I would like to use a different set of html templates, whilst leaving the default admin unaffected. I've tried creating a new templates folder, but no changes appear in my custom admin. In my admin.py: class CustomAdminSite(AdminSite): # can override things here # create the custom admin site custom_admin_site = CustomAdminSite(name='customadmin') How do I use a different set of templates for my custom admin site leaving the default admin unaffected? -
Update a Django QS with annotated data from a postgres JSONField
I'm trying to update my queryset with some data from a JSONField from that QS. Action has the ForeignKey Service and the postgres JSONField data, and I want to move the service_id values from the data field to the new ForeignKey. updated_actions = ( Action.objects.filter(data__service_id__isnull=False) .annotate(new_service=KeyTransform('service_id', 'data', output_field=IntegerField())) .update(service=F('new_service')) ) If I print out values for new_service here they are definitely ints, but I'm getting: Django.db.utils.ProgrammingError: column "service_id" is of type integer but expression is of type jsonb Is there any way of getting this to work with update? Thanks, Tom -
How to implement a form with nested fields?
There are two related models class Skill(models.Model): """Information about an employee's skills.""" LEVELS = ( ('basic', 'Basic'), ('intermediate', 'Intermediate'), ('advanced', 'Advanced'), ('expert', 'Expert'), ) employee = models.ForeignKey( Employee, on_delete=models.CASCADE, related_name="employee_skills") technology = models.ForeignKey(Technology, on_delete=models.CASCADE) year = models.CharField('common year using amount ', max_length=4) last_year = models.CharField('Last year of technology using ', max_length=4) level = models.CharField("experience level", max_length=64, choices=LEVELS) class Technology(models.Model): """Technologies.""" name = models.CharField('technology name', max_length=32, unique=True) group = models.ForeignKey(Techgroup, on_delete=models.CASCADE, related_name="group") The point is that each technology has its own meaning for the level of ownership, years of experience and when it was last used. I made a form that allows to edit one technology at a time. forms.py class SkillEditForm(forms.ModelForm): YEAR_CHOICES = [(r, r) for r in range(1, 11)] LAST_YEAR_CHOICES = [(r, r) for r in range(1980, datetime.datetime.now().year + 1)] year = forms.CharField( widget=forms.Select(choices=YEAR_CHOICES), ) last_year = forms.CharField(widget=forms.Select(choices=LAST_YEAR_CHOICES)) class Meta: model = Skill fields = ['technology', 'level', 'last_year', 'year'] There are dozens of technologies in the database. Now I want to implement the ability to edit all the technologies in one window at once, so that the user does not have to press the button to add technology 10 times. Smth like: technology1 level last_year year ...... ...... technology_N … -
Unable to use Django Authentication System in Deployment
I have created a Django app which uses Django's builtin authentification system which works normally till I deploy it in a production environment. I now got this error whenever I try to login or register a user: ProgrammingError at /login relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user... All other aspects of my web app work correctly and so I'm unsure what to do. -
ImportError Circular dependency in Django
I'm trying to solve a dependency problem on Django for my web API. Lets consider 2 models in 2 apps. Areas App : models.py class Room1(models.Model): name = models.CharField(max_length=50, blank=False) step = models.ForeignKey('inventory.Project', blank=True, on_delete=models.PROTECT) Areas App : serializers.py from rest_framework import serializers from inventory.serializers import ProjectSerializer class Room1Serializer(serializers.HyperlinkedModelSerializer): step = ProjectSerializer() class Meta: model = Room1 fields = ('id', 'name', 'step') inventory App : models.py class Inventory(models.Model): identifier = models.CharField(ax_length=50, blank=False) place = models.ForeignKey('Areas.Room1', null=True, on_delete=models.PROTECT) class Project(models.Model): Manip = models.CharField(max_length=30, blank=False) inventory App : serializers.py from rest_framework import serializers from inventory.models import * from Areas.serializers import Room1Serializer class ProjectSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Project fields = ('id', 'Manip') class InventorySerializer(serializers.HyperlinkedModelSerializer): place = Room1Serializer() class Meta: model = Inventory fields = ('id','identifier', 'place') ImportError: cannot import name 'ProjectSerializer' The thing is that I'm importing inventory.serializers in my Areas/serializers and also importing Areas.serializers in my inventory/serializers Could you please share your experience ? Thanks -
NoReverseMatch " " is not a registered namespace
Hello guys I've been struggling to move my project in another location in anaconda so after finally installing everything and setting up the project I am getting some errors that I don't understand. First of all I had my code on a sub-folder inside my app called api there I had my views, serializers, urls. And I included the urls but nothing seemed to happen. I moved all the api files to the app folder and I deleted the api folder. Now I'm getting this error NoReverseMatch at /op_data/objects/ ('api-op-data' is not a registered namespace). Even after deleting this url I keep getting the same error. This is my code: urls.py from django.urls import path, re_path from django.views.generic import TemplateView from django.conf.urls import url, include from django.contrib import admin from djgeojson import views from djgeojson.views import GeoJSONLayerView from django.conf.urls.static import static import MMA from django.contrib.staticfiles.urls import staticfiles_urlpatterns from MMA import views from rest_framework_jwt import views from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^api/auth/token/$', obtain_jwt_token, name='api-auth-token'), url(r'^api/', include(('MMA.urls', 'api-op-data'), namespace='api-op-data')), ] urls.py from django.conf.urls import url from django.contrib import admin from .views import OP_Data_RudView, OP_Data_ApiView, UserCreateAPIView, UserLoginAPIView, WoType_ApiView, WoType_RudView, UserObjects_ApiView, UserObjects_RudView app_name = 'MMA' urlpatterns = [ … -
how to get data from {} in graphql
I want to get data about user addinfo(bool value). when i do console.log(data.user), i can get data.user referred to below picture. if when i do console.log(data.user.user), it shows that user is undefined referred to below picture. { user(token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImI3ZTA5YmVhOTAzNzQ3ODQiLCJleHAiOjE1NjM4OTcxNzksIm9yaWdJYXQiOjE1NjM4OTY4Nzl9.QFB58dAvqIC9RBBohN1b3TdR542dBZEcXOG1MSTqAQQ") { user { id addinfo } } } this code show that { "data": { "user": { "user": { "id": "4", "addinfo": false } } } } -
Django-Edit and update the existing data in database with Form
Hello the I need to edit and update the already existing row of data in the database.I guess that their is some problem in views.py. So I am not sure my views.py is right. Please check and tell me if any problem and how to proceed. Thanks models.py is : class chefequipe(models.Model): nom = models.CharField(max_length=200) prenom = models.CharField(max_length=200) matricule = models.CharField(max_length=200) login = models.CharField(max_length=200) password = models.CharField(max_length=200) statut = models.CharField(max_length=200) objects = models.Manager() def __str__(self): return self.matricule the forms.py : class ChefEquipeRegister(forms.Form): nom= forms.CharField(required=True , widget=forms.TextInput) prenom=forms.CharField(required=True , widget=forms.TextInput) matricule=forms.CharField(required=True , widget=forms.TextInput) login=forms.CharField(required=True , widget=forms.TextInput) password=forms.CharField(required=True , widget=forms.PasswordInput) statut=forms.CharField(required=True , widget=forms.TextInput) the view.py def updatechef(request , id): var=models.chefequipe.objects.filter(id=id) form_data = forms.ChefEquipeRegister(request.POST or None ) if form_data.is_valid(): chefequipe = models.chefequipe() chefequipe.nom = form_data.cleaned_data['nom'] chefequipe.prenom= form_data.cleaned_data['prenom'] chefequipe.login = form_data.cleaned_data['login'] chefequipe.password = form_data.cleaned_data['password'] chefequipe.statut = form_data.cleaned_data['statut'] chefequipe.matricule = form_data.cleaned_data['matricule'] chefequipe.save() context= { 'var' : var, } return render(request , 'administrateur/updatechef.html', context ) the page html {% extends 'baseadmin.html' %} {% block content %} <form action="" method="post"> <div class="container"> <div class="columns is-mobile"> <div class="column is-half is-offset-one-quarter"> <form action="" method="post"> {% csrf_token %} {% for var in var %} <div class="content"> <h1> Modifier Information Chef D'équipe : {{var.prenom }} {{ var.nom }} </h1></div> <label>Nom</label> <input … -
How to select specify field only in Viewset Django
I would like to select the distinct field and some field only from Django ViewSet. My method @action(methods=['get'], detail=False) def shiftsum(self, request): query = ( Shift.objects.values('shiftid', 'dayname') .annotate(shiftdesc=Max('shiftdesc')) .annotate(ct=Count('*')) # get count of rows in group .order_by('shiftid', 'dayname') .distinct() ) serializer = self.get_serializer_class()(query,many=True) return Response(serializer.data) My Model class Shift(models.Model): shiftid = models.CharField(max_length=15) shiftdesc = models.CharField(blank = False, null= False, max_length=20) dayname = models.CharField(blank = False, null= False, max_length=20) dayno = models.IntegerField(blank = False, null= False) offin_f = models.IntegerField(blank = False, null= False) . . . My serializer class ShiftSerializer(serializers.ModelSerializer): class Meta: model=Shift fields = "__all__" def create(self,validated_data): validated_data['Created_Usr']="Admin" validated_data['Created_DT']=datetime.datetime.now() validated_data['LastModified_Usr']='' validated_data['LastModified_DT']=None return Shift.objects.create(**validated_data) def update(self,instance,validated_data): instance.shiftdesc = validated_data.get('shiftdesc',instance.shiftdesc) instance.dayname = validated_data.get('dayname',instance.dayname) instance.dayno = validated_data.get('dayno',instance.dayno) instance.offin_f = validated_data.get('offin_f',instance.offin_f) instance.offout_f = validated_data.get('offout_f',instance.offout_f) When I select like that, Error message show Got KeyError when attempting to get a value for field dayno on serializer `ShiftSerializer. . . . I would like to select the shiftid , shiftdesc and dayname only, How to select these three field only and am I need to create new serializer? -
How can I get/pass the string from HTML file to Views file in Django?
I've some strings/text in an HTML file. I want a new page when I click on them and individual string to give different view. How can I get the text/string from HTML to a Django view so that I can use them? first_key is zip file so I'm lopping through two list items ad getting those list items as strings/text to print on one of my page. Upon clicking them I want a new page which I'm getting but unable to get the string/text/item value on which I clicked. I want the value '{{i}}' in my views. I've tried request.POST.get['mytext'] but all I'm getting is NONE. I want '{{i}}' stored in a variable in my views.py file. {% for i,j in first_key %} <tr> <td><a name="my_text" href = "{% url 'search_app:page'%}" >{{i}}</a></td> <td>{{ j }}</td> </tr> {% endfor %}