I'm working on a Django Rest Framework project. I successfully implemented Elasticsearch dsl within my project. I indexed and synced all my models with Elasticsearch.
Now I can fetch my data both with Elasticsearch (and make searches on it) and with Django Rest Framework.
I want to know what is better to fetch data : DRF or Elasticsearch.
Thx
Depends... Elasticsearch is the quickest way to fetch data as it's NoSQL but to perform complex query you might want to use DRF/Python.
It relies on your requirement.
Related
I wanna to write e-commerce website on django.
My project will have two DBs:
PostgreSQL (For storing users data, django tables, orders handling etc)
MongoDB (For storing Products and their categories)
Django works well with Relational DBs, but working with NoSQL DBs in Django it's so painfully.
FastAPI has good NoSQL DBs support.
And I wanna to use Django and FAST API in one project.
If you have solution of my problem, please drop me a link to solution.
Maybe will be better if I'll use them separately (1 django server and 1 Fast API server) and
frontend will request data from 2 different servers?
I want to write a script a to migrate data from one table to another using gin golang. The dataset is quite big so I can't create an API endpoint and do it as it will get timed out. I am looking an equivalent of django admin commands for golang that can help me to connect to the database easily and perform these task.
I'm implementing a search engine in my Django project with MongoDB. But I have some confusion about choosing between Lucene and ElasticSearch. As mentioned, I'm using MongoDB for storing data. Anyone, please give me the technical reason for choosing Lucene over ElasticSearch. Which one is better for indexing and analytics as well.
(Disclaimer : I'm just getting started with Django, and with web dev in general)
I have a backend app that stores different kinds of resources. Some are public and some are private. The application is accessible only to identified users. A GraphQL API allows me to access the resources.
On another server, I'd like to create a website that will be accessible to everyone. I want to use Django to create it.
The website will display a list of resources tagged as "public" in the backend app, with a pagination system and, say, 20 resources by page. The CSS will differ from the backend app and there will be a search section.
From what I understand, I should be able to retrieve the data through the GraphQL API, but I'm a bit confused here. All the documentation and tutos I can find about Django and GraphQL seem to be about setting up a GraphQL API server with Django. All I want to do is to build custom queries and to display them on my different html pages.
How can I do that? Where should I start?
You should connect your project with a GraphQL client. As per my research, I have found that there are implementations and examples for graphene-mongoengine in Flask (Flask has a direct GraphQL client).
Mongoengine Flask with GraphQL Tutorial
For Django you can check this out
Edit- I was able to get the data from my database with python-graphql-client. Now I am able to display them in my template.
Let me know if this helps
I'm looking for advice choosing a back-end architecture for a web app. In the app, users upload tabular data from multiple files. Their data is then processed, aggregated and visualized. Data is private and each user has their own dashboard.
I believe Cube.js is an excellent choice for the dashboard, but I am wondering what back-end web framework I should integrate it with. I have experience of Django, but would use Express if it had significant advantages.
Thanks for any advice!
Cube.js is designed to run as a microservice. It means there's no requirement for you to use Node.js or Express as a stack for the rest of your backend implementation. However usually you'd need to have separate backend for storing data about users, reports and dashboards if those are dynamic. Cube.js server handles only analytic queries.
Cube.js dashboard templates are designed to work with GraphQL. So any backend web framework where there's a solid support of GraphQL will be a good choice. Most notable ones in Node.js world are apollo-server, Prisma, Hasura. Seems like Python has it's own champion as well: https://github.com/graphql-python/graphene.