Connecting django with oracle database - django

Im a beginner to django.
Someone help to connect Oracle 11g db with django 2.0 in windows. What is the requirements and how to connect and what are the changes to be done.

According to the manual,
Django supports Oracle Database Server versions 12.1 and higher. Version 5.2 or higher of the cx_Oracle Python driver is required.
You may run in to trouble with version 11g -- but if you want to give it a shot, that link has the instructions.

Related

Connect to Sybase database from Django

I tried to connect to Sybase database from Django using sqlanydjango, but
I have stuck. One answer saying that
sqlany-django is no longer maintained; it was last updated in May 2016.
What is the other possibility to connect to Sybase database?
OS Ubuntu 18.04
django 2.2.4
Sybase is no longer maintained and it's not supported by Django. I recommend using one of the supported databases:
PostgreSQL
MariaDB
MySQL
Oracle
SQLite
Personally, I would recommend using PostgreSQL - I think it's the most advanced database. If you use it, I would recommend using version 13, since version 14 is still new and I think it's not officially supported by Django yet. It's always a good practice to use the previous major release. Also with Django, I recommend upgrading to the latest major release only about 4 to 6 months after its initial release. So for today, this means using Django 3.2 (latest minor release, currently 3.2.11).
You can use django-environ to define the database you are using in settings.
You could use the freetds module. GitHub repository was active 5 days ago, it aims to provide support for sybase and MSQL Server.
I used it with MSQL
You can download it from there, and installing with the instruction on this link (Sybase python module website)
Then you can test your installation using these steps
You can also try different Django version.
If this doesn't show anything wrong, and Django still won't connect to your DB, you can try to edit Django's source files so the ImproperlyConfigured exception doesn't raise (REALLY REALLY RISKY, DO A BACK UP OF YOUR DB) or migrate your Sybase to a supported database.
You can use pyodbc.
To install this.
Pip install pyodbc
import pyodbc
cnxn = pyodbc.connect(‘DRIVER={Devart ODBC Driver for ASE};Server=myserver;Port=myport;Database=mydatabase;User ID=myuserid;Password=mypassword;String Types=Unicode’)
For reference:-
https://medium.com/#sharma.jayant1992/best-way-to-connect-python-with-sybase-database-76445713efaf

Django versions and database support (MariaDB)

Based on the release notes of Django, it seems that:
Support for Mysql 5.5 is dropped in Django 2.1
Support for MariaDB 10.1 and higher is added in Django 3.0
We currently use Django 2.0 with MariaDB 5.5, we'd like to upgrade to Django 3.0 and MariaDB 10.4.
What would be the suggested upgradepath to get to the latest version of Django and MariaDB?
Is Django 2.1 and 2.2 compatible with MariaDB 5.5 and should we upgrade to Django before upgrading MariaDB?
Or is unofficial support for MariaDB 10.x sufficient in Django 2.1 and Django 2.2 and should we just upgrade to MariaDB to 10.4 first?
The "added support" for MariaDB is mostly in name only (https://code.djangoproject.com/ticket/29548 and https://github.com/django/django/commit/b6c4766f53cf00bcf63cc2aa8be977c8589d083e) and is achieved through the mysql database backend. Assuming you are using the recommended mysqlclient version (1.3.13 or later) the safest upgrade strategy would be to first upgrade MariaDB 10.4.
Once that works I would recommend reading (and following) Django's upgrading docs: https://docs.djangoproject.com/en/3.0/howto/upgrade-version/ to get to Django 3.0
With Django >= 3.0, MariaDB is officially supported.
Django now officially supports MariaDB 10.1 and higher.

Compatibility between MongoDB server and Mongo C++ Driver

I'm new to the MongoDB. My virtual machine runs Ubuntu 14.04.5 with mongod, which is standard for this OS:
hekto#ubuntu:~$ mongod --version
db version v2.4.9
Tue Jun 5 18:00:23.923 git version: nogitversion
I've built a Mongo C++ Driver Ver 3.2.0 from sources and tried to write some tests. All of them output an exception below:
Server at localhost:27017 reports wire version 0, but this version of libmongoc requires at least 3 (MongoDB 3.0): generic server error
It looks like the C++ client and the server are incompatible.
Are there any tricks, which can be used with the Mongo C++ Driver to force it to work with older Mongo servers?
I can't convert the database itself to any new format for now, but also wouldn't like to learn the obsolete driver API.
MongoDB 2.4.9 has been end-of-life for quite some time: https://www.mongodb.com/support-policy, and most drivers have dropped support for talking to it.
If you are just starting with MongoDB, you should start with the newest available stable version, which is currently 3.6.5.
You can obtain packages for Ubuntu 14.04 according to the instructions here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Is it possible to build a portable webapp when using oracle with django

I started developing a django webapp which will need to connect to oracle databases. But using oracle with django requires an Oracle client if I'm not mistaken which is platform dependant. If it's not possible to create a portable webapp with django and oracle, could the app use an oracle client install on the machine where the app is running?
Thanks
What do you mean by "portable" exactly ? You can definitely move your Django folder around, especially if you use SQLite for database storage, since a SQLite database is just a file.
All you'll need is Python on the target machine, access to the command line and the ability to install your dependencies with pip.
Then you can just run your webapp with python manage.py runserver.
If this doesn't answer your question, please give more info.

Install Drupal 8.x PostgreSQL

Tell me, how to install Drupal 8.1.9 or 8.2.0 with PostgreSQL? Interestingly, in earlier versions, when the installation was attended by a selection of PostgreSQL. In newer versions this is even no mention
Alternative database engines such as SQLite and PostgreSQL are still available in Drupal 8. However, only the available engines are shown.
If you install the correct PDO module for your PHP environment (e.g. php70-pdo-pgsql) you should have that engine available to you:
You can also use phpinfo() to tell if PostgreSQL support is correctly enabled. You will find the following statement there if it is:
PDO Driver for PostgreSQL => enabled
remove the commented code extension=pdo_pgsql from php.ini file and then start the setup you will see the postgreSQL database option