Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Return AJAX message after view has been performed
I have a Django project on which I am uploading files to a sql server. I would want to show only a text message when the operation has been succeded, without refreshing the page I did not succeed to corelate the view with the AJAX and HTML form. views.py: def upload(request): if request.method == "POST": try: form = UploadFileForm(request.GET, request.FILES["excel_file"]) file = request.FILES['excel_file'] Import_Resource = resources.modelresource_factory(model=item)() dataset = tablib.Dataset() if not file.name.endswith('.xlsx'): messages.error(request, 'This is not a excel file!') if filename1 in file.name: imported_data = dataset.load(file.read(), format='xlsx') item.objects.filter(input_type = 'traitement').delete() for row in dataset: ITEM2 = item() ITEM2.input_type = 'traitement' ITEM2.no_incident = row[1] ITEM2.action = row[2] ITEM2.week = row[4] ITEM2.status = row[5] ITEM2.assigned_by_group = row[6] ITEM2.description = row[0] ITEM2.previous_group = row[7] if isinstance(row[3], float): ITEM2.date_action = datetime.fromordinal(datetime(1900, 1, 1).toordinal() + int(row[3]) - 2) else: ITEM2.date_action = row[3] if isinstance(row[8], float): ITEM2.date_end = datetime.fromordinal(datetime(1900, 1, 1).toordinal() + int(row[8]) - 2) else: ITEM2.date_end = row[8] ITEM2.save() data = { 'file': file.name } return JsonResponse(data) urls.py: url(r'^input/$', views.inputprocess, name='inputprocess'), html file: <form action="{% url "upload" %}" method="POST" enctype="multipart/form-data" class="form-inline" style="margin-left: 50px"> <div class="form-group mb-2"> {% csrf_token %} <input type="file" name="excel_file" id="excel_file" required="True"> </div> <div class="form-group mb-2"> <button class="btn btn-primary" id="likebutton2"> <span class="glyphicon glyphicon-upload"></span>Upload</button> … -
How to get the content type model name using the slug field
I would like to get the model name using the slug field. This is a module table. Each module having different tables. So I would like to create a global function for inline grid editing . But for that I need a modal name according to the modules. So I can pass the slug name through java script. But I need to filter the content type models using the slug field Here is my code class Module(BaseModel, SoftDeletionModel): id = models.AutoField(primary_key=True) name = models.CharField( _("Module Name"), max_length=50, default=False, unique=True) slug = models.SlugField(unique=True) display_name = models.CharField( _("Display Name"), max_length=50, default=False) content_type = models.ForeignKey(ContentType, blank=True, null=True, on_delete=models.CASCADE) parent_module_id = models.ForeignKey("Module", blank=True, null=True, on_delete=models.CASCADE) order = models.IntegerField(_("Order"), default=0, blank=True, null=True) class Meta: db_table = 'modules' def __str__(self): return "{0}".format(self.display_name) -
Get instance of a model to be used as foreign key to add data to other model in Django
I have a relationship model that maps two models that is my user and its position as mentioned. Here Emp_position is that relationship model. class Position(models.Model): position_name = models.CharField(max_length=20, unique=True) def __str__(self): return self.position_name class Emp_position(models.Model): emp_uname = models.OneToOneField(User, related_name='emp_name', to_field='username', on_delete=models.CASCADE) position_name = models.ForeignKey(Position, related_name='position', to_field='position_name', on_delete=models.CASCADE) def __str__(self): return str(self.emp_uname) + " " + str(self.position_name) Now to insert data to Emp_position I need instance of user and Position. I was able to get the user model instance easily using the user.username field but how do I get instance of position. The position instance, I am deriving using some logic by using the filter function. How do I get the instance which function helps me in getting the instance using some condition. Here is what I have tried : emp_pos = Emp_position(emp_uname = user, position_name = Position.objects.filter(position_name="COMES FROM LOGIC").first() emp_pos.save() But this is not saving the model. -
How to exclude a foreign's key field from a form
Having my models Yacht and Offer, I created an intermediate table OfferHasYacht in order to connect a yacht with an offer. I have already created instances for both models. I want to exclude in my form the field date_created from the Offer model because when I am trying to included it in my form it gives an error of : TypeError: __str__ returned non-string (type datetime.datetime) In order to avoid this, I want to exclude only this field and not the notes field from my offer model. How can I do that? models.py class Yacht(models.Model): name = models.CharField(max_length=50, verbose_name="Name") price_per_day=models.DecimalField("Price(€) / Day", max_digits=8, decimal_places=2, default=0,blank=True) passengers = models.IntegerField("Passengers",blank=True,null=True) def __str__(self): return self.name class Offer(models.Model): date_created = models.DateTimeField("Date of Offer", null=True,blank=True, default=datetime.datetime.now) notes=models.CharField("Notes",max_length=100, blank=True) def __str__(self): return self.date_created class OfferHasYacht(models.Model): offer=models.ForeignKey(Offer,null=True,verbose_name="Offer",on_delete = models.CASCADE) yacht=models.ForeignKey(Yacht,null=True,verbose_name="Yacht",on_delete = models.CASCADE) def __str__(self): return self.yacht.name forms.py class OfferHasYachtForm(ModelForm): class Meta: model = OfferHasYacht #exclude=('',) fields = ('yacht','offer',) With this solution it raises the error :TypeError: str returned non-string (type datetime.datetime) How can I exclude the date_created field of Offer model? -
Retrieving information from a POST without forms in Django
I'm developing something like an API (more like a communications server? Idk what to call it!) to receive data from a POST message from an external app. Basically this other app will encounter an error, then it sends an error ID in a post message to my API, then I send off an email to the affected account. My question is how do I handle this in Django without any form of UI or forms? I want this to pretty much be done quietly in the background. At most a confirmation screen that the email is sent. I'm using a LAMP stack with Python/Django instead of PHP. -
django form with dynamic queryset ModelMultipleChoiceField
I'm trying to pass a queryset to a forms ModelMultipleChoiceField as an initial value. I want to send a filtered queryset as all the choices and an initial selection. It seems to fail is_valid. Can anyone tell me what I'm doing wrong? forms.py class sendListForm(forms.Form): recipients = forms.ModelMultipleChoiceField(queryset = CustomUser.objects.all()) title = forms.CharField(max_length=100,required=True) description = forms.CharField(max_length=500,required=False,widget=forms.Textarea(attrs={'cols': 20, 'rows': 4})) extraInfo = forms.CharField(max_length=500,required=False, help_text='Add a message to send',widget=forms.Textarea(attrs={"rows":4, "cols":20}),label='Extra Message') startDate = forms.DateField(required=False,widget=forms.HiddenInput()) startTime = forms.TimeField(required=False,widget=forms.HiddenInput()) endDate = forms.DateField(required=False,widget=forms.HiddenInput()) endTime = forms.TimeField(required=False,widget=forms.HiddenInput()) yearName = forms.CharField(widget=forms.HiddenInput()) def __init__(self, *args, **kwargs): recipients = kwargs.pop('recipients') super(sendListForm, self).__init__(*args, **kwargs) self.fields['recipients'] = forms.ModelMultipleChoiceField(queryset=recipients) views.py def eventSendList(request, modelPk=None): event = get_object_or_404(Event, pk=modelPk) if request.method == 'POST': form = sendListForm(request.POST,recipients=CustomUser.objects.all()) if form.is_valid(): print('valid') baseInfo = { 'recipients':recipients, 'title':event.title, 'description':event.description, 'startDate':event.startDate, 'startTime':event.startTime, 'endDate':event.endDate, 'endTime':event.endTime, 'yearName':event.yearName.name, } classParents = CustomUser.objects.all() form = sendListForm(initial=baseInfo,recipients=classParents) return render(request, 'page/sendListForm.html',{'form':form}) It never gets past the "if form.is_valid():" in the view. -
contactus() got an unexpected keyword argument 'name'
I have created a contact form and fields are name, email, and dropdown.When I am submitting a form then I a getting error but If I print(name) then it's displaying on the terminal. contactus() got an unexpected keyword argument 'name' Would you help me out with this? contatus.html <form action="/contactus/" method="post"> {% csrf_token %} <div class="input-block"> <input id="name" name="name" type="text" placeholder="your full name" class="form-control"> </div> <div class="input-block"> <select name="year" id="year" class="form-control"> <option selected disabled>no of Year</option> <option value="1">1 Year</option> <option value="2">2 Year</option> </select> </div> <div id="reachEmail" class="input-block"> <input id="email" name="email" type="email" class="form-control" placeholder="email"> </div> <input type="submit" name="Send" value="SEND"> </form> view.py def contactus(request): if request.method=="POST": name=request.POST.get('name','') year=request.POST.get('year','') email=request.POST.get('email','') contact=contactus(name=name,year=year,email=email) contact.save(); return render(request,'demo1/contactus.html') Model.py class contactus(models.Model): id=models.AutoField(primary_key=True) name = models.CharField(max_length=30) year = models.CharField(max_length=30) email = models.CharField(max_length=30) admin.py from .models import contactus admin.site.register(contactus) -
Guidance on the best up-to-date tutorial for integrating Django + Webpack + VueJS + Vue-Cli
I would like to have guidance on which is the best up-to-date tutorial for integrating Django + Webpack + VueJS + Vue-Cli. I have successfully gone through the following tutorials. Just wanted to know, which of these are recommended or is there any other latest tutorial/method that I need to keep in mind before proceeding. https://github.com/michaelbukachi/django-vuejs-tutorial/wiki/Django-Vue.js-Integration-Tutorial https://medium.com/@rodrigosmaniotto/integrating-django-and-vuejs-with-vue-cli-3-and-webpack-loader-145c3b98501a https://www.jamesbaltar.com/django-webpack https://ariera.github.io/2017/09/26/django-webpack-vue-js-setting-up-a-new-project-that-s-easy-to-develop-and-deploy-part-1.html Your guidance would be appreciated. -
Django query to Postgres returning wrong column
I'm facing a strange problem maybe related with some cache that I cannot find. I have the following Models: class Incubadores(models.Model): incubador = models.CharField(max_length=10, primary_key=True) posicion = models.CharField(max_length=10) class Tareas(TimeStampedModel): priority = models.CharField(max_length=20, choices=PRIORITIES, default='normal') incubador = models.ForeignKey(Incubadores, on_delete=models.CASCADE, null=True, db_column='incubador') info = JSONField(null=True) datos = JSONField(null=True) class Meta: ordering = ('priority','modified','created') I previously didn't have the argument db_column, so the Postgres column for that field was incubador_id I used the argument db_column to change the name of the column, and then I run python manage.py makemgrations and python manage.py migrate, but I'm still getting the column as incubadores_id whenever I perform a query such as: >>> tareas = Tareas.objects.all().values() >>> print(tareas) <QuerySet [{'info': None, 'modified': datetime.datetime(2019, 11, 1, 15, 24, 58, 743803, tzinfo=<UTC>), 'created': datetime.datetime(2019, 11, 1, 15, 24, 58, 743803, tzinfo=<UTC>), 'datos': None, 'priority': 'normal', 'incubador_id': 'I1.1', 'id': 24}, {'info': None, 'modified': datetime.datetime(2019, 11, 1, 15, 25, 25, 49950, tzinfo=<UTC>), 'created': datetime.datetime(2019, 11, 1, 15, 25, 25, 49950, tzinfo=<UTC>), 'datos': None, 'priority': 'normal', 'incubador_id': 'I1.1', 'id': 25}]> I need to modify this column name because I'm having other issues with Serializers. So the change is necessary. If I perform the same query in other Models where I've also … -
Django 2.1 : Render JSONresponse to template, byte string doesn't work with javascript
In view: response = JsonResponse(available_lessons, safe=False) In template: var available_lessons_json = {{available_lessons_json.content|safe}} In my source js file I see: var available_lessons_json = b'{"courses": {"courseName": "Everyday English", "lessons": ["Phrasal Verbs I", "Phrasal Verbs II", "Phrasal Verbs III"]}}' which is giving me the error "Uncaught SyntaxError: Unexpected string" -
set value of new field depending on other field
i want setting value of new field depending on other field . First Try: my model.py: class Post(Model): title = models.CharField( max_length=100) like_count = models.IntegerField(default=0) and now i want adding new field to Post's model that shown me is post liked yet or not: class Post(Model): title = models.CharField( max_length=100) like_count = models.IntegerField(default=0) like_status = models.BooleanField(default=False if str(F('like_count')) == 0 else True) after running migration ,all value of like_status is True while exist some Post's object with like_count=0 second try: adding like_status with False default value: class Post(Model): title = models.CharField( max_length=100) like_count = models.IntegerField(default=0) like_status = models.BooleanField(default=False) then trying updating like_status field : Post.objects.all().update(like_status=True if F('like_count')>0 else False) the error: '>' not supported between instances of 'F' and 'int' and trying : Post.objects.all().update(like_status=True if int(F('like_count'))>0 else False) error: int() argument must be a string, a bytes-like object or a number, not 'F' i can achieve my goal by running script but i want know the way of doing this process without scripting.thank you for your time -
Django: How to ignore parts of code in a function when testing
I don't care what some_other_functipn_2 and some_other_function does. I just need to assert that test_target is called. This is a simplified version of my code. I know this can be done by patching but my code just has too many parts to patch. Is there anyway to ignore everything else except the target? def abc(): a = some_other_function() b = some_other_functipn_2(a) test_target(b) -
Django Angular Social Medial authentication
I am working on app where user can log-in using your Facebook or any social media account in angular side. I am comfortable with the django framework and AngularJS. But in my application user can only login r signing with social media account. so how do I manage authentication mechanism with facebook. I am expecting some direction so that I can go forward with the app. -
Form data not saving in databse in Django
I have a test from which needs to be save in database. When I submit the form it does not save anything in database. If anyone can review my code and check what's wrong inside the code that's stopping the form to save in database. **Model** class test(models.Model): testname = models.CharField('Name', max_length=50, help_text='Co-worker name.', default='') testPicture = models.ImageField('Co-Worker Picture', upload_to='../media/images/co-woker-pictures' , help_text='Co-worker Picture.', default='', null=True, blank=True) joiningDate = models.DateField('Joining Date', help_text='Joining Date of Co-worker', default=datetime.date.today, ) **form** class testForm(forms.ModelForm): testname = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control formInput', })) testPicture = forms.ImageField(widget=forms.FileInput(attrs={ 'class': 'form-control formInput', })) joiningDate = forms.DateField(widget=forms.DateInput(attrs={ 'class': 'form-control formInput', 'id': 'datePicker', })) class Meta: model = test fields = ['testname', 'testPicture', 'joiningDate'] **view** def test(request): if request.method == 'POST': form = testForm(request.POST, request.FILES) if form.is_valid(): u = form.save() messages.success(request, 'test successful.') return redirect('test', ) else: form = testForm() c = context = ({ 'form': form, }) return render(request, 'test.html', c) -
when to use BaseFilterBackend in django?
I am new to Django and was trying to understand the use of BaseFilterBackend. Why and when to use? class test(APIView): class SimpleFilterBackend(BaseFilterBackend): def get_schema_fields(self, view): return [coreapi.Field(name='Area', location='query', required=False, type='string'), coreapi.Field(name='Quarter', location='query', required=False, type='string'), coreapi.Field(name='Role', location='query', required=False, type='string')] filter_backends = (SimpleFilterBackend) -
Error (AppRegistryNotReady) running test cases with Django inside a Docker container using PyCharm
I read a similar solution posted here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360002753800-Django-console-not-working-properly-on-docker And I have implemented the above solution. The strange thing is I can open a Django Console in PyCharm without error. And I've confirmed that the Django Console is running inside my Docker container by executing the following: >>> import socket >>> socket.gethostname() 'f6f418ce5d14' I have an entry point script (bash script), which executes the following inside the Docker container without error: python manage.py migrate python manage.py loaddata --format json /srv/app/api/opp/management/fixtures/dev.json But, when PyCharm attempts to execute the test cases, using PyCharm's own nose test runner, that's when the error appear. The following is an excerpt from PyCharm's output when running the Django test cases using a Docker container: app_1 | Installed 127 object(s) from 1 fixture(s) app_1 | app_1 | Launching Nosetest with arguments /opt/.pycharm_helpers/pycharm/_jb_nosetest_runner.py /srv/app/api/opp/tests in /srv/app/api app_1 | app_1 | app_1 | app_1 | app_1 | app_1 | app_1 | app_1 | app_1 | error in setup context Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/nose/suite.py", line 210, in run self.setUp() File "/usr/local/lib/python3.8/site-packages/nose/suite.py", line 293, in setUp self.setupContext(ancestor) File "/usr/local/lib/python3.8/site-packages/nose/suite.py", line 316, in setupContext try_run(context, names) File "/usr/local/lib/python3.8/site-packages/nose/util.py", line 471, in try_run return func() File "/usr/local/lib/python3.8/site-packages/django/test/testcases.py", line 1131, in setUpClass … -
How can you manage content on a website built with Angular and django REST API as the backend?
I'm working on a web application that is powered by Angular and django REST framework on the back-end, everything works fine for the dynamic data but my website has content that needs to be updated regularly, i have been using django-cms to manage content previously but i'm not sure how to manage the content on SPA's. -
How to add a custom action function using Django DRF viewset.Viewsets?
I have a viewset that I created an @action decorated function. class StoreOffersViewSet(viewsets.ViewSet): """Viewset for yoga stuff.""" @action(detail=False, methods=['put'], name='yoga update') def update_yoga(self, request): # Get Kwargs passed params = self.kwargs In my urls, I have: router = DefaultRouter(trailing_slash=True) router.register(r'yoga', views.StoreOffersViewSet, basename='yoga') urlpatterns = router.urls I would like that when a user has a PUT request to site.com/yoga, my update_yoga function is called. As it stands now, I get the following error: { "detail": "Method \"PUT\" not allowed." } My guess is that this is because for the default router, GET and POST already have the url style from the docs, https://www.django-rest-framework.org/api-guide/routers/#defaultrouter. So I am not too sure how to proceed. I am on django 3.8> -
crispy_forms.exceptions.CrispyError: |as_crispy_field got passed an invalid or inexistent field
I am working on a django application. In the application there exists a contribution form. I created the form with django models and django forms. But when I try to run the application, I get the following error. crispy_forms.exceptions.CrispyError: |as_crispy_field got passed an invalid or inexistent field I am not sure what I am doing wrong. django models.py CONTRIBUTE_CHOICE = ( ('Books', 'Books'), ('Renovation', 'Renovation'), ('Other', 'Other'), ) class Contribute(models.Model): firstName = models.CharField(max_length=50) lastName = models.CharField(max_length=50) email = models.EmailField(max_length=100) contribution = models.CharField(max_length=100, choices=CONTRIBUTE_CHOICE) def publish(self): self.save() def __str__(self): return self.firstName django forms.py from .models import Contribute CONTRIBUTE_CHOICE = ( ('Books', 'Books'), ('Renovation', 'Renovation'), ('Other', 'Other'), ) class ContributeForm(forms.ModelForm): contribution = forms.ChoiceField(choices=CONTRIBUTE_CHOICE, required=True ) class Meta: model = Contribute widgets = { 'firstName': forms.TextInput(attrs={'placeholder': 'First Name'}), 'lastName': forms.TextInput(attrs={'placeholder': 'Last Name'}), 'email': forms.TextInput(attrs={'placeholder': 'Email'}), } fields = ('firstName', 'lastName', 'email', 'contribution') django views.py from .forms import ContributeForm def donate(request): if request.method == "POST": contributeForm = ContributeForm(request.POST) if contributeForm.is_valid(): post = contributeForm.save(commit=False) post.save() return redirect('home') else: contributeForm = ContributeForm() context = {'contributeForm': contributeForm} return render(request, 'index.html', context) return render(request, 'donate.html') donate.html tempate <form class='contribution_form' method="post"> {% csrf_token %} <div class="row"> <div class="col"> {{ contributeForm.firstName|as_crispy_field }} </div> <div class="col"> {{ contributeForm.lastName|as_crispy_field }} </div> </div> … -
Can i host only a python script directly on heroku without putting the script inside a django app?
i have a python script that needs to run on the heroku but its a pure python script and not a django app yet, so i wondering if i can run python script on heroku without putting it into a django app . I already have the script on heroku but i dont know how to execute it. -
How to fix XLConnect's java.lang.NullPointerException on page refresh
I'm using rpy2 to to use R in python, specifically to use XLConnect package. The reason is because I want to read password protected excel file. Other packages are limited both in R and python as I'm using Linux. So, I've successfully load the excel file now using XLConnect. However everytime I try to refresh my Django project, instead of loading the data it returns java.lang.NullPointerException. It works on the first load, then when I refresh the page, the error immediately pop out. Yet, after i left it without refresh for a few mins and refresh the page again, it works normally. The error just happened to immediate page refresh. It's so frustrating, i thought the error was caused by the error of reading cell (XLConnect's onErrorCell), however that's just warning. The line which caused the problem is on assigning the loadWorkBook to a variable. import rpy2.robjects as rob from rpy2.robjects.packages import importr xlc = importr('XLConnect') xlc_2 = importr('XLConnectJars') string = """ wb <- loadWorkbook("my_file_path_here", create=FALSE, password="ddd") """ powerpack = SignatureTranslatedAnonymousPackage(string, "powerpack") I expect the r code to load again as per normal and read the excel file. -
How to use @property in Django models?
I want to add one subquery to my query. And I created a @property in Transaction. I do not fully understand how they work. How to use it? views.py(Query) paymentsss = Transaction.objects.all().select_related('currency', 'payment_source__payment_type', 'deal__service__contractor',). models.py class PayerPaymentSource(models.Model): id = models.BigIntegerField(blank=True, null=False, primary_key=True) payer_id = models.BigIntegerField(blank=True, null=True) payment_type = models.ForeignKey(PaymentType, max_length=64, blank=True, null=True, on_delete=models.CASCADE) source_details = models.TextField(blank=True, null=True) # This field type is a guess. class Meta: managed = False db_table = '"processing"."payer_payment_source"' class Transaction(models.Model): id = models.BigIntegerField(blank=True, null=False, primary_key=True) currency = models.ForeignKey(Currency, null=True, on_delete=models.CASCADE) deal = models.ForeignKey(Deal, null=True, on_delete=models.CASCADE) # service_instance = models.ForeignKey(ServiceInstance, null=True, on_delete=models.CASCADE) payment_source = models.ForeignKey(PayerPaymentSource, null=True, on_delete=models.CASCADE) payment_date = models.DateTimeField(blank=True, null=True) amount = models.IntegerField(blank=True, null=True) status = models.CharField(max_length=255, blank=True, null=True) context = models.TextField(blank=True, null=True) @property def bank_card_details(self): return PayerPaymentSource.objects.filter(self.payment_source.source_details, payment_type='bank_card_details') class Meta: managed = False db_table = '"processing"."transaction"' -
Attach headers to redirect in Django
In my view, I want to redirect to a URL (which points to a hosted image) but also add the User-Agent header to that GET request (to avoid 403 errors when redirecting to some URLs). I've explored two options: The redirect(url) Django function. Is there a way to somehow add on headers? Using the requests library: r = requests.get(picture.url, headers={'User-Agent': user_agent,}) But then what should I return from my view? return r, return r.content or return json() didn't work for me. Thanks! -
rest framework swagger 'AutoSchema' object has no attribute get_link
I am trying to browse the api documentation of rest framework swagger. but getting error AttributeError: 'AutoSchema' object has no attribute 'get_link I have used django rest framework swagger. but not able to browse the documentation. from django.contrib import admin from django.urls import path, include from rest_framework_swagger.views import get_swagger_view schema_view = get_swagger_view(title='API') urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('auth.urls')), path('docs/', schema_view), ] -
Combine repetitive dictionary in a python list of dictionaries to remove repetition
I want to c join this repetitive dictionaries in my list to remove repetiton: The dict: [{"name": "healthcheck","responseTime": 0.600845,"dateCreated": "11/06/19 13:44"}, {"name": "Stack Overflow","responseTime": 0.849753,"dateCreated": "11/06/19 13:44"}, {"name": "Sample Endpoint","responseTime": 0.559156, "dateCreated": "11/06/19 13:44"}, {"name": "healthcheck", "responseTime": 0.369526,"dateCreated": "11/06/19 08:04"}, {"name": "Stack Overflow","responseTime": 0.928371,"dateCreated": "11/06/19 08:04"}, {"name": "Sample Endpoint","responseTime": 0.535189,"dateCreated": "11/06/19 08:04"}] Expected dict: [ {"name": "healthcheck","responseTime": [0.600845, 0.369526],"dateCreated": ["11/06/19 13:44","11/06/19 08:04"]}, {"name": "Stack Overflow","responseTime": [0.849753,0.928371],"dateCreated": ["11/06/19 13:44","11/06/19 08:04"] }, {"name": "Sample Endpoint","responseTime": [0.559156, 0.535189] "dateCreated": ["11/06/19 13:44","11/06/19 08:04"]} ]