Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django manytomany field shows model name and id via model form, but not the attributes
I have a manytomany in my model class A(models.Model): name = models.CharField(max_length=250) class B(models.Model): a = models.ManyToManyField('A') and a model form: class BForm(forms.ModelForm): class Meta: model = B fields = ['a'] labels = {'a': 'A'} I would now like to represent the Manytomany field via the model form: {% for field in BForm %} {{ field }} {% endfor %} It works with every field, the problem is that the manytomany field shows as values: A(1) A(2) A(3) A(4) A(5) A(6) ... I would like to have the names from the model there -
Django admin bootstrap theme not working in django admin
I am deploying two apps to Heroku .I have deployed one using bootstrap theme .The first app I deployed is using Django admin bootstrap theme and it works perfectly but I don't see my bootstrap theme is working in the second app and it does not have any styles. When I ran the second app locally I don't see that my bootstrap theme is working and I did everything perfectly written in the description on PyPi but I don't see anything changed in my admin can anyone help. my settings.py: Django settings for project project. Generated by 'django-admin startproject' using Django 3.0.7. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'zout1(cwz@w+8t__(sh3f+w-uxd9hjph@oq!-y87ea^y_sgn=i' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'Retail_Management', 'bootstrap_admin' ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', … -
Error Encountered During Oscar INstallation
I am trying to setup django-oscar using [this][1] guide, however [1]: https://django-oscar.readthedocs.io/en/2.0.4/internals/getting_started.html on running python manage.py migrate I got the following error: LookupError: No installed app with label 'communication' please how can I solve this? -
Why I am Unable To Add Likes To Article Modal- Django?
I am Using Django And I Have A Modal Called Article And For Like I Am Using A ManyToManyFeild In Django For Making A Like System, But I am Unable To Add Likes To My Article, I Can't Figure Out What Is Wrong Can Anyone Help, I Am Messing Around With Scripts But I See No Change... Here Is How My Likes Variable Look In Article Modal likes = models.ManyToManyField(User, related_name = 'likes') Here Is How My Like View @login_required(login_url='/accounts/login') def like_button(request, slug): article = get_object_or_404(Article, slug =request.POST.get('article_slug')) article.likes.add(request.user) return HttpResponseRedirect(reverse('detail', args=[str(slug)])) And This Is How My url Look Like path('like/<slug:slug>/', views.like_button, name='like_post'), And This Is How My Like I Represent My Like View On Front-End <form action="{% url 'like_post' article.slug %}" method="post"> {% csrf_token %} <button type="submit" class="btn btn-outline-primary" name="article_slug" value="article.slug" >Like</button> </form> -
Is Django good enough to build a Chat Application? [closed]
this might be a very bad question as I am new to the Django. Actually I have to build a chat application, and doing tasks with Django is super easy but As Python GIL allows only 1 thread at a time, Even though Django has provided option for using the async feature. Can it handle the chats if 1000 different people start chatting at a single Time? not as in a group. -
Protecting Backend from clients making request directly to backend API
How do I prevent my website users from access my backend api.. I currently use react on the frontend to access the backend with a REST api (Django)... how do I prevent authenticated client side users from hitting my api endpoints directing -
Facing error when using dijango AbstractUser - ForeignKey() is invalid
Users/models.py from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import gettext_lazy as _ class CustomUser(AbstractUser): Username = models.CharField(verbose_name=_("Username"), max_length=100, unique=True) Registration_Number = models.CharField(verbose_name=_("Registration_Number"), max_length=100, unique=True) Email = models.EmailField(verbose_name=_("Email"), max_length=100, unique=True,) Title = models.CharField(verbose_name=_("Title"), max_length=10, choices=title) Name = models.CharField(verbose_name=_("Name"), max_length=500) Contact = models.CharField(verbose_name=_("Contact"), max_length=10) Alternative_Mobile = models.CharField(verbose_name=_("Alternative_Mobile"), max_length=10, null=True, blank=True) Address = models.TextField(verbose_name=_("Address")) State = models.CharField(verbose_name=_("State"), max_length=100, choices=states) Subdivision = models.CharField(verbose_name=_("Subdivision"), max_length=100) District = models.CharField(verbose_name=_("District"), max_length=100) Pin = models.CharField(verbose_name=_("Pin"), max_length=6) Image = models.ImageField(verbose_name=_("Image"), upload_to='images/doctors/') Status = models.CharField(verbose_name=_("Status"), max_length=30, default='Pending', choices=status_ch) USERNAME_FIELD = "Username" EMAIL_FIELD = "Email" REQUIRED_FIELDS = [] Users/admin.py from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .forms import * from .models import CustomUser class CustomUserAdmin(UserAdmin): add_form = CustomUserCreationForm form = CustomUserChangeForm model = CustomUser list_display = ["Username"] admin.site.register(CustomUser, CustomUserAdmin) Users/settings.py INSTALLED_APPS = "Users.apps.UsersConfig" AUTH_USER_MODEL = 'Users.CustomUser' It show me the following error Error AssertionError: ForeignKey(('Users.CustomUser',)) is invalid. First parameter to ForeignKey must be either a model, a model name, or the string 'self Traceback of the erroe Traceback (most recent call last): File "D:\ProgramFiles\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "D:\ProgramFiles\Python38\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "E:\SAMIDDHA\Programs\Python\Django Pojects\Web\venv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "E:\SAMIDDHA\Programs\Python\Django Pojects\Web\venv\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run autoreload.raise_last_exception() File "E:\SAMIDDHA\Programs\Python\Django … -
How to render in template in Django?
I am trying to display my data on the HTML file but I am unable to display, I have a function in views.py file and i render this function data on my HTML file, but it's not going to the HTML path, please let me know how I can display data in Django default template. Here is my app appname and its have a views.py file and this file has a function that displays my data on the HTML page... please have a look at the views.py file... def mydata(): var1=Mymodel.objects.all() template_name='../templates/admin/appname/modelname/change_list.html' context={'var1':var1} return render(request, template_name, context) Note: this template folder is that which Django provides in default, it's not available inside my app (appname), it's available outside of my app so main issue is in thsi path template_name='../templates/admin/appname/modelname/change_list.html', because it's getting the correct path -
Django rest framework merge two objects into one in JSON response
How can i merge equal fields in the returned response into one? When accessing the enpoint, i currently get the following response: [ { "colors": [ "Red", "Orange", ], "styles": [ "Rock" ], "application": [ "Wall" ], "material": [ "Mosaic" ] }, { "colors": [ "Yellow", ], "styles": [ "Mosaic" ], "application": [ "Wall" ], "material": [ "Ceramic" ] } ] While want to achieve something like the snippet bellow, where unique values are appended and equal fields are merged: [ { "colors": [ "Red", "Orange", "Yellow" ], "styles": [ "Rock" "Mosaic" ], "application": [ "Wall" ], "material": [ "Mosaic" "Ceramic" ] }, ] Serializers.py class ProductFiltersByCategorySerializer(serializers.ModelSerializer): """ A serializer to display available filters for a product lust """ colors = serializers.StringRelatedField(read_only=True, many=True) styles = serializers.StringRelatedField(read_only=True, many=True) application = serializers.StringRelatedField(read_only=True, many=True) material = serializers.StringRelatedField(read_only=True, many=True) class Meta: model = Product fields = ( 'colors', 'styles', 'application', 'material' ) Viewsets.py class ProductFiltersByCategory(generics.ListAPIView): """ This viewset takes the category parameter from the url and returns related product filters """ serializer_class = ProductFiltersByCategorySerializer def get_queryset(self): category = self.kwargs['category'] return Product.objects.filter(category__parent__name__iexact=category).distinct() The fields colors, styles, application and material are ManytoMany relations to their own models from the Product model. -
Django + google spreadsheets API how to save sheet data to model
I'm total newbie in django and I'm trying to save data that i get from my spreadsheet API to the model and be able to edit it on admin site. Using .get_all_values() I'm getting a list that contains whole spreadsheet data. I'd like to save that list to the model and make it that way -
size responsive field in django forms
I'm making an web application and i wanted to create responsive fields in my forms. When im visiting my site in small window all my forms fileds stick out of their containers borders. Example of my html code from login window. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Login DomainManager</title> {% load static %} <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"> </script> </head> <body> <div class="center"> <div class="panel panel-info" > <div class="panel-heading"> <center> <h3 class="panel-title">Login</h3> </center> </div> <div class="panel-body"> <form method="post" action="{% url 'login' %}"> {% csrf_token %} <p><b>Username: {{ form.username }}</b></p> <p><b> Password: {{ form.password }}</b></p> <center> <p><input type="submit" value="Login"></p> <input type="hidden" name="next" value="{{ next }}"> <a href="/register" style="color: black">No account? Register</a> </center> {% if form.errors %} <center> <p style="color:#ff0000;">Your login or password is wrong!</p> <p><a href="/accounts/password_reset/" style="color: black">Forgot password?</a></p> </center> {% endif %} {% if next %} <p>No access.</p> {% endif %} </form> </div> </div> </div> </body> </html> <style> body { background-color:#f9f9f9; } .panel > .panel-heading { background-color: #222222; color: gray; text-align: center; } .panel-info { border-color: #222222; } .panel-body { padding-left: 10%; padding-right: 10%; } div.center { margin: 0; width: 15%; top: 30%; left: 50%; position: absolute; -ms-transform: translate(-50%, -30%); transform: translate(-50%, -30%); } </style> i use UserCreationForms … -
Is it possible to reference a model's verbose name in help text?
I'm looking to do something like below. class AbstractIsActive(models.Model): is_active = models.BooleanField( 'active', default=True, help_text='Select to determine whether a %(verbose_name)s is active.' ) class Meta: abstract = True I'm having a hard time finding where in the ForeignKey field code it allows you to use %(class)s in verbose_name. -
redis server not working in Django application on Windows
I'm trying to make a chat application using django-channels following the documentation but there is this one final stage where I'm stuck. After putting channel-layers in settings.py as mentioned in the docs: CHANNEL_LAYERS = { 'default': { 'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': { "hosts": [('127.0.0.1', 6379)], }, }, } I honestly don't know how to handle this redis-channel issue but I followed the help from this forum as well but this didn't help. Now there is no issue in starting the server but the moment I put a message in the chat box, It doesn't appears on the chat box in the same room in another window (which according to documentation should happen). Instead it gives me an error on the server console saying: aioredis.errors.ReplyError: ERR unknown command 'EVAL' WebSocket DISCONNECT /ws/chat/room/ [127.0.0.1:64070] If I need to re-install redis on my windows machine please let me know how can I do it properly. Any kind of help will be highly appreciated. -
I'm trying to fetch particular data using ajax, I can't do it properly
I'm trying to fetch particular data from the database using ajax, I can get all data using 'all()' method. But I can't get particular data only ajax code <script type="text/javascript"> $(document).ready(function(){ $("#request-btn").click(function(){ $.ajax({ url: "{% url 'contact_details' %}", type: "GET", data: { property: "{{ property.id }}" }, dataType:"json", success: function(result){ $.each(result, function() { $("#request-btn").hide() html = "<h6>Contact me" + "<br>" + "Email:" + this.email + "<br>" +"Mobile:" + this.mobile + "<hr>" $("#response").append(html) }); } }); }); }); views.py def contact_details(request): property_id = request.GET.get('property') if request.user.is_authenticated: property_details = Property.objects.get(id=property_id) seraializer = PropertySerializer(property_details, many=True) details = seraializer.data return JsonResponse(details, safe=False ) else: return JsonResponse({"authenticated": False}) It throws the error TypeError: 'Property' object is not iterable In 'all()' method it gives all the data, For testing I make some changes in code(changed 'many=True' to 'many=False) seraializer = PropertySerializer(property_details, many=False) but it gives undefined values and output shown repeately here serialization I'm using serializers. serializer.py class PropertySerializer(serializers.ModelSerializer): class Meta: model = Property fields = ('id', 'email', 'mobile') I need to Email and mobile data, How to fix this -
using request.data instead of serializer class in Django
I have been using in one of my views request.data instead of serialzer to get json data and work on it, my question is this ok or lets say "a good practice" to use request.data or should i create serializer class for that view? -
Django - show all images assigned to the post
I am creating blog application and I would like to show all images which were uploaded to the single blog post. Here are my Models.py: class Post(models.Model): title = models.CharField(max_length=100) content = RichTextField(blank=True, null=True) class PostImage(models.Model): post = models.ForeignKey(Post, default=None, on_delete=models.CASCADE, related_name='postimages') image = models.ImageField(upload_to='gallery/') Views.py class PostGalleryView(DetailView): model = Post template_name = 'blog/gallery.html' context_object_name = 'photos' In the template if I put there {{ photos.postimages }} then it shows on the page: blog.PostImage.None even though that 2 images are uploaded to the particular blog post. {{ photos.postimages.count }} shows number 2. If I tried to loop through photos.postimages it throws an error: 'RelatedManager' object is not iterable. Any idea how I can access the PostImage model in the template? -
Displaying PNG in Django
i am currently working on a project where i want to get a screenshot of an given url. After displaying this screenshot i take this png and modulate it into a RGB-image. I have 2 problems. First since a few days, the correct screenshot-png is not displayed anymore but an older version gets displayed every time, even though in my media dir the current screenshot is correct. Second my function for modulating doesnt display any RGB-png not even creates it in the folder. This is very surprising since i used this function/algorithm outside of django and it excellently worked. Maybe I forgot any details. Any Help is much appreciated, thanks in advance!! [1] (https://i.stack.imgur.com/cOCpd.jpg "screenshot") [2] (https://i.stack.imgur.com/N2jAl.jpg "modulate") [3] (https://i.stack.imgur.com/BtpG8.jpg "html") [4] (https://i.stack.imgur.com/b1RGL.jpg "settings") -
Django 3.1 media prefix not showing on urls
I am using Django 3.1. settings.py looks like BASE_DIR = Path(__file__).resolve(strict=True).parent.parent MEDIA_ROOT = BASE_DIR / 'media' MEDIA_URL = '/media/' urls.py looks like from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ ... ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) my model image field looks like dev_image_one = models.ImageField(upload_to='dev/', blank=True, null=True, verbose_name = 'image 1') When files are uploaded, they end up in the /media/dev directory. When they are to be displayed, the url looks like: <img src="dev/1.png"> If I manually append /media/ on to the front of the url, the image displays. I never had this problem before so I'm at a loss as to what is going wrong. I never used 3.1 before, so I'm wondering if that doesn't have something to do with it. No problem with the static files. Thanks. -
Python Geoip2 maxminddb.reader error in EC2 server
Hi I am facing a issue with below code. PS : Its working fine with my local machine but facing issues in servers. import geoip2.database def get_geo_city_from_ip(ip="103.148.20.109"): try: reader = geoip2.database.Reader('GeoLite2-City.mmdb') response = reader.city(ip) city=response.city.name reader.close() return city except Exception as e: return None a = get_geo_city_from_ip() print("City ####",a) Error Traceback (most recent call last): File "test.py", line 2, in <module> import geoip2.database File "/var/www/html/geo/test/lib/python3.5/site-packages/geoip2/database.py", line 10, in <module> import maxminddb File "/var/www/html/geo/test/lib/python3.5/site-packages/maxminddb/__init__.py", line 5, in <module> import maxminddb.reader File "/var/www/html/geo/test/lib/python3.5/site-packages/maxminddb/reader.py", line 36 _buffer: Union[bytes, FileBuffer, "mmap.mmap"] ^ SyntaxError: invalid syntax Packages & Version Python 3.5.2 aiohttp==3.6.2 async-timeout==3.0.1 attrs==20.2.0 certifi==2020.6.20 chardet==3.0.4 geoip2==4.0.2 idna==2.10 idna-ssl==1.1.0 maxminddb==2.0.2 multidict==4.7.6 pkg-resources==0.0.0 requests==2.24.0 simplegeoip2==1.0.2 typing-extensions==3.7.4.3 urllib3==1.25.10 yarl==1.5.1 -
Post method is not updating database Django
Post method is not updating database Hi everyone! I’m really new in Django and python and I really need your help, please. I need to modify one attribute (state) of an instance of my Anomalie class. I'm using forms to do that. The problem is when I “submit” to update it, I have nothing in my database. I'm following step-by-step tutorial but in my case is not working. So here is my model class: class Anomalie (models.Model): ANOMALIE = ( ("Etiquette absente", "Etiquette absente"), ("Etiquette decalee", "Etiquette decalee"), ("Etiquette inconnue", "Etiquette inconnue"), ) ANOMALIE_STATE = ( ("traité", "traité"), ("mise à jour", "mise à jour"), ("signalé", "signalé"), ) type = models.CharField( max_length=200, choices=ANOMALIE, null=False) date_report = models.DateTimeField(null=False, blank=False) localization = models.TextField(max_length=30, null=False, blank=False) state = models.CharField( max_length=200, choices=ANOMALIE_STATE, null=False) aisle = models.ForeignKey(Aisle, null=True, on_delete=models.SET_NULL) product = models.ForeignKey( Product, null=True, on_delete=models.SET_NULL) def datepublished(self): return self.date_report.strftime('%B %d %Y') def __str__(self): return self.type this is the view.py def treter_anomalie(request, pk): anomalie_pk = Anomalie.objects.get(id=pk) if request.method == "POST": anomalie_pk.state = 'traité' return redirect('/') context = {'anomalie_pk': anomalie_pk} return render(request, 'anomalie/treter_anomalie.html', context) this is the treter_anomalie.html {% extends 'base.html'%} {% load static %} {%block content%} <div id="layoutSidenav"> <div id="layoutSidenav_content"> <main> <div class="container-fluid"> <P>treter anomalie {{ anomalie_pk.id … -
Django filtering using multiple queries
On my homepage I have a search bar and when you search something it redirects you to a page with the results(titles and document types). On the left side of the page I want to implement a filter by document type. After the search my url looks like this: http://127.0.0.1:8000/search/?q=something After applying the filter: http://127.0.0.1:8000/search/?document_type=Tehnical+report I don't know how to implement the filters to search just in the objects list filtered by the query (q) on the search page. Also, I'm not sure if the url should look like this : http://127.0.0.1:8000/search/?q=something&document_type=Tehnical+report or like this http://127.0.0.1:8000/search/?document_type=Tehnical+report after applying the filter. models.py DOCUMENT_TYPES = [ ('Tehnical report','Tehnical report'), ('Bachelor thesis','Bachelor thesis'), ... ] class Form_Data(models.Model): title = models.CharField(unique=True, max_length=100, blank=False) author = models.CharField(max_length=100) document_type = models.CharField(choices=DOCUMENT_TYPES, max_length=255, blank=False, default=None) views.py def search_list(request): object_list = Form_Data.objects.none() document_types = DOCUMENT_TYPES query = request.GET.get('q') document_type_query = request.GET.get('document_type') for item in query: object_list |= Form_Data.objects.filter( Q(title__icontains=item) | Q(author__icontains=item)) return render(request, "Home_Page/search_results.html") home_page.html <div class="Search"> <form action="{% url 'home_page:search_results' %}" method="get"> <input id="Search_Bar" type="text" name="q"> <button id="Button_Search" type="submit"></button> </form> </div> search_results.html {% for form_data in object_list %} <h5>{{ form_data.title }}</h5> <h5>{{ form_data.document_type }}</h5> {% endfor %} <form method="GET" action="."> <select class="form-control" name="document_type"> {% for tag, label … -
Django cannot find 'channels.routing'
I am going through django channels tutorial. I've installed channels and when i import channels.routing in myProject/routing.py i get error Cannot find reference 'routing' in 'imported module channels'. I've clicked install package routing but it's given me nothing. I am still struggling with. If needed, i've included channels in settings -
How to create a div after 4 elements in django template
I Hope You Are Good I want to show my city in my footer I want 4 cities in each div after 4 cities added in div I want to create a new div and add 4 cities and so on here is the html reffrence: <div class="col-lg-3 col-md-3 col-sm-6 col-6"> <p><a href="/property/listings/?city=islamabad" class="fot-text">Islamabad</a></p> <p><a href="/property/listings/?city=karachi" class="fot-text">Karachi</a></p> <p><a href="/property/listings/?city=lahore" class="fot-text">Lahore</a></p> <p><a href="/property/listings/?city=rawalpindi" class="fot-text">Rawalpindi</a></p> </div> <div class="col-lg-3 col-md-3 col-sm-6 col-6"> <p><a href="/property/listings/?city=Abbottabad" class="fot-text">Abbottabad</a></p> <p><a href="/property/listings/?city=Abdul Hakim" class="fot-text">Abdul Hakim</a></p> <p><a href="/property/listings/?city=Ahmedpur East" class="fot-text">Ahmedpur East</a></p> <p><a href="/property/listings/?city=Alipur" class="fot-text">Alipur</a></p> </div> <div class="col-lg-3 col-md-3 col-sm-6 col-6"> <p><a href="/property/listings/?city=Arifwala" class="fot-text">Arifwala</a></p> <p><a href="/property/listings/?city=Astore" class="fot-text">Astore</a></p> <p><a href="/property/listings/?city=Attock" class="fot-text">Attock</a></p> <p><a href="/property/listings/?city=Awaran" class="fot-text">Awaran</a></p> </div> I want to like this HTML how can I achieve this! the following code dosen't work: <div class="col-lg-3 col-md-3 col-sm-6 col-6"> {% for city in citys %} <p><a href="/property/listings/?city={{ city }}" class="fot-text">{{ city }}</a></p> {% endfor %} </div> it adds all element in one div how can create new div after 4 items added on that div -
Get list of pending Celery jobs when no workers
I think I must be missing something. On my django server I do the following: inspector = app.control.inspect() for element in list: result = app.send_task("workerTasks.do_processing_task", args=[element, "spd"], queue="cloud") scheduled = inspector.scheduled() reserved = inspector.reserved() active = inspector.active() print("-- SCHEDULED") print(scheduled) print("-- RESERVED") print(reserved) print("-- ACTIVE") print(active) global_helper.execute_commands(["sudo rabbitmqctl list_queues"]) global_helper.execute_commands(["celery inspect active_queues"]) (excuse the printing, this is remote and I haven't set up remote debugging) There are no workers connected to the server, and I get this output: -- SCHEDULED None -- RESERVED None -- ACTIVE None [ sudo rabbitmqctl list_queues ] Listing queues ... [ celery inspect active_queues ] Error: No nodes replied within time constraint. So it looks like all of these tools require jobs to be on a worker somewhere. So my question is, how can I look at tasks which are still waiting to be picked up by a worker? (I have verified that app.send_task has been called 127 times) -
Django Monthly Calendar - Clickable Day
I am stuck with a basic understanding of django for a few days now. what do I have? a monthly calendar template showing me booked appointments a daily timetable template what do I want? I want the days of the monthly calendar be clickable, leading to the timetable of that specific day I failing to understand how to parse through the calendar in the html template to make the days clickable. I don't even know if this is the right approach. Plus, I do not know how to pass the day variable to the timetable template - all I able to manage is to show "today". any hints or reads that help me to wrap my head around this stuff?