Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django, data forms cannot be saved
I plan to open a website for my tutoring center. the purpose is to collect students information to improve the quality of the center. I start learning and using Django as a web development tool. I have studied for 1 month and still confuse with most of its fucntionality. I try to collect data, nickname, and school, from my students. I think I did it correctly but these data has not been saved. Please help #forms.py from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from .models import Profile class UserRegisterForm(UserCreationForm): first_name = forms.CharField() last_name = forms.CharField() nickname = forms.CharField() school = forms.CharField() email = forms.EmailField() class Meta: model = User fields = ['username', 'password1', 'password2', 'first_name', 'last_name', 'nickname', 'school'] class UserUpdateForm(forms.ModelForm): first_name = forms.CharField() last_name = forms.CharField() nickname = forms.CharField() school = forms.CharField() email = forms.EmailField() class Meta: model = User fields = ['username', 'email','first_name', 'last_name', 'nickname', 'school'] class ProfileUpdateForm(forms.ModelForm): class Meta: model = Profile fields = ['image'] #models.py from django.db import models from django.contrib.auth.models import User from PIL import Image class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) image = models.ImageField(default='default.jpg', upload_to='profile_pics') def __str__(self): return f'{self.user.username} Profile' def save(self, *args, **kwargs): super().save(*args, **kwargs) img = Image.open(self.image.path) if β¦ -
Font awesome some icon now showing up
im using font awesome 5.7.2 but for some reason not all icons are properly showing-up. At the below example only mail <i class="fa fa-envelope"></i> is showing up. facebook, twitter and googleplus are only displayed as small squares. <a href="{{ settings.SITE_SOCIAL_FACEBOOK }}{{ settings.SITE_TLD }}{{ request.get_full_path|urlencode }}" class ="socialmediabutton-post-details"><i class="fa fa-facebook"></i></a> <a href="{{ settings.SITE_SOCIAL_TWITTER }}{{ settings.SITE_TLD }}{{ request.get_full_path|urlencode }}" class="socialmediabutton-post-details"><i class="fa fa-twitter"></i></a> <a href="{{ settings.SITE_SOCIAL_GOOGLEPLUS }}{{ settings.SITE_TLD }}{{ request.get_full_path|urlencode }}" class="socialmediabutton-post-details"><i class="fa fa-google"></i></a> <a href="mailto:?subject=Check this Post: {{ post.title }} - At: {{ settings.SITE_NAME }}&body={{ settings.SITE_TLD }}{{ request.get_full_path|urlencode }} " class = "socialmediabutton-post-details"><i class="fa fa-envelope"></i></a> this is how i add fontawesome to my site: <link rel="stylesheet" href="{% static 'css/font-awesome/5.7.2/all.css' %}"> -
django python def choices/documentation
In Django Python, where can I find documentation about all available def? For example, I have def clean(self): and def __init__(self, *args, **kwargs): I want to know what my possible options are for def. For example, I want to force a decimal field to return a string. Which def can I override that would allow me to cast a return value? Is there some documentation out there that someone could point me to on this subject? -
Unable to save calculated attributes to data model in django throwing error 'int' object not callable
class Room(models.Model): a = models.PositiveIntegerField(default=0, validators=[MaxValueValidator(9)],blank=True) b = models.PositiveIntegerField(default=0, validators=[MaxValueValidator(99999)],blank=True) c = models.PositiveIntegerField(default=0, validators=[MaxValueValidator(9999)],blank=True) @property def cal_room_rent(self): if self.room_type == 'SS' : return 14000 elif self.room_type == 'DS' : return 8000 elif self.room_type == 'TS' : return 6000 @property def cal_security_deposit(self): return 3000 @property def cal_limit(self): if self.room_type == 'SS' : return 1 elif self.room_type == 'DS' : 2 return 2 elif self.room_type == 'TS' : return 3 def save(self, *args, **kwargs): self.a=self.cal_limit() self.b=self.cal_room_rent() self.c=self.security_deposit() super(Room, self).save(*args, **kwargs) OUTPUT: TypeError at /admin/pgmanagement/room/add/ 'int' object is not callable Request Method: POST Request URL: http://127.0.0.1:8000/admin/pgmanagement/room/add/ Django Version: 2.1.4 Exception Type: TypeError Exception Value: 'int' object is not callable Exception Location: E:\anil_website\svcomforts_1\pgmanagement\models.py in save, line 93 -
Django allauth page redirections
I have used diango allauth for login signup. After signing up or logging in a form appears where I need to enter a few details and submit it. After submitting the form it cannot be resubmitted again and another page appears where i can print my submitted data. So whenever I login after successful submission of the form the preview page should appear. The form page should not and cannot be appeared again. How will I attain this? -
Social authentication for Google failing with Vue.js and django-rest-auth
I am following a blog that shows us how we can use vue-authenticate with django restframework for social authentication. This is the blog: https://medium.com/@dobrotek6/drfsamv-django-rest-framework-social-auth-mongo-vuejs-part-1-c5c907dd7b69 However, the blog uses some the social-auth framework which I am not using. I'm using the django-rest-auth package. I tried to set it up accordingly but I am running into some issues. redirectUri: 'http://localhost:8080/', url: 'http://localhost:8000/rest-auth/google/', The above code shows the links I'm placing in the provider settings according to the vue-authenticate documentation this.$auth.authenticate('google', {provider: "google- oauth2"}).then(function (response) The above code shows the authentication method according to the documentation in vue-authenticate that I copied from the blog. This is where I get the error that says authentication failed. What exactly is it that I'm doing wrong? I can't seem to identify the issue. -
CORS policy issue on ajax img load (django)
on ajax load, image_url contains https link. So no problem with https access. but when I access the same page on http, I get this toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. I did some googling, and these are what I've tried. set attribute on img img = new Image(); img.crossOrigin = 'anonymous'; img.onload = some func; img.src = some src; django set corshead INSTALLED_APPS = [ ... 'corsheaders', ] MIDDLEWARE_CLASSES = ( 'corsheaders.middleware.CorsMiddleware', ... ) CORS_ORIGIN_WHITELIST = ( 'example.com', ### tried ### ### 'http://example.com', 'https://example.com' ) ### also tried ### CORS_ORIGIN_ALLOW_ALL = True CORS_ALLOW_CREDENTIALS = False django set x_frame_options X_FRAME_OPTIONS = 'ALLOW-FROM https://example.com/' manually add headers on views.py def retrieve(self, request, pk=None): ... response = Response(serializer.data) response["Access-Control-Allow-Origin"] = "*" return response Nothing works. What am I missing? I am planning to redirect http to https on nginx (There are some issues, it takes time.) Beside this, how can I avoid cross origin problem? Thanks in advance. -
Django wrong endpoint accessed by URL
I have 2 URL patterns in my Django application: url_patterns = [ url(r'test/read/all/', TestViews.test_read_all), url(r'test/read/all/custom/', TestViews.test_read_all_custom) ] My problem is: when i try to access test/read/all/custom/ URL, request are directed to test/read/all/ URL (TestViews.test_read_all are triggered instead of TestViews.test_read_all_custom) EDIT Both endpoint methods has the same api view decorator (@api_view(["GET"])) -
How to delete default django tables
I have my own ACL tables and now I want to delete Django default tables like auth_user,... how can I do this? I have deleted table myself but when I type command migrate it shows me an error that auth tables needed. In my settings.py I have set this AUTH_USER_MODEL. -
django.apps apps.getModel('app_name.model_name') finds no models
I'm new to Django and using Django 2.1.7. Up to today, I have had a (simple) working system. Then I needed to introduce a circular dependency between two of my model classes, which creates circular imports and causes problems, etc... I have read that since Django 1.7 the proper way to import a circular dependency between models is: from django.apps import apps from django.db import models Model2 = apps.get_model('my_app.Model2') class Model1(models.Model): # use Model2 where needed However, I always see the error: LookupError: App 'my_app' doesn't have a 'Model2' model. Note that both Model1 and Model2 are in the same app, so I have tried calling apps.get_model() both with and without the app prefix. If I just remove the circular dependency (ie: Model1 no longer references Model2), both models works just fine in the system independently. DB queries work, makemigrations works, migrate works, etc... And to be sure, in my settings.py file: I have 'my_app' declared at the top of the INSTALLED_APPS array. I also tried moving it to the bottom. What gives? Seems so simple I don't know what I could be missing. Do I need to register my models somewhere else explicitly? Any help would be much appreciated! -
how to refresh google transate using jquery html
I am using google translate in my django website and I also used ajax for fetching data from database. Goggle translate is not converting the text which is returned by ajax call because it is run before the ajax call. Please help me I want to know how to translate text of ajax response. -
password not encrypted during save update
I am trying to create a user using api. With my post/put request, my password is not saved in encrypted form. My code is as below. views.py from urllib import request from rest_framework import viewsets, status from django.contrib.auth.models import User from atest.serializers import UserSerializer from rest_framework import permissions from atest.permissions import IsOwnerOrReadOnly from rest_framework.decorators import action from rest_framework.response import Response class UserViewSet(viewsets.ModelViewSet): """ This viewset provides operations on Users table to the same user. """ # permission_classes = [IsOwnerOrReadOnly,] queryset = User.objects.all() serializer_class = UserSerializer serializers.py from rest_framework import serializers from django.contrib.auth.models import User from django.contrib.auth.hashers import make_password class UserSerializer(serializers.HyperlinkedModelSerializer): password = serializers.CharField(max_length=128, style={'input_type': 'password'}, write_only=True) class Meta: model = User fields = ('url', 'id', 'username', 'email', 'first_name', 'last_name', 'password') def create(self, validated_data): username = validated_data['username'] email = validated_data['email'] first_name = validated_data['first_name'] last_name = validated_data['last_name'] password = make_password(validated_data['password']) def update(self, instance, validated_data): instance.email = validated_data.get('email', instance.email) instance.username = validated_data.get('username', instance.username) instance.first_name = validated_data.get('first_name', instance.first_name) instance.last_name = validated_data.get('last_name', instance.last_name) instance.password = make_password(validated_data.get('password', instance.password)) instance.save() return instance Please help me identifying the solution. What am I doing wrong that my password is not getting encrypted? -
how to reload a segment of webpage in django?
In django, I am trying to make buttons that change one segment of the webpage by loading html file. The html file shows map and statistics and stuff so they have to be separate. My approach was to use ajax call and in the view, return the html file. <script type="text/javascript" > function mapcall (office, year){ console.log(office, year, "clicked") $.ajax ({ method : "GET", url: '/map/', // % url "map" % end point data: { office_called: office, year_called: year, }, success: function (map){ console.log("map is here ", map) $("#maparea").load($( "{% static 'my_html_return' %}" ))}, error: function (error_data){ alert("data error, sorry") } }) } </script> <div id="maparea"> {% if map_return %} {% with map_template=map_return|stringformat:"s"|add:".html" %} {% include "mypath/"|add:map_template %} {% endwith %} {% endif %} </div> This is my view.py def get_map (request, *args, **kwargs): year = request.GET.get("year_called") office = request.GET.get("office_called") map_return = "map"+str(year)+office return render(request, "mypath/home.html", {"title": "Home", "map_return":map_return}) I don't know how to make this work. Any suggestion is appreciated. -
how to insert data to the database using django and ajax
i have a simple webpage that allow user to enter data using form. i am using django with ajax in order to enter the new records into the database. the problem is that once the user choose the webpage the system display the below error: MultiValueDictKeyError at /addperson/ 'na' Request Method: GET Request URL: http://127.0.0.1:8000/addperson/ Django Version: 2.1.3 Exception Type: MultiValueDictKeyError Exception Value: 'na' Exception Location: C:\Users\LT GM\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\datastructures.py in getitem, line 79 Python Executable: C:\Users\LT GM\AppData\Local\Programs\Python\Python37\python.exe Python Version: 3.7.1 Python Path: ['C:\Users\LT ' 'GM\Downloads\Django-Related-DropDowns-master\Django-Related-DropDowns-master', 'C:\Users\LT GM\AppData\Local\Programs\Python\Python37\python37.zip', 'C:\Users\LT GM\AppData\Local\Programs\Python\Python37\DLLs', 'C:\Users\LT GM\AppData\Local\Programs\Python\Python37\lib', 'C:\Users\LT GM\AppData\Local\Programs\Python\Python37', 'C:\Users\LT ' 'GM\AppData\Local\Programs\Python\Python37\lib\site-packages'] Server time: Mon, 4 Mar 2019 07:10:33 +0000 models.py class Person(models.Model): boolChoice = ( ("Male","M"),("Female","F") ) name = models.CharField(max_length=50) date = models.DateTimeField() description = models.TextField() gender = models.BooleanField(choices= boolChoice) def __str__(self): return str(self.name) urls.py from django.urls import path, include from django.contrib import admin from map import views as mapviews admin.autodiscover() urlpatterns = [ path('admin/', admin.site.urls), path('', mapviews.index), path('addperson/',mapviews.addperson), ] addperson.html {% extends 'base.html' %} {% block content %} <div class="hero__content"> <form method="POST" class="form-style-9">{% csrf_token %} {{ form.as_p }} <ul> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <li> {# <input type="number" name="field1" class="field-style field-split align-right" placeholder="Ψ§ο»οΊ΄ο»¨οΊ" id="year"/> #} {# <input type="date" name="field2" class="field-style field-split align-left" placeholder="Ψ§ο»οΊοΊοΊο»³οΊ¦" id="date" /> #} <h2>Add β¦ -
Django Viewset detail supports only with pk? not args?
My ACTION view is not working. How to pass args not only pk? I was using function based api like Function Based Api View (1) {host}:{port}/api/food/<year>/<month>/<day>/ Now, I have new viewset for model Food. ViewSet (2) {host}:{port}/food/ I hope to integrate this apis to one ModelViewSet so i did like below. WHAT I WANT (1) + (2) {host}:{port}/food/files/<year>/<month>/<day>/ {host}:{port}/food/ My Code class FoodViewSet(viewsets.ModelViewSet): queryset = Food.objects.all() permission_classes = [blahblah] authentication_classes = [blahblah] def list(self, request, *args, **kwargs): ... return Response(blahblah) def create(self, request, *args, **kwargs): ... return Response(blahblah) @action(['GET'], detail=True) def files(self, request, year, month, day): ... return Response(blahblah) -
How to get the ChoiceField vaue from a form in Django?
I want to get the chosen email-id from a drop down list made from ChoiceField. I have written a code but apparently it is not working. How do I do it ? Here is my views.py @login_required def assign(request): if request.method == 'POST': assign_now = AssignTask(data=request.POST, user=request.user) if assign_now.is_valid(): task_title = assign_now.cleaned_data.get('title') task_description = assign_now.cleaned_data.get('desc') assign_email = assign_now.cleaned_data('assign_to') assign_email = dict(AssignTask.fields['assign_to'].choices)[assign_email] user_details = User.objects.get(email=assign_email) t = Task(title=task_title, description=task_description, assigned_to=user_details) t.save() return HttpResponse('<h2>Successfully assigned task</h2>') else: return HttpResponse('<h2><Task assignment failed/h2>') else: return HttpResponse('<h2>Request method error</h2>') Here is my forms.py class AssignTask(forms.Form): title = forms.CharField(max_length=200) description = forms.CharField(widget=forms.Textarea) assign_to = forms.ChoiceField(widget=forms.Select(choices=[])) def __init__(self, *args, **kwargs): self.user = kwargs.pop('user') user_email = self.user.email.split('@')[1] super(AssignTask, self).__init__(*args, **kwargs) self.fields['assign_to'] = forms.ChoiceField(choices=[(i.email, i.email) for i in User.objects.filter(is_active=True, email__icontains=user_email)]) -
django not able to save all incidents in database
I have a working code which gets all incident details. But i am unable to save complete data in database only the last record gets saved for record in response.all(): data = { 'number': record['number'], 'description': record['description'], 'short_description': record['short_description'], 'state': record['state'], } #print(record['number']) incidentsServicenow.number = data['number'] incidentsServicenow.title = data['short_description'] incidentsServicenow.description = data['description'] incidentsServicenow.state = data['state'] ticket.append(data) print("storing data") incidentsServicenow.save() return HttpResponse(ticket, content_type='application/json') I need to save all the records in database -
Django + Nginx: serve static files but only files in static/admin get served
I'm learning deploy django website on nginx by this tutorial. After running python manage.py collectstatic, there're admin, rest_framework and some.png in path/to/myproject/static. In my remote server, running uwsgi --socket mysite.sock --module mysite.wsgi --chmod-socket=664 Files only in static were served e.g.myDomain:8000/static/admin/css/base.css is served. myDomain:8000/static/some.png and myDomain:8000/rest_framework/css/some.css get 404. But if I run python manage.py runserver locally. 127.0.0.1:8000/static/some.png is 200 -
How to add validation for .svg images in ImageChooserBlock in Wagtail?
I want .svg files to be successfully uploaded in ImageChooserBlock. By default, .svg format fails validation when uploading via Wagtail's admin panel. -
Django doesn't see fk in other table
I have some models and fk on them to others. models.py class ElementMessages(models.Model) element = models.ForeignKey(Element, on_delete=models.CASCADE) sender = models.ForeignKey(UserAccount, on_delete=models.SET_NULL, null=True) text = models.TextField(max_length=512, null=True) send_time = models.DateTimeField(auto_now_add=True) type = models.CharField(max_length=16, choices=MESSAGE_TYPES, default=SIMPLE) type_dialog = models.CharField(max_length=10, choices=DIALOG_TYPE, default=DIALOG_TALK) request = models.ForeignKey(ChatRequest, null=True, default=None, on_delete=models.CASCADE) post_work = models.ForeignKey(PostWork, null=True, default=None, on_delete=models.CASCADE) files = models.BooleanField(default=False) class Element(models.Model): id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True) artist = models.ForeignKey(Artist, on_delete=models.CASCADE, related_name='chat_element', null=True, blank=True) customer = models.ForeignKey(Customer, on_delete=models.CASCADE, related_name='chat_element', null=True, blank=True) element = models.ForeignKey('projects.Element', null=False, on_delete=models.CASCADE, related_name='chat_element') When I try to delete Element object, it raises this: django.db.utils.IntegrityError: insert or update on table "chat_elementmessages" violates foreign key constraint "chat_elementmessages_element_id_672e2ba2_fk_chat_element_id" DETAIL: Key (element_id)=(87cdd8d7-47f0-4264-8aa7-ae21a8246fd8) is not present in table "chat_element". But when I look at table in db, this key exists. How to fix that? -
django REST filter query by foreign key lookup_field
I've got a time obj serialized to DRF. model: class Time(TimeStampedModel): user = models.ForeignKey( 'users.User', on_delete=models.CASCADE, related_name='time_logs') amount = models.DurationField() date_created = models.DateTimeField(auto_now_add=True) date_updated = models.DateTimeField(auto_now=True) serializer: class TimeSerializer(serializers.ModelSerializer): user = serializers.HiddenField(default=serializers.CurrentUserDefault()) class Meta: model = Time fields = ('__all__') extra_kwargs = {'date_created': {'read_only': True}, 'date_updated': {'read_only': True}} viewset: class UserTimeViewSet(viewsets.ModelViewSet): serializer_class = TimeSerializer queryset = Time.objects.all() def get_queryset(self): return Time.objects.filter(user=self.request.user) urls from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'users/time', UserTimeViewSet) this gives me an endpoint: /users/time/{id} where {id} is the Time obj id. when I tried to modify the endpoint to the same url route but instead pass it a user id as the arg (to get only that user's time) by overwriting lookup_field on the serializer and ViewSet, I'm either getting response errs or {"detail":"Not found."} class UserTimeViewSet(viewsets.ModelViewSet): serializer_class = TimeSerializer queryset = Time.objects.all().select_related('user') lookup_field = 'user' also tried: class UserTimeViewSet(generics.ListAPIView): serializer_class = TimeSerializer def get_queryset(self): user = self.kwargs['user'] return Time.objects.filter(user=user) how can I GET Time with a relationship to a user by user's id? -
Django: How to customize password hint list
I was working on SetPasswordForm and I was wondering if there's a way to customize password hint showing below password form. Your password can't be too similar to your other personal information. Your password must contain at least 8 characters. ... I was trying to override it and seeing source code but I couldn't figure out where it comes from. views.py class CustomPasswordResetConfirmView(PasswordResetConfirmView): form_class = CustomSetPasswordForm template_name = 'users/password_reset_confirm.html' forms.py class CustomSetPasswordForm(SetPasswordForm): def __init__(self, *args, **kawrgs): super(CustomSetPasswordForm, self).__init__(*args, **kwargs) self.fields['new_password1'].label = "Custom Field Name" ... -
How can I implement a dropdown lsit in my Django form?
I am trying to implement a drop-down list in Django which contains the email addresses of those users whose domain matches to that of the currently logged in user. I am using the following code but it still shows a list and not a drop down list. I tried changing the widget part from ChoiceField to MultipleChoiceField and now to CheckboxSelectMultiple just to see if checkbox is displayed or not but none of it seems to work. Here is my forms.py class AssignTask(forms.Form): title = forms.CharField(max_length=200) description = forms.CharField(widget=forms.Textarea) assign_to = forms.MultipleChoiceField(choices=[], widget=forms.CheckboxSelectMultiple, required=False) def __init__(self, *args, **kwargs): self.user = kwargs.pop('user') user_email = self.user.email.split('@')[1] super(AssignTask, self).__init__(*args, **kwargs) self.fields['assign_to'] = forms.MultipleChoiceField(choices=[(i.email, i.email) for i in User.objects.filter(is_active=True, email__icontains=user_email)]) Here is my views.py @login_required def assigntask(request): assign_form = AssignTask(user=request.user) return render(request, 'todoapp/assign_task.html', context={'assign': assign_form}) Here is my html {% extends 'todoapp/base.html' %} {% block title %}Create a task{% endblock %} {% block content %} <h2>Create a task and assign it to a user</h2> <form method="post"> {% csrf_token %} {{ assign.as_p }} <br/><input type="submit" value="Assign"> &nbsp;&nbsp;<button onclick="location.href='{%url 'dashboard' %}'" type="button">Go back</button> </form> {% endblock %} -
How to set permissions for users
I am trying to set permissions for users my django project. What I want to achieve is: User should be able to view/update only his information when logged in An non-logged in user should be able to create a new user My code is as below. serializers.py from rest_framework import serializers from django.contrib.auth.models import User from django.contrib.auth.hashers import make_password class UserSerializer(serializers.HyperlinkedModelSerializer): password = serializers.CharField(max_length=128, style={'input_type': 'password'}, write_only=True) class Meta: model = User fields = ('url', 'id', 'username', 'email', 'first_name', 'last_name', 'password') def create(self, validated_data): username = validated_data['username'] email = validated_data['email'] first_name = validated_data['first_name'] last_name = validated_data['last_name'] password = make_password(validated_data['password']) def update(self, instance, validated_data): instance.email = validated_data.get('email', instance.email) instance.username = validated_data.get('username', instance.username) instance.first_name = validated_data.get('first_name', instance.first_name) instance.last_name = validated_data.get('last_name', instance.last_name) instance.password = make_password(validated_data.get('password', instance.password)) instance.save() return instance views.py from urllib import request from rest_framework import viewsets, status from django.contrib.auth.models import User from atest.serializers import UserSerializer from rest_framework import permissions from atest.permissions import IsOwnerOrReadOnly from rest_framework.decorators import action from rest_framework.response import Response class UserViewSet(viewsets.ModelViewSet): """ This viewset provides operations on Users table to the same user. """ permission_classes = [permissions.IsAuthenticatedOrReadOnly, IsOwnerOrReadOnly] queryset = User.objects.all() serializer_class = UserSerializer and permissions.py from rest_framework import permissions class IsOwnerOrReadOnly(permissions.BasePermission): """ Custom permission to only allow owners β¦ -
How to group and order parents and children elements from a table in Django
The Problem I have a table like so coming from a(n) MSSQL database: ββββββββββββ¦ββββββββββ¦ββββββββ¦βββββββ β ParentID β ChildID β Level β Name β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 0 β 0 β 1 β A β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 1 β 0 β 2 β B β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 2 β 0 β 2 β C β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 3 β 0 β 2 β D β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 4 β 0 β 2 β E β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 5 β 0 β 2 β F β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 6 β 0 β 2 β G β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 7 β 0 β 2 β H β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 8 β 0 β 2 β I β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 9 β 0 β 2 β J β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 10 β 0 β 2 β K β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 11 β 0 β 2 β L β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 12 β 0 β 2 β M β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 21 β 1 β 3 β N β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 22 β 2 β 3 β O β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 23 β 2 β 3 β P β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 24 β 2 β 3 β Q β β βββββββββββ¬ββββββββββ¬ββββββββ¬βββββββ£ β 25 β 2 β 3 β¦