Can I store a Django model in an ElasticSearch index?
If yes, then how can I do that?
The question is really generic question and I don't know you checked the following pages or not. Here are some resources for you to check how you can do it :
[Github] Django Elasticsearch DSL is a package that allows indexing of django models in elasticsearch. https://github.com/django-es/django-elasticsearch-dsl
[Article] How to Use ElasticSearch With Django - https://medium.com/geekculture/how-to-use-elasticsearch-with-django-ff49fe02b58d
[Article] How to use Elasticsearch with Django https://sunscrapers.com/blog/how-to-use-elasticsearch-with-django/
Related
I am working on already existing data on relational database. Now question is that how to build models and how to update the tables with new data coming from user (technically django forms)?
Django natively supports creating models for and working with existing data. From the documentation:
Integrating Django with a legacy database
Django will still need to create several of its own tables, but will adapt to use your existing tables. From the doc, you can auto-create models like this:
python manage.py inspectdb > models.py
You'll need to determine whether you want to manage updates to the table structure, but that's getting into details that will be specific to your project.
Can I use Firestore with django python being firestore a non-relational database? if it is not the case, Django-non-rel is the option?
I had the same question and found a library called django-firebase-orm. I assume it'll map Django's relational model onto firestore.
I want to build forms and models with dynamic fields like Google Form. But I don't know what type of model.Fields use for this task.
I using Postgres and I thinking about something like Hstore or ArrayField, but I'm not sure.
What is the best solution for this?
There are few solutions available for your task:
EAV (Entity-Attribute-Value) model with django-eav package.
Postgresql HSTORE field but it supports only string type of values.
Postgresql JSON field.
If you use modern PostgreSQL version (9.3+) you should use PostgreSQL JSON fields because JSON supports different data types.
I'm currently struggling with django admin and mongodb, I found some solutions about combining django admin and mongodb, but none of them is perfectly integrated with django admin. What I need is that I can do CRUD to mongodb tables in admin site like I use MySQL.
mongonaut : besides mapping to mongodb tables, mongonaut has permissions to do CRUD, but I don't know how to integreted mongonaut into django admin index page, mongonaut has its own page and css style to do CRUD.
mongoadmin : lack of permissions management is why I skipped it.
I am new to django,could anyone tell me what is your solution to integrated django admin and mongodb, thanks a lot !
I would like to map some of the field available in my companies Active Directory to my Django Application like department, Job Title so on. I am using the Django_auth_ldap for backend authentication and it copies the data and updates the record in the Django application Database. Since, Django Auth User table does not support these attributes what will be your suggestions of doing it? Please let me know if you need any more information.
Read here, map AD profile attributes to the django profile.
http://packages.python.org/django-auth-ldap/#user-objects
Here is documentation from django https://docs.djangoproject.com/en/dev/topics/auth/customizing/. Have you tried googling? There is already lot of info available for this.