Comments (8)
Hello Austin,
All seem to be fine. Can you please show the console logs in Developer tools of your browser, also attach the logs from the command prompt of Django Server?
Meanwhile, follow this guide if not already https://djangopy.org/learn/dynamically-filter-queryset-with-ajax-and-drf
from dynamic_filter.
Hi Jai Singhal,
I'm Austin's friend.
Here are the console logs in Developer tools:
ReferenceError: $ is not defined wine.js:3:1
http://localhost:8000/static/aspire/wine.js:3
[Exception... "Favicon at "http://localhost:8000/static/aspire/images/favicon.ico" failed to load: Not Found." nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest :: line 199" data: no]
onStopRequest resource:///modules/FaviconLoader.jsm:199
next self-hosted:1210
TypeError: document.getElementById(...) is null emicalc-loader.min.js:6:99
onload https://emicalculator.net/widget/2.0/js/emicalc-loader.min.js:6
Here are the logs from the command prompt :
<QuerySet [<Property: Pyramid Elevation>, <Property: Pyramid Carnations>, , <Property: Salapuria Adonis>]>
C:\Users\Nithesh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\res
t_framework\pagination.py:198: UnorderedObjectListWarning: Pagination may yield
inconsistent results with an unordered object_list: <class 'aspire.models.Proper
ty'> QuerySet.
paginator = self.django_paginator_class(queryset, page_size)
[08/May/2019 09:09:14] "GET /aspire/featured-projects/ HTTP/1.1" 200 21320
Not Found: /aspire/featured-projects/details.css
[08/May/2019 09:09:14] "GET /aspire/featured-projects/details.css HTTP/1.1" 404
5743
Not Found: /aspire/featured-projects/details.css
[08/May/2019 09:09:14] "GET /aspire/featured-projects/details.css HTTP/1.1" 404
5743
from dynamic_filter.
Have you included the jquery library. Try changing the version of jquery
from dynamic_filter.
Yes, I have added this.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>Sometimes I see "No results found" as a message and if I change jquery version, I see "Something went wrong" message.
from dynamic_filter.
There is something wrong in writing the Javascript, please check your Javascript code and try to remove the errors from console log.
from dynamic_filter.
Hi Jai Singhal,
Dropdown is working fine now. It displays all the fields in the database.
But content is not getting displayed below.
In Console it says, 404 not found for this URL
http://localhost:8000/aspire/featured-projects/?region=&status=&format=json
But I'm getting success for these 2 urls,
http://localhost:8000/aspire/ajax/area/
http://localhost:8000/aspire/ajax/status/
from dynamic_filter.
Check the endpoint of the api which you have created, and try using POSTMAN for validating the API
from dynamic_filter.
I am closing this issue. If you have furthermore queries, feel free to comment on https://djangopy.org/learn/dynamically-filter-queryset-with-ajax-and-drf
from dynamic_filter.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic_filter.