Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Python consuming API (Printful)
I am struggling to find a way to call on JSON generating from the following code. How for example, Can I call a list of "name" available on the JSON? Ps: don't worry about the Printful secret key; this is a test account. import json import requests import base64 key = 'xk7ov0my-t9vm-70z6:y491-2uyygexkkq6r' key = base64.b64encode(bytes(key, 'utf-8')) keyDecoded = key.decode('ascii') header = {'Authorization': 'Basic ' + keyDecoded} r = requests.get('https://api.printful.com/sync/products', headers=header) # packages_json = r.json() test = r.json() print(json.dumps(test, indent=4)) # print(test["name"]) -
How can I use the jquery datepicker with django admin simplelist filter
How can I use Date Picker with django-filter? does it with django-filters but I use SimpleListFilter. I don't know how to incoorporate jquery that well yet. I want to enable the user to select a date in the filterscreen to the right with a calendar widget, which is then checked whether this date is between a given time interval of start date and end date. From what I have found is that the jquery datepicker is a simple solution but you need to be able to incoorporate this. I don't know where I put this code in. I don't use any forms. Or I never used them myself. Not even called them for something. So I wasn't able to incorporate the widget neither. I wouldn't want to use form if that is possible. I know that you can put your static files in the static folder, do collectstatic and then call the .js - File with Class Media: js = ('myapp/static/js/myfile.js',) One thing I couldn't find out was how to read out/write into the date from the DateField. I guessed mydatefield.default() as the shell gave me. But I neither know how to set a custom date with the shell. Any … -
Get all elements from each Max groups in django ORM
I'm trying to group by my django query by line_nm and get the elements of the Max values from the full list in my models.py I tried this solution: dropWorst1 = dropToday.values('line_nm').annotate(worst1=Max('err_ppm')).order_by('line_nm') But it only returns the fields: line_nm, and the new value: worst1 How can I return the full fields from my database table? I'm using Mysql and I tried this other solution: dropWorst1 = dropToday.order_by('-err_ppm','line_nm').distinct('line_nm') However the occurred the follow error: DISTINCT ON fields is not supported by this database backend It because the mysql only allows .distinct() How can I get the other columns from my database? class SmdDropRateCe(models.Model): sumr_ymd = models.DateField(blank=True, null=True) line_nm = models.CharField(max_length=20, blank=True, null=True) shift_code = models.CharField(max_length=10, blank=True, null=True) model_code = models.CharField(max_length=30, blank=True, null=True) equip_id = models.CharField(max_length=30, blank=True, null=True) mat_code = models.CharField(max_length=30, blank=True, null=True) reel_no = models.CharField(max_length=10, blank=True, null=True) err_num = models.IntegerField(blank=True, null=True) pckp_num = models.IntegerField(blank=True, null=True) plac_num = models.IntegerField(blank=True, null=True) err_ppm = models.FloatField(blank=True, null=True) Tks in advance -
Django ORM: how do I apply a function over an aggregate result?
I want to do SELECT [field1], ST_Area(ST_Union(geometry), True) FROM table [group by field1] Or, written in another words, how do I apply a function over an aggregate result? ST_Union is an aggregate. "field1" is an optional groupBy field; Also, ST_Area with 2 arguments seem not to be available on django gis helpers, so it must probably be written using Func. Also, I want to be able to also aggregate by everything (not provide a groupBy) but django seems to add a group by id if I don't provide any .values() to the queryset. This seems very confusing. I can't get my head around annotates and aggregates. Thank you! -
How to retrieve the values from a post request function django views. DRF
I have a function that makes a queryset when data from my frontend is posted. This viewset is using a serializer of combined models. On my index page on the fronted I have a treeview filter and this view loads the query to a config page. I need to access the event id's after this query is made to be passed to a separate task on the backend for polling. However I cannot access the data in this function. How would I get retrieve this query and filter on the data? right now I can't print the queryset to see its structure. class CombinedViewSet(mixins.ListModelMixin, mixins.DestroyModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet): permission_classes = [IsMeOrReadOnly] queryset = Runner.objects.all() serializer_class = CombinedSerializer @action(detail=False, methods=['POST','GET]) def loaditem(self, request): keys = request.data['keys'] queryset = [] for xx in keys: if xx['time_key'] is None: if xx['event_key'] is None: queryset.extend(Runner.objects.filter(event__sport_id=xx['sport_key'])) else: queryset.extend(Runner.objects.filter(event__event_id=xx['event_key'])) else: date_str = xx['time_key'] datetime_obj = datetime.datetime.strptime(date_str, '%d-%m-%y') queryset.extend(Runner.objects.filter(event__start_time__date=datetime_obj, event__sport_id=xx['sport_key'])) serializer_class = CombinedSerializer(queryset, many=True) return Response(serializer_class.data) -
How to display brand name within its category? (DJANGO)
I have a model calss which has brand ...brand class also have foreignkey with category. How to diaplay brand namw according to selected category in forms class Postads(models.Model): owner = models.ForeignKey(User,on_delete=models.CASCADE) ad_title = models.CharField(max_length=255) ad_category = models.ForeignKey(Subcategory, on_delete=models.CASCADE) ad_brand = models.ForeignKey(Brand, null=True, on_delete=models.CASCADE) ad_model = models.CharField(max_length=255, null=True)` class Brand(models.Model): name = models.CharField(max_length =255) sub_category = models.ForeignKey(Subcategory,on_delete=models.CASCADE) slug = models.SlugField(max_length=255,null=True,blank=True) my views.py def createPostAds(request,title): global form choosecateg = get_object_or_404(Subcategory,sub_title=title) if request.method == 'POST': form = PostAdsForm(request.POST) if form.is_valid(): instance = form.save(commit=False) user = request.POST.get('owner') owner = User.objects.get(id = user) instance.ad_title = request.POST.get('ad_title') category_id = request.POST.get('ad_category') category = Subcategory.objects.get(id = category_id) instance.ad_category = category brand = Brand.objects.get_subcategory() print(brand) brand = request.POST.get('ad_brand') brand = Brand.objects.get(id = brand) I have pass category title in url. i want to display brand name within that category title name -
How to Slugify the Category Model in Django?
I'm new to django and currently writting my code in django to create my web project. I want to slugify the category url so i dont have to use the 'int:pk' again to access my post based on category. Here's my code model.py from django.db import models from django.contrib.auth.models import User from ckeditor.fields import RichTextField from django.urls import reverse from django.utils.text import slugify class Category(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(unique=True) class Meta: verbose_name_plural = "Categories" def __str__(self): return self.name def get_absolute_url(self): return reverse('post_by_category', args=[self.name]) def save(self, *args, **kwargs): self.slug = slugify(self.name, allow_unicode=True) return super(Category, self).save(*args, **kwargs) class Post(models.Model): post_title = models.CharField(max_length=50) post_img = models.ImageField(upload_to='postImage/') post_content = RichTextField(blank= True, null = True) category = models.ForeignKey(Category , on_delete=models.CASCADE) post_date = models.DateTimeField(auto_now_add= False,auto_now= False, blank = True) post_author = models.ForeignKey(User, on_delete=models.CASCADE) slug = models.SlugField(unique=True) def save(self, *args, **kwargs): self.slug = slugify(self.post_title, allow_unicode=True) return super(Post, self).save(*args, **kwargs) class Meta: ordering = ["-post_date"] def __str__(self): return f'{self.post_title}' Views.py from django.shortcuts import render, get_object_or_404 from django.views.generic import ListView, DetailView from .models import Post, Category from django.db.models import Q class homeView(ListView): model = Post template_name = 'webpost/home.html' context_object_name = "blog_posts" class postView(DetailView): model = Post template_name = 'webpost/detailPost.html' class SearchView(ListView): model = Post template_name = … -
Django Models Unit Tests: Help for a newbie
Right, this is kind of the last place i would like to have asked due to the question being very vague, but I'm at a loss. Basically, I'm trying to learn how to code and I'm currently working with Django to help me get to grips with the back end of stuff. I keep being reminded of the importance of unit testing so I want to include them in my dummy project that I'm working on so I can begin to understand them early on in my programming journey... only... they seem easy enough on the surface, but are clearly more complicated to a beginner than i gave them credit for. I'm not entirely sure where / if I'm going wrong here, so feel free to poke me and make fun but try point me in the right direction, or to some beginner friendly resources (scoured the internet and there isn't a massive amount of info). My project is a dummy GUI related to policing (hoping to use it in my portfolio in future) Here's the model class I want help with testing. There are others but I want to do those by myself once I know more: class Warrant(models.Model): … -
Continuous Integration django applications best way
I am working on CI using gitlab and I am using something like this stages: - build - test build: stage: build script: - virtualenv env - source env/bin/activate - pip3 install -r requirements.txt - python3 manage.py check test: stage: test script: - virtualenv env - source env/bin/activate - pip3 install -r requirements.txt - python3 manage.py test Is this a good way to do ? and How It will access my env file as I dont want to commit that file . and 3rd thing should I provide DB configurations in it ? or it will make by it self ? -
django.db.utils.OperationalError: (2002, "Can't connect to MySQL server on 'localhost' (10061)")
In Live server My project is running with MYSQL database but when I am working in local server by using postgreSQL database then I am getting this error. Can anybody help me to guide how to solve this issue. Thanks in Advance (venv) D:\bluehorse\goldloan-backend>python manage.py runserver Watching for file changes with StatReloader Performing system checks... .... .... .... return Database.connect(**conn_params) File "D:\bluehorse\venv\lib\site-packages\MySQLdb\__init__.py", line 84, in Connect return Connection(*args, **kwargs) File "D:\bluehorse\venv\lib\site-packages\MySQLdb\connections.py", line 179, in __init__ super(Connection, self).__init__(*args, **kwargs2) django.db.utils.OperationalError: (2002, "Can't connect to MySQL server on 'localhost' (10061)") -
I want to create a favourite view for the favouriting the album can you help me create it
So i want to favourite and unfavourite an album directly from the home page using the button please help me out models.py class Album(models.Model): artist = models.CharField(max_length=250) album_title = models.CharField(max_length=500) genre =models.CharField(max_length=100) album_logo_link=models.CharField(max_length=1000) is_favorite_album = models.BooleanField(default=False) #is_favorite1 = models.BooleanField(default=False) def __str__ (self): return self.album_title+'-'+self.artist class Song(models.Model): album = models.ForeignKey(Album, on_delete=models.CASCADE) file_type = models.CharField(max_length=10) song_title= models.CharField(max_length=250) is_favorite = models.BooleanField(default=False) def __str__ (self): return self.song_title views.py def favSong(request, album_id): #code Also help in creating what should be there in the html file index.html {% extends "fpage/base.html" %} {% block content %} <div class="container pt-5"> <div class="row"> <ul class="d-flex w-100 justify-content-between" style="list-style-type: none"> {% for album in all_albums %} <li> <div class="col"> <img src="{{album.album_logo_link}}" height="200" width="150" /> <h2>{{ album.album_title }}</h2> <a href="{% url 'music:detail' album.id %}" class="btn btn-info" role="button">Details</a> <a href="" class="btn btn-info" role="button">Favourite</a> <a href="{%url 'fpage:album-delete' album.id %}" class="btn btn-info" role="button">Delete</a> <p></p> </div> </li> {% endfor %} </ul> </div> </div> <!-- Footer --> {% endblock %} urls.py path('fav-album/<str:album_id>/', views.favAlbum , name='fav-album') -
how to fix Improperly Configured exception?
i have a django project called mysite, it has 2 apps (projects, blog) i have not added any urls in my blog.urls yet this is my settings.py INSTALLED_APPS = [ 'projects.apps.ProjectsConfig', 'blog.apps.BlogConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] this is my project.urls from . import views urlpatterns = [ path("", views.project_index, name="project_index"), path("<int:pk>/", views.project_detail, name="project_detail"), ] i got this error raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'blog.urls' from 'D:\\firstwebapp\\mysite\\blog\\urls.py'>' does not appear to have any patterns in it. If you s ee valid patterns in the file then the issue is probably caused by a circular import. -
How can I put the PasswordChangeView class into a function?
How can I put the PasswordChangeView class into a function? I know there is a PasswordChangeForm form, but it always fails to be validated. -
How to print django model data with template forloop?
Here I have template for tags, and i want print them all by forloop but with the tag id. e.g: {% for tag in tags %} <div class="row"> <div class="col-md-3 col-sm-6 col-xs-12"> <div class="photo-rounded-fluffs"> <a href="#"> <img class="img-responsive" src="{% static 'assets/img/fluffs/1.jpg'%}" alt="Image"> <h1 class="text-center">{{tag.title}}</h1>#Here i want print tag with tag id 1 </a> </div> </div> <div class="col-md-3 col-sm-6 col-xs-12"> <div class="photo-rounded-fluffs"> <a href="#"> <img class="img-responsive" src="{% static 'assets/img/fluffs/2.jpg'%}" alt="Image"> <h1 class="text-center">{{tag.title}}</h1> #here i want to print tag with id 2 </a> </div> </div> </div> {% endfor%} Right now the both tag title are same because same tag is repeating twice. How can I handle this behavior in forloop in templates.. If more information is required than tell me will update my question with that information. -
Django - allauth: How to remove allauth login and signup urls
I am trying to use Django-allauth for some password resetting functionalities, however, I am trying to disable login/signup with django-allauth. So far I have not been able to find a way to either redirect users to my custom signup and login or completely disable those URLs. I was wondering if there is a workaround on how I can remove those URLs? My current approach was to add all the URLs manually without those, but that is causing an error with my social-login links. Currently, I have added the following to my URLs: url(r"^accounts/logout/$", allauth_views.logout, name="account_logout"), url(r"^accounts/password/change/$", allauth_views.password_change,name="account_change_password"), url(r"^accounts/password/set/$", allauth_views.password_set, name="account_set_password"), url(r"^accounts/inactive/$", allauth_views.account_inactive, name="account_inactive"), # E-mail url(r"^accounts/email/$", allauth_views.email, name="account_email"), url(r"^accounts/confirm-email/$", allauth_views.email_verification_sent,name="account_email_verification_sent"), url(r"^accounts/confirm-email/(?P<key>[-:\w]+)/$", allauth_views.confirm_email,name="account_confirm_email"), # password reset url(r"^accounts/password/reset/$", allauth_views.password_reset,name="account_reset_password"), url(r"^accounts/password/reset/done/$", allauth_views.password_reset_done,name="account_reset_password_done"), url(r"^accounts/password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$",allauth_views.password_reset_from_key,name="account_reset_password_from_key"), url(r"^accounts/password/reset/key/done/$", allauth_views.password_reset_from_key_done,name="account_reset_password_from_key_done"), # social account path('socialaccount/login/cancelled/', allauth_socialviews.login_cancelled,name='socialaccount_login_cancelled'), path('socialaccount/login/error/', allauth_socialviews.login_error,name='socialaccount_login_error'), path('socialaccount/signup/', allauth_socialviews.signup, name='socialaccount_signup'), path('socialaccount/connections/', allauth_socialviews.connections, name='socialaccount_connections'), However, since I have a Google social login I get an error: Reverse for 'google_login' not found. 'google_login' is not a valid view function or pattern name How can I implement this without causing any errors? -
Cant get objects while testing Django 1.8.4
I have a test class, extending TestCase. I have a setUp() method in it, in which I do some preparations for tests in this suite: I create objects in db (using .objects.create(), so its pretty similar to what we have in Django docs). I create an instance of Client, so that I can perform some .post() and .get() requests. So, I perform a request on address specified in urlpatterns. In this endpoint to which I perform request, underneath the hood some query takes place. And the problem is IT CANNOT FIND THE OBJECTS CREATED IN setUp() In debugger, I see that endpoint is resolved correctly, request comes as it should, but when objects.get() or objects.filter() is called (with proper arguments), it cannot find the entry in testing db. -
IMPORTING CSV DATAS INTO MODEL - DJANGO
I'm implementing a list of clients. I want to give to the user the possibility of importing new clients thought a csv file. The client model has these fields: Client, name, surname, email, phone So I created this model: class CsvClient(models.Model): file_name = models.FileField(upload_to='csv-cliente') uploaded = models.DateTimeField(auto_now_add=True) activated = models.BooleanField(default=False) def __str__(self): return f"File id: {self.id}" and this function in views.py: import csv def importa_csv_clienti(request): form = CVSForm(request.POST or None, request.FILES or None) if form.is_valid(): form.save() form = CVSForm() clients = CsvClient.objects.get(activated=False) with open(clienti.file_name.path, 'r') as f: reader = csv.reader(f) for i, row in enumerate(reader): if i==0: pass else: row = "".join(row) row = row(";", " ") row = row.split(" ") client = row[0].capitalize() name = row[1].capitalize() surname = row[2].capitalize() value = Cliente.objects.create( cliente=cliente, nome=nome, cognome=cognome, email=riga[3], telefono=riga[4], ) print('oggetto creato:', value.cliente, value.nome, value.cognome, value.email, value.telefono) clients.activated = True clients.save() context = {'form': form} template = 'importa.html' return render(request, template, context) It works, expect for the fact that if in the csv file I have the row: Nutella Antonio Dello Iudice where nutella is client Antonio is name Dello Iodice is surname and email and phone are blank basically it interprets it as if Dello is the surname and Iudice … -
How to combine two queryset and order them
I have two queryset for two different models. I combined them with chain and ordered them by date. When I want to reverse the order I'm getting an error. Here is my code: def get_queryset(self): query = self.request.GET.get('search') if query: likes = FilmLike.objects.filter(film__title__icontains=query).exclude(users=None) dislikes = FilmDisLike.objects.filter(film__title__icontains=query).exclude(users=None) object_list = sorted(chain(likes, dislikes),key=lambda instance: instance.created_at) else: likes = FilmLike.objects.filter().exclude(users=None) dislikes = FilmDisLike.objects.filter().exclude(users=None) object_list = list(likes) + list(dislikes) object_list = sorted(chain(likes, dislikes),key=lambda instance: instance.created_at) return object_list This code is working but when I change the "instance.created_at" to "-instance.created_at" I'm getting this error: bad operand type for unary -: 'datetime.datetime' -
Django, struggling to make a form
i have a bit of a long question: i really tried and search but i seem to miss a part of the tutorial i watched: i want to make a simple website that allows a user to enter a serial number, and then it redirects the user to a page with a question and a bunch of answers(as buttons perhaps) after a few questions the site will give a page that compares the entered results and the entered serial number with the pre-determined(entered via admin) values and shows a page accordingly. i cant seem to make any progress other than take the serial number and display the number if its on the database... thank you for reading i hope you can help me out. -
Django Internationalization integrating html with js
I'm trying to change the page layout when language redirect form is submitted but it doesn't seem to work this is django's set_language redirect view {% load i18n %} <form action="{% url 'set_language' %}" method="post">{% csrf_token %} <input name="next" type="hidden" value="{{ redirect_to }}"> <select name="language"> {% get_current_language as LANGUAGE_CODE %} {% get_available_languages as LANGUAGES %} {% get_language_info_list for LANGUAGES as languages %} {% for language in languages %} <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}> {{ language.name_local }} ({{ language.code }}) </option> {% endfor %} </select> <input type="submit" value="Go"> </form> and this is how i want it to work <form id="myform" action="{% url 'set_language' %}" method="post"> {% csrf_token %} <input type="hidden" name="next" value="{{ redirect_to}}"> <select name="language" id=""> {% get_available_languages as LANGUAGES %} {% get_language_info_list for LANGUAGES as languages %} {% for language in languages %} <option value="{{ language.code }}" {% if language.code == LANGUAGE_CODE %} selected {% endif %}> {{ language.name_local }} </option> {% endfor %} </select> {% if language.code == "ar" %} <input type="submit" onclick='changeDirection("rtl")' value="GO"> {% endif %} {% if language.code == "en" %} <input type="submit" onclick='changeDirection("ltr")' value="GO"> {% endif %} changeDirection function is working perfectly but i'm trying to integrate it with … -
Registering multiple admin classes with a model in Django admin
I've two Admin classes for a single model: from django.contrib import admin from django_summernote.admin import SummernoteModelAdmin from .models import * class ProductSummernoteAdmin(SummernoteModelAdmin): summernote_fields = ('description',) class ProductAdmin(admin.ModelAdmin): ... admin.site.register(Product, ProductSummernoteAdmin) I want to register both ProductSummernoteAdmin and ProductAdmin with Product model. How to do that? As, i can't register same model twice. -
How to search for the mode of a field in a one to many relationship in django's ORM?
I have this one to Many relationship between dish and restaurant. SPICINESS_CHOICES = ( ("M", "Mild") ("H", "Hot") ("SH", "Super hot") ) class Restaurant(Model): name = models.CharField(max_length=50) class Dish(Model): restaurant = models.ForeignKey(Restaurent) name = models.CharFiedl(null=True, max_length=50) price = models.IntegerField(max_length=10, null= False) spicy = models.CharField(null= True, choices=SPICINESS_CHOICES) I would like to be able to search Restaurants for the most occurring spiciness of their dishes or the mode of the spiciness of their dishes https://en.wikipedia.org/wiki/Mode_(statistics). Django does not seem to have functionality to implement this easily. So let's say we have three restaurants, Anny's, Domino and Verspucie. Anny's has different 8 dishes of which 2 dishes are labeled as being Hot, all other dishes are labeled as Mild, since the owner wants to be able to have a varied menu for children Domino has 9 different dishes of which 5 dishes are labeled as being Hot, 2 as being Super Hot and 2 as being mild. Verspucie has 10 different dishes of which 8 are labeled as being Super Hot, one 1 labeled as Mild and 1 is labeled as Hot. Because I want to find the correct restaurant from a whole list of restaurants, I would like to be able to … -
python manage.py runserver not working pls solve
Watching for file changes with StatReloader Performing system checks... Exception in thread django-main-thread: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/Users/devyanisharma/.local/share/virtualenvs/todoapp-ydZfewgi/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "/Users/devyanisharma/.local/share/virtualenvs/todoapp-ydZfewgi/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 118, in inner_run self.check(display_num_errors=True) File "/Users/devyanisharma/.local/share/virtualenvs/todoapp-ydZfewgi/lib/python3.8/site-packages/django/core/management/base.py", line 442, in check raise SystemCheckError(msg) django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues: ERRORS: ?: (corsheaders.E013) Origin '/' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin '0' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin '0' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin '0' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin '3' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin ':' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin 'a' in CORS_ORIGIN_WHITELIST is missing scheme or … -
Django | The id of the records of more than 1000 have a period
when I use the id of an object that is greater than 1000 on my django template I get a period. For example: {{item.id}} should be 1200 but the ouput is 1.200 How can I solve this? -
How to use aws boto library to test Django website?
I want to test my Django application before deploying using django.test module. Since I'm using DynamoDB for storing my data and all the URL endpoints are programmed using boto3 library to GET and POST data at DynamoDB. How can I test my Django views/url endpoints using boto3? Please comment for any extra information. Thank you!!