Devtech

Talk about technologies

Integration of Elastic Search and Django(A Python Framework) – Part One

In this tutorial I am going to show you the Integration of Elastic Search and Django. I am using Django 1.10, ElasticSearch 5.2.0, and Ubuntu 16.04 OS for the application. Lets Have a look on the model we are going to build.      A simple application that have five simple models : – Product Model, Category Model, SubCategory Model, UserProfile, and the User Model. This is the part One of the tutorial, in this part I am going to build an application at Django Part. To install Django on your system refer here. Open terminal and type command

make virtual environment

activate the virtual environment

install django 1.10 in the virtual environment using pip

make a app named core that will contain our models

Here is the directory structure for our application go to the elasticdjango/settings.py file and add the core application to the Installed apps:- add following code to the core/models.py file

Don’t worry if you are not able to understand this time the whole code. This in simple words contain the models definitions […]

Angular 2 Production Build – Minify an Angular App

     In this blog post I am going to show you the steps for minifying the application build using Angular 2. First concern is why minify the angular Application. Angular team released Angular 2 by taking mobile apps in mind. Angular 2 is made especially for the Mobile applications. The hybrid mobile applications that feel like native. These applications are called PWA, Progressive web apps.      To take advantage of the PWA, the size of the application itself must be less enough to load instantly on open up the app. As for the angular application to run, it has to be load fully by the browser. But if the size factor of the application make it slow during the initial load of the page, then it must be a serious concern. Minify a Sample Angular Application      Our application consist of three files:- app.component.ts

app.module.ts

main.ts

     In app.component.ts we define the component for our application. In app.module.ts we define the module of our app and export AppModule. In main.ts we bootstrap our application using the bootstrapmodule of platformBrowserDynamic. AppModule is […]

Local Storage in Ionic 2

What is Local Storage      Local storage is a kind of the Web Storage. It is the web application protocols and methods by which we can easily store data in the web browser storage or simply store data client side. Local storage is also helpful in reducing the server load, as data which has to be accessed frequently, can be stored in the local storage and not need to be fetched again and again from the server. Local storage can be used to store the user credentials in a secure way, that easily authenticate the user without having him to login again,example:- we can store the token of user in local storage, in token based REST authentication system.      Obviously we have the storage at client side,i.e. Local storage which can be leveraged in many ways, making our web applications or mobile hybrid applications more productive. Local storage is supported by almost every browser, like IE8(Internet Explorer 8) and later, Mozilla Based browser, google chrome, opera, safari etc.      It is very easy to use, i.e. very simple syntax, shown as follows. Browsers […]

Show Buttons
Hide Buttons