Python working with inheritance - oop's

Python working with inheritance - oop's

Inheritance in python defined as acquiring  the properties from the parent/base class to its child classes. In reality we develop complex applications that provides  more utilities to users. In developer perspective each utility involves different modules which work together to provide ...

Read more

how to add custom views to django admin

how to add custom views to django admin

how to add custom views to django admin without actually creating the database table ? Let's talk about it. In django admin  to get the url link in the admin we have to register the model but in some cases we just need the a url with some functionality under an applicaiton. We can imple...

Read more

Python method overloading

Python method overloading

method overloading in python can be defined as writing the method in such a way that method will provide different functionality for different datatype arguments with the same method name. Programming languages like Javaand C++ implements the method overloading by defining the two methods with t...

Read more

'__enter__' and '__exit__' context managers in python

'__enter__' and '__exit__' context managers in python

__enter__ and __exit__are built in methods in python. __enter__ and __exit__ methods are also called as context manager special methods in python. You may come up with the question"what is a context manager ?". A context manager is a manager which has the ability to make avail the data withing ...

Read more

model serializers in Django Rest Framework

model serializers in Django Rest Framework

Model serializers in django rest framework are very similar to the django model forms. By using the model serializers we can reduce the effort of writing the more code for serializers. Model serializers are the shortcuts that allow us to automatically create a serializer with fields that associat...

Read more

Python object oriented programming

Python object oriented programming

Object oriented programming is one of the programming approaches in solving the problems with progamming. Python supports object oriented programming(OOP) approach. While using OOP's in  python we mostly use terms like object, class, method, etc.

Some of the principles of Object Orie...

Read more

working with select_related in django

working with select_related in django

select_related is a queryset method in Django which returns new queryset result for a Django Model. select_related is more helpful in foreign-key relationships. It is useful when we are going to use those foreign-key relationship data later in our code.  select_related is a preformance ...

Read more

using custom widgets in django

using custom widgets in django

In Django we use built-in forms. After rendering the template with form and form fields we can see the equivalent html is generated from the form fields. How Django is doing that ? Well, to generate HTML from the form fields django uses form Widgets. In some cases we need the some specific HTML f...

Read more

Allow remote connections to PostgreSQL

Allow remote connections to PostgreSQL

Working with the PostgreSQL in server is fine. But, sometimes we need to access the server or cloud database from our local machine. But, when we try to connect to the PostgresSQL server database from local it will not connect. Because, by the default configuration PostgreSQL only allows host "lo...

Read more

serializers in Django Rest Framework

serializers in Django Rest Framework

Serializers in django rest framework are similar to django forms. By using django rest framework serializers we can serialize and deserialize the data. We can also validate the incoming data using django rest framework serializers to maintain the integrity of the data. We can divide the django re...

Read more
Blog Archive