Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
im trying to write a custom user model and when i try to migrate i keep getting this error :
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/db/migrations/loader.py", line 295, in check_consistent_history raise InconsistentMigrationHistory( django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency Occupier.0001_initial on database 'default'. -
ValueError: "<User: harry1>" needs to have a value for field "id" before this many-to-many relationship can be used in Django
I need help with Django web Framework I cannot solve this problem or I cannot identify the source of the problem. Please help me with this problem the main problem is written in the title. Here is my traceback for the error: Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\exception.py", line 47, in inner response = get_response(request) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "D:\Documents\CodingFox\CodingFox_final\CodingFox\Users\views.py", line 37, in registeration_form form.save() File "D:\Documents\CodingFox\CodingFox_final\CodingFox\Users\forms.py", line 18, in save user = super().save(*args, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\contrib\auth\forms.py", line 131, in save user.save() File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\fields\related_descriptors.py", line 536, in __get__ return self.related_manager_cls(instance) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\fields\related_descriptors.py", line 851, in __init__ raise ValueError('"%r" needs to have a value for field "%s" before ' ValueError: "<User: harry1>" needs to have a value for field "id" before this many-to-many relationship can be used. Models.py file from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.urls import reverse import cv2 class Profile(models.Model): user =models.OneToOneField(User, on_delete=models.CASCADE) cover_img = models.ImageField(default='default.png',upload_to='cover_pics') image = models.ImageField(default='default.jpg',upload_to='profile_pics') # bio = models.TextField() def __str__(self): return f'{self.user.username} Profile' def save(self ,*args, **kwargs): super(Profile, self).save( *args, **kwargs) img = cv2.imread(self.image.path) output_size = cv2.resize(img,(300,300)) cv2.imwrite(self.image.path, output_size) Forms.py from django import forms from django.contrib.auth.models import User … -
Reverse for '' not found Django
Can't find the problem #my urls path("office", views.office, name="office") #my views def office(request): offices_list = Office.objects.all() context = {'offices_list': offices_list} return render(request, "auctions/office.html", context) #my html <li class="nav-item"> <a class="nav-link text-white " href="{% url 'office' %}">office</a> </li> Reverse for '' not found. '' is not a valid view function or pattern name. -
Toggle boolean fields from a Queryset using 'not F()'
I added a new action to toggle Users is_staff property. But I noticed that using the method below, can only toggle from True to False. The other way round doesn't seem to work(ie. from False to True). admin.py from django.db.models.expressions import F actions = ['toggle_staff'] def toggle_staff(self, request, queryset): queryset.update(is_staff= not F('is_staff')) Please, I need help here. -
How to get value from HTML user input in django view?
Hello everyone I have an HTML form as follows: https://jsfiddle.net/ritzlucky13/z627Lrm3/ and after clicking on post i am redirecting it to views.py. can any one tell me how to get the field values of all the fields of the form into views.py. here's the output i want the field value in key value pair like shown in above pic i.e. API=hello&Area=hello1 so on... i know we can do that using this if html: <div class="form-group col-md-2"> <label for="param">TAF Parameter</label> <input type="text" name="inputdata_API" class="form-control" id="inputapi_param" value="API" readonly> </div> and view: def register(request): api = request.GET.get['inputdata_API'] But in that case i have to write each and every input name in my view -
Django won't authenticate user
I just upgraded django, from 1.11 all the way to 3.2, and my custom authentication backend won't work now. settings.py: AUTHENTICATION_BACKENDS = ( 'apps.base.auth.PasswordlessAuthBackend', ... ) apps/base/auth.py: class PasswordlessAuthBackend(BaseBackend): def authenticate(self, username): try: return User.objects.get(username=username) except: return None def get_user(self, user_id): try: return User.objects.get(pk=user_id) except User.DoesNotExist: return None views.py: def test_login(request): my_username = 'my_user' authorized_user = authenticate(username=my_username) print(authorized_user) u = User.objects.get(username=my_username) print(u.username) Output from views.py: None my_username I've tried everything and really can't get my head around this. I'm positive it's loading the PasswordlessAuthBackend class, since if I change its name I get an ImportError in settings.py. -
why can't hide slug field in django admin?
when i try to exclude 'slug' field in django admin form,i got this msg: "KeyError at /admin/post/post/add/ "Key 'slug' not found in 'PostForm'. Choices are: author, content, image, title." why? django code: model: models.py : from django.db import models from django.utils import timezone from django.urls import reverse # Create your models here. class Post(models.Model): title= models.CharField(max_length=50,null=False,blank=False) content= models.TextField(max_length=2000,null=False,blank=False) image= models.ImageField( upload_to="post-img/") created_at=models.DateTimeField(default=timezone.now) author=models.CharField(max_length=50,null=True,blank=True) slug=models.SlugField(max_length=30) class Meta: verbose_name =("Post") verbose_name_plural =("Posts") def __str__(self): return self.title def get_absolute_url(self): return reverse("PostDetail", kwargs={'slug': self.slug}) def headline(self): return self.content[:50]+'...' admin.py : from django.contrib import admin from .models import Post # Register your models here. class PostAdmin(admin.ModelAdmin): exclude=('created_at','slug',) # fieldsets=(({'fields':('title','content','image',)}),) list_display=['title','headline','author','created_at'] prepopulated_fields = {'slug': ('title',)} admin.site.register(Post,PostAdmin) thank you ! -
how to serilize a json object in drf
I have two serializers like this : class UsersInfoSeriliazerByUsers(serializers.ModelSerializer): class Meta: model = FreeTime fields = '__all__' class SetTimeZoneSerializer(serializers.Serializer): TIMEZONES = tuple(zip(pytz.all_timezones, pytz.all_timezones)) meeting_date = serializers.DateField(format="%d-%m-%Y", input_formats=['%d-%m-%Y', 'iso-8601']) time_zone_destination = serializers.ChoiceField(choices = TIMEZONES) time_table = UsersInfoSeriliazerByUsers(many=True,read_only=True) emails = serializers.ListField(child=serializers.EmailField()) in views.py i need to get filter queryset from freetime model and serilize the result query it again : def common(self,request): serializer = SetTimeZoneSerializer(data = request.data) if serializer.is_valid(): j={} j['meeting_date']=serializer.data['meeting_date'] j['time_zone_destination']=serializer.data['time_zone_destination'] j['time_table'] = UsersInfoSeriliazerByUsers(FreeTime.objects.all(), many=True).data json_string = json.dumps(j) serializer = SetTimeZoneSerializer(json_string, many=True) It creates json_string successfully and i printed it in terminal but i got this error : Internal Server Error: /api/time/common/ Traceback (most recent call last): File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/rest_framework/fields.py", line 457, in get_attribute return get_attribute(instance, self.source_attrs) File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/rest_framework/fields.py", line 97, in get_attribute instance = getattr(instance, attr) AttributeError: 'str' object has no attribute 'meeting_date' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/rest_framework/viewsets.py", line 125, in view return self.dispatch(request, *args, **kwargs) File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/home/admin1/envs/myvenv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception … -
How to update self.request.user field in django rest framework?
I need to update the requested user field when I create the organization from OrganizationViewSet as below, class OrganizationViewSet(viewsets.ModelViewSet): queryset = Organization.objects.all() serializer_class = OrganizationSerializer permission_classes = [permissions.IsAuthenticated] def perform_create(self, serializer): serializer.save(admin_user=self.request.user) data = serializer.data org_id = data['id'] self.request.user.update(organization=org_id) # Error is coming from this line The above code generates the following error, 'User' object has no attribute 'update' So my question is, how can I update the requested user organization? Any help? -
Access different serializer if a queryset is empty Django Rest Framework
I don't think I am implementing this correctly, but I am trying to change the serializer used for a queryset based on a condition (if there are no venues in one queryset, switch to another serializer and just return list object). I'm not quite sure how to do this. Here is the view class SavedVenuesViewSet(viewsets.ModelViewSet): serializer_class = UserVenueSerializer def get_queryset(self): list_id = self.request.GET.get('list_id', None) user = self.request.user.id print(user) print(list_id) print(type(list_id)) qs = UserVenue.objects.filter(user_list=int(float(list_id))) if not qs: print("EMPTY LIST") #this is where i try to switch serializer serializer_class = UserListSerializer return UserVenue.objects.filter(id=int(float(list_id))) else: return qs Here are the relevant serializers: class UserVenueSerializer(serializers.ModelSerializer): venue = mapCafesSerializer() class Meta: model = UserVenue fields = ['user', 'user_list', 'venue'] depth = 2 [...] class UserListSerializer(serializers.ModelSerializer): class Meta: model = UserList fields = ['id', 'user', 'list_name'] depth = 2 The traceback isn't throwing an error but it isn't doing what I am hoping: 1 45 <class 'str'> EMPTY LIST [29/Sep/2021 11:05:36] "GET /api/savedvenues/?list_id=45 HTTP/1.1" 200 2 -
I can't quite figure out why I can' access a URL with Django
I'm trying to access the URL ending "basket/" but when i go to the page i receive the 404 error shown below. I understand this error isn't thrown due to Django not being able to find the template, it has something to do with my product_detail view. Here are my urls linking me to basket/ core/urls.py from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static app_name = 'core' urlpatterns = [ path('admin/', admin.site.urls), path('', include('main_store.urls', namespace='main_store')), path('basket/', include('basket.urls', namespace='basket')), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) basket/urls.py from django.urls import path from . import views app_name = 'basket' urlpatterns = [ path('', views.basket_summary, name='basket_summary') ] Here is the basket/views.py: from django.shortcuts import render def basket_summary(request): return render(request, 'main_store/basket/summary.html') And here is the view that is throwing the error. main_store/views.py: def product_detail(request, slug): product = get_object_or_404(Product, slug=slug, in_stock=True) return render(request, 'main_store/products/single_product.html', {'product': product}) If anyone can shed some light on what I'm the issue is or what I'm doing wrong, it would be much appreciated. Thanks in advance. -
Authenticate Oauth2 Bearer Token generated by C sharp with validator= SHA1 and decryption="AES" in Pyhton Django
I am new to Django can some please help!! we provide username and password to Csharp API and in return we get a access token(Oauth2) with token type:bearer i want to use that token in django to authenticate and figure out the level of permissions from the given bearer token i was able to obtain the token in Django but cant find any library that Validates this token in Django(python) import requests,json, getpass token_url = "<<Token_url>>" #test_api_url = "<<url of the api you want to call goes here>>" # Step A - resource owner supplies credentials #Resource owner (enduser) credentials #RO_user = raw_input('Enduser netid: ') #RO_password = getpass.getpass('Enduser password: ') #client (application) credentials client_id = 'username' client_secret = 'password' #step B, C - single call with resource owner credentials in the body and client credentials as the basic auth header # will return access_token data = {'grant_type': 'password','username': client_id, 'password': client_secret, 'scope': 'scriptingAPI' } access_token_response = requests.post(token_url, data=data, verify=False, allow_redirects=False) print (access_token_response.headers) print (access_token_response.text) tokens = json.loads(access_token_response.text) print ("access token: " + tokens['access_token']) # Step C - now we can use the access_token to make as many calls as we want. api_call_headers = {'Authorization': 'Bearer ' + tokens['access_token']} print (api_call_headers) … -
How to redirect to same page after form action in django
I'm new to Django and I'm trying to create an app which will accept multiple images upload using forms and then redirect to the same upload page and display uploaded images just below the form. My program works for uploading, but then I cannot exactly redirect it back to the same page which contains the upload form and images. index.html(in templates folder) <form> action="{% url 'fileapp:uploads' %}" method="POST" enctype="multipart/form-data" > <input type="text" name="filename" placeholder="enter your file name" /> <input type="file" multiple name="uploadfoles" /> {% csrf_token %} <button type="submit">File Upload</button> </form> <h3>Previously uploaded files: <br></h3> {% for d in data %} <p>{{d.f_name}} ---- <img width="50" src="{{d.myfiles.url}}" /></p> {% endfor %} views.py from . models import myuploadfile def index(request): context = { "data":myuploadfile.objects.all(), } return render(request,"index.html",context) def send_files(request): if request.method == "POST" : name = request.POST.get("filename") myfile = request.FILES.getlist("uploadfoles") for f in myfile: myuploadfile(f_name=name,myfiles=f).save() return redirect("fileapp:index") urls.py from django.contrib import admin from django.urls import path,include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path("",include("myfileapp.urls",namespace="fileapp")) ] urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) Whenever I press 'File Upload' button, the app should redirect back to the same page where we upload files, but I get this error: … -
Error when I put choices in Charfield in a Serializer which is not based on Model - Django Rest Framework
I make a serializer, which is not based on a model and one of the fields is a charfield in which I want to put a specific choices. Is that possible? The error I get when I put the code: TypeError: init() got an unexpected keyword argument 'choices' STATUS_TYPES = ( ('', ''), ('male', 'male'), ('female', 'female') ) class SomeSerializer(serializers.Serializer): gender = serializers.CharField(max_length=100, choices=GENDER_TYPES) -
Error: decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>] in Django
Django View: @api_view(['PUT']) @permission_classes([IsAdminUser]) def updateProduct(request, pk): data = request.data product = Product.objects.get(_id=pk) product.name = data['name'], product.price = data['price'], product.category = data['category'] product.description = data['description'] product.countInStock = data['countInStock'] print(data) serializer = ProductSerializer(product, many =False) return (Response(serializer.data)) Models.py: class Product(models.Model): user = models.ForeignKey(User, on_delete = models.SET_NULL, null=True) name = models.CharField(max_length = 200, null= True, blank= True) image = models.ImageField(default="/place.jpg",null= True, blank= True) netWeight = models.CharField(max_length = 200, null= True, blank= True) category = models.CharField(max_length = 200, null= True, blank= True) description = models.TextField(null = True, blank= True) rating = models.DecimalField(max_digits = 7, decimal_places = 2,null= True, blank= True) price = models.DecimalField(max_digits = 7, decimal_places = 2,null= True, blank= True) numReviews = models.IntegerField(null= True, blank= True, default=0) countInStock = models.IntegerField(null= True, blank= True, default=0) createdAt = models.DateTimeField(auto_now_add=True) _id = models.AutoField(primary_key=True, editable=False) Product Action.js (React): export const listProductUpdate = (product) => async (dispatch, getState) => { try { dispatch({ type: PRODUCT_UPDATE_REQUEST }) const { userLogin: { userInfo }, } = getState() const config = { headers: { 'Content-type': 'application/json', Authorization: `Bearer ${userInfo.token}` } } const { data } = await axios.put( `/api/products/update/${product._id}/`, product, config ) dispatch({ type: PRODUCT_UPDATE_SUCCESS, payload: data }) dispatch({ type: PRODUCT_DETAILS_SUCCESS, payload: data }) } catch (error) { dispatch({ type: … -
Generating Multiple Documents (Python TempFile Module)
I am currently trying to print financial reports with my web app - this needs to happen by the click of a button. When I click the button, however, the app only prints 1 document (the first one) I don't understand what this could be as there are 2 different returns for each if statement that re-direct to 2 different .HTML pages This is what I have tried at the moment: import tempfile def printReports(request , reports_pk): pkForm = get_object_or_404(SettingsClass , pk=reports_pk) complexName = pkForm.Complex if pkForm.Trial_balance_Monthly == True: ### Printing Trial Balance PDF response = HttpResponse(content_type= 'application/pdf') response['Content-Disposition']= 'attachment; filename=TrialBalance' + \ str(datetime.now()) + '.pdf' response['Content-Transfer-Encoding'] = 'binary' content = {"x_AlltrbYTD":x_AlltrbYTD , 'xCreditTotal':xCreditTotal , 'xDebitTotal':xDebitTotal , 'complexName':complexName , 'openingBalances': openingBalances ,'printZero':printZero , 'printDesc':printDesc , 'printAcc':printAcc} html_string=render_to_string('main/reports/trialBalanceYear.html' , content) html=HTML(string=html_string) result=html.write_pdf() with tempfile.NamedTemporaryFile(delete=True) as output: output.write(result) output.flush() output.seek(0) response.write(output.read()) return response if pkForm.Trial_balance_Monthly == True: ### Printing Trial Balance PDF response = HttpResponse(content_type= 'application/pdf') response['Content-Disposition']= 'attachment; filename=TrialBalanceMonthly' + \ str(datetime.now()) + '.pdf' response['Content-Transfer-Encoding'] = 'binary' content = {"xtrbMonth":xtrbMonth , 'xCreditTotalM':xCreditTotalM , 'xDebitTotalM':xDebitTotalM , 'complexName':complexName , 'printZeroM':printZeroM} html_string=render_to_string('main/reports/trialBalanceMonthly.html' , content) html=HTML(string=html_string) result=html.write_pdf() with tempfile.NamedTemporaryFile(delete=True) as output: output.write(result) output.flush() output.seek(0) response.write(output.read()) else: printTrialBalanceMonth = False The program only prints what the first … -
How do I convert an annotation from timedelta to seconds?
I'm annotating a queryset with time passed since the model was created: super().get_queryset().annotate(duration_seconds=timezone.now() - F("start")) The result is a timedelta object, but I need it to be an integer in seconds. Calling .seconds is not possible in the expression, so how can I do this? -
Show model property if model exists and some string if not
To make it clear I want do the following with just one line: {%if model %} <input type="text" class="form-control" id="title" value="{{model.title}}" placeholder="Enter Title"> {% else %} <input type="text" class="form-control" id="title" value="" placeholder="Enter Title"> {% endif %} I tried this: <input type="text" class="form-control" id="title" value="{% model.title if model else "" %}" > And it didn't work: Invalid block tag on line 15 I don't think I have to make a custom template tag for this simple kinda things. Thanks in advance -
Django - How to raise an error if a user signed up yet has not verified their email?
I'm trying to call a function from views in my forms. I tried to accomplish it in several ways, but I realized that I don't do it in a proper way. The end result I'd like to achieve: raise an error on a login page if a user signed up yet has not verified their email. How can I make it work? forms.py from django import forms from django.core.exceptions import ValidationError from . import views from . import models class LoginForm(forms.Form): email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput) remember_me = forms.BooleanField(required=False) def clean(self): email = self.cleaned_data.get("email") password = self.cleaned_data.get("password") try: user = models.User.objects.get(username=email) user_verified = views.complete_verification() if user.check_password(password): return self.cleaned_data else: self.add_error( "password", forms.ValidationError("Incorrect password. Try again.") ) if not user_verified: self.add_error( "email", forms.ValidationError( "Please check your inbox and verify your email." ), ) except models.User.DoesNotExist: self.add_error("email", forms.ValidationError("The user does not exist.")) views.py def complete_verification(request, key): try: user = models.User.objects.get(email_secret_key=key) user.email_verified = True user.email_secret_key = "" user.is_active = True if user.email_verified and user.is_active: user.save() login(request, user, backend="django.contrib.auth.backends.ModelBackend") # todo: add success message except models.User.DoesNotExist: # todo: add error message pass return redirect(reverse("pages:home")) models.py import uuid from django.conf import settings from django.contrib.auth.models import AbstractUser from django.db import models from django.core.mail import send_mail … -
Writing on-request filtering for related objects
Suppose that we have following models class Category(models.Model): name = models.CharField(max_length=254) class Item(models.Model): category = models.ForeignKey(Category, on_delete=models.CASCADE, related_name="categories") name = models.CharField(max_length=254) state = models.ForeignKey(State, on_delete=models.CASCADE) Categories and their items are listed like so def view(request): categories = Category.objects.all() pass {% for category in categories %} {{ category.name }} {% for item in category.items.all %} {{ item.name }} {% endfor %} {% endfor %} In this structure, I want to write on-request filtering for listed 'items'. def view(request): ... queryset = ??? state = request.GET.get('state') if state: queryset = queryset.filter(state__name=state) The problem is defining 'queryset'. Because, Items are listed as related objects of category. Can it be done properly? or Do I need to change design? -
How To Create Password Generator Context In Python Django
Heya I Created Password Generator For Website. But I Want To Add Context In Class Based View. code: class thank_you(OrganizerAndLoginRequiredMixin, generic.TemplateView): template_name = "order_complete.html" password = "" for i in range(5): i = chr(random.randint(0, 90)) j = chr(random.randint(65, 90)).lower() k = random.randint(0, 10) password = str(password) + i + j + str(k) context = { "code": password } -
Django restframework generic viewset not working with get and get detail views with the same url_path and url_name
How can I make two views in a DRF Generic viewset use the same url_paths and url_names provided the make use of the same or different methods but different details value, eg must can both be Get methods but would have details=True and details=False on them sample code for more clarity; @action(methods=["get"], detail=False, url_path="users", url_name="users") def get_users(self, request): # code here @action(methods=["get"], detail=True, url_path="users", url_name="users") def get_user(self, request, id): # code here get_users work with this endpoint -> {{base_url}}/{{prefix}}/users get_user does not work with -> {{base_url}}/{{prefix}}/{{user-id}}/users but if I change the url_path and url_name to something else eg -> single-user then the endpoint for getting a single user works -> {{base_url}}/{{prefix}}/{{user-id}}/single-user how can I solve this to make the users and user have the same url_name and url_path because the actions have detail as False(users) and True(user) for both of them respectively NB; Also please not that this viewset does not make use any model -
How shoud i schedule my Views templates in django?
I need to run my view for specific time in my schedule days. how I can make it ? -
AssertionError when trying to render API data using djangorestframwork?
I am trying to build a function API using djangorestframwork But I have this error Cannot apply DjangoModelPermissionsOrAnonReadOnly on a view that does not set.querysetor have a.get_queryset()method. This is me API function @api_view(('GET',)) @renderer_classes((TemplateHTMLRenderer, JSONRenderer)) def course_api(request): if request.method == 'GET': queryset = Course.objects.all() serializer = CourseNameSerializers(queryset, many=True) return Response(serializer.data, template_name='api.html') when i delete first line and second line another error occurs and this error is .accepted_renderer not set on Response -
how to fix error app crushed in heroku django deployment
help me? State changed from up to crashed 2021-09-29T09:08:18.695873+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=djangobiometricattendance.herokuapp.com request_id=5b33c9ac-8ee3-4561-9371-b38c48c96485 fwd="197.156.124.125" dyno= connect= service= status=503 bytes= protocol=https 2021-09-29T09:08:19.089718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=djangobiometricattendance.herokuapp.com request_id=20c87f7c-0f11-42fd-9a49-f5ce4014b8e3 fwd="Ip address" dyno= connect= service= status=503 bytes= protocol=https 2021-09-29T09:08:22.090343+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=djangobiometricattendance.herokuapp.com request_id=a7d7a82b-1852-4227-b182-4beb53156cb8 fwd="ip address" dyno= connect= service= status=503 bytes= protocol=https 2021-09-29T09:08:22.521606+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=djangobiometricattendance.herokuapp.com request_id=76b0a044-7296-4fa9-bd45-3c7cd7449285 fwd="197.156.124.125" dyno= connect= service= status=503 bytes= protocol=https