Intelligent-d2
Web development, simplified
CALL US:737-215-5094
  • Home
  • Services
  • Portfolio
  • Testimonials
  • Contact Us
  • About Us
  • Blog
  • FAQ

Author: red_shift

Use the python Requests library to post Multipart-Encoded file

Posted on August 1, 2017October 20, 2017 by red_shift

In this segment I’m going to show you how simple it is to post a Multipart-Encoded file to a RESTful api using the python Requests library using python 3.5.2.  So let’s get started. First you will need to install the python Requests library, to do that simply type this command into your terminal: pip install Read More

Posted in Python 2 Comments

Web scraping and saving to a file using Python, BeautifulSoup and Requests

Posted on July 23, 2017March 12, 2018 by red_shift

In this segment you are going to learn how make a python command line program to scrape a website for all its links and save those links to a text file for later processing. This program will cover many topics from making HTTP requests, Parsing HTML, using command line arguments and file input and output. Read More

Posted in Python 9 Comments

Create user and user profile in CreateView using single Formset without using post_save signal

Posted on July 8, 2017February 8, 2018 by red_shift

Before we begin I am using Python 3.5.2 and Django 1.11.3 and basic knowledge of Django models, forms and views is required, so let’s begin. When I first started learning Django one of the things I needed to do was create a user and a user profile at the same time in the same view Read More

Posted in Django, Python 2 Comments

How to use a different python version with virtualenv

Posted on July 7, 2017July 13, 2017 by red_shift

A common question for beginning python programmers is how to set up and activate a virtual environment using virtualenv with a different python version. Fortunate for us the answers is pretty simple. First, let’s fire up a command line terminal and type this command: virtualenv -pvirtualenv -p 1.) The virtualenv command is used to create Read More

Posted in Python Leave a comment

Select data from MySQL database as dictionary and iterate through it

Posted on July 6, 2017July 10, 2017 by red_shift

In this tutorial we are going to look at how you can retrieve data from a MySQL database as a dictionary instead of a tuple using PyMySQL. Then using that data we will iterate through the dictionary and use logic to test for certain conditions, in this case, we will be testing if the first Read More

Posted in Databases, Python 1 Comment

How to access URL parameters in Django CBVs

Posted on June 7, 2017October 20, 2017 by red_shift

Another common question in regards to Django is, how do I access a URL parameter captured from your URLconf(urls.py)? The and the answer is simpler than you might think. Before we get started I’m using Python 3.5.2 and Django 1.11.3. and assumes you have basic knowledge of Django Classed Based Views(CBVs) and its URL configuration. Read More

Posted in Django, Python Leave a comment

Pass object to formset to filter form ChoiceField

Posted on June 2, 2017October 20, 2017 by red_shift

One of the initial problems I encountered with developing Django for the first time was how to pass object information to a formset so I could filter out a choices field based on the current user. There are two methods you need to override to accomplish this task, one is get_form_kwargs in the generic view Read More

Posted in Django 1 Comment

Using get, get_queryset, get_context_data in Django CBVs

Posted on May 9, 2017October 20, 2017 by red_shift

When I first started learning Django I had a lot of questions and while the Django documentation is absolutely excellent, sometimes you just may not know where to start. Which methods to use and override is pretty cut and dry for the experienced Djangonaut but for many first-time starters it can be a little confusing. Read More

Posted in Django 2 Comments

Recent Posts

  • Use the python Requests library to post Multipart-Encoded file
  • Web scraping and saving to a file using Python, BeautifulSoup and Requests
  • Create user and user profile in CreateView using single Formset without using post_save signal

Categories

  • Databases
  • Django
  • Python

Archives

  • August 2017
  • July 2017
  • June 2017
  • May 2017

Recent Comments

  • Bestie on Pass object to formset to filter form ChoiceField
  • red_shift on Web scraping and saving to a file using Python, BeautifulSoup and Requests
  • red_shift on Web scraping and saving to a file using Python, BeautifulSoup and Requests
Theme by Out the Box