MicroPyramidBlog

Explore a blog dedicated to a wide spectrum of topics including Django, Python, Machine Learning, Salesforce, Angular, React, Flutter, Svelte, LINUX, and Amazon Web Services.

Django-REST Framework Object Level Permissions and User Level Permissions

Django-REST User Level Permissions and Object Level Permissions. User Level Permissions and Object level Permissions allow to serve customers based on their access levels or permissions. Let us consider the scenario of Authors, Books, Readers. Authors are only allowed to write the books. Readers are only allowed to read the allowed Books.

Introduction to API Development Using Django REST Framework with Example

Introduction to API development with Django REST framework. You can build the API for any Django application. Pre-requisites are Django and OOPS(object oriented programming concepts) . In this

Custom Validations for Serializer Fields Django Rest Framework

we can write custom validations for serializer fields in Django Rest Framework. Validators are used to validate the data whether it is semantically valid or not. Validation simplifies the data processing. Validation avoids the data redundancy

How to Add a Custom Managers in Django

Django Custom Managers - A Manager is the interface through which database query operations are provided to Django models. At least one Manager exists for every model in a Django application. You can use a custom Manager in a particular model by extending the base Manager class and instantiating your custom Manager in your model. There are two reasons you might want to customize a Manager: to add extra Manager methods, and/or to modify the initial QuerySet the Manager returns.

How to Use Nested Formsets in Django

Django Formsets manage the complexity of multiple copies of a form in a view. By using formsets, you can know how many forms were their initially, which ones have been changed, and which ones should be deleted. In this blog post, we'll explain how nested formsets are used in django

How to Convert XML Content into Json Using XMLtodict

We need to process large amounts of data to get the desired results from XML file. xmltodict will help you to process, give JSON formatted data within a less span of time. In this blog post, we'll explain to you how to use in a django project.

Django Webpacker - A Compression Tool to Bundles CSS, Js Files

django-webpacker is a django compressor tool which bundles css, js files to a single css, js file with webpack and updates your html files with respective css, js file path with a single management command. It also supports django-storages to load compressed css, js files from AWS S3.

Export HTML Web Page to PDF Using JsPDF

jsPDF is used to generate pdf files in client-side Javascript. You can find the links for jsPDF here and also you can find the link to project homepage. You've to include the scripting files/links in head section to work properly.

Tip: We have to download the newest version of the library and include it in the HEAD or at the end of the BODY section.

How to Document API Requests using Django Rest Swagger

Django Rest Swagger is used to Document your API for eg., Listing all Your project Rest API's in the browser with brief description about the API. In Developing an application, we will write our required API's. To Document these API's we use Django Rest Swagger.

Working with Django Plugins

This blog describes about how to work with django-plugins. Django Plugin is a Simple Plugin Framework for Django. By using django-plugins, you can make your app more reusable. By using it, you can define plugin points and plugins. It comes with many features like synchronization with database, plugins management from django admin and many more.