Innovate anywhere, anytime withruncode.io Your cloud-based dev studio.

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.

How to Write Custom Migrations in Django

This blog post will help you to get deeper into Django Migrations - how Migrations works and how to create or add our custom migrations. Migrations are mainly for keeping the data model of you database up-to-date.

Django Efficient Implementation of Amazon S3 and Cloudfront CDN or Faster Loading

Django by default to store the files in your local file system. To make your files load quickly and secure we need to go for any third party storage systems. AWS s3 is one of the storage service for the Internet. It is designed to make web-scale computing easier for developers. django has a package called django-storages which can be used to store the files in the amazon s3 and serve them from its cloudfront service.

Integration Of GitHub API with Python Django

Using Github integration, we can get the user verified email id, general information, git hub URL, id, disk usage, public, private repo's, gists and followers, following in a less span of time.

These Following steps are needed for Github integration:
1. creating git hub app
2. Authenticating user and getting an access token.
3. Get user information, work history using access token.

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.

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.

Preserve File Names with Sorl for Better SEO

We use sorl-thumbnail for scaling images by keeping the original one intact. Sorl proven to be great tool for generating different sized images throughout website. I presume that you know how to use sorl-thumbnail. Here we see how to preserve filename. Search Engines will give importance to image alt tag content but it definately have some impact on relevant image file name too.

Custom Password Less Authentication in Django

Authentication backends allow the ability to change what method checks your users credentials.

For web services, ie Facebook authentication, you don't have access to user data like a password. Without password(not like random string) we can't create a user in django. Facebook connect provides you details of the currently authenticated user.

Understanding 'GenericForeignKey' in Django

In some cases the we might want to store generic model object, rather a particular specific model as 'ForeignKey'. Generic model object means adding a foreign key from one of your own models to ContentType allows your model to effectively tie itself to another model class

Django Raw Sql Queries

When your model query API don't go well or you want more performance, you can use raw sql queries in django. The Django Object Relational Mapper (ORM) helps bridge the gap between the database and our code Performing raw queries.

Creating Django App

Django is a high-level, free and open-source Python Web framework that encourages rapid development. Django follows the model–view–controller (MVC) architectural pattern. Django's primary goal is to ease the creation of complex, database-driven websites. Django emphasizes reusability and pluggability of components, rapid development.