Building E-commerce with Django integrated with MercadoPago API


This ecommerce was developed mostly in Django with PostgreSQL database and aims to cover all the basic functionalities of an e-commerce from login and user registration to the payment of the products.


The implementation was carried out using Python version 3.7 with the following main libraries:

  • django
  • mercadopago
  • pytest
  • coverage

Other languages/technologies used:

  • Front-end: Javascript/HTML/CSS
  • Docker


├── ecommerce                                                             # django project
│   ├──
│   ├──
│   ├──
│   └──
├── main_app                                                              # main django application
│   ├── templatetags
│   │   └──
│   ├── tests
│   │   ├──
│   │   ├──
│   │   ├──
│   │   ├──
│   │   └──
│   ├──
│   ├──
│   ├──
│   ├──
│   ├──
│   ├──
│   └──
├── media_root                                                            # product image storage
├── mercadopago_payment                                                   # django application for payments (mercadopago)
│   ├── tests
│   │   ├──
│   │   ├──
│   │   ├──
│   │   └──
│   ├──
│   ├──
│   ├──
│   ├──
│   ├──
│   ├──
│   ├──
│   └──
├── postgres_data                                                         # database
├── static                                                                # static file storage (css/js/...)
├── templates                                                             # front-end storage (html)
├──                                                           # pytest fixture file
├── docker-compose.yaml                                                   # docker-compose
├──                                                  # docker Entrypoint
├── Dockerfile                                                            # docker build file
├── environment.env                                                       # environment variables
├── pytest.ini                                                            # pytest setup
└── requirements.txt                                                      # libraries

Running the project

To run the project it is necessary to have docker and docker-compose installed in your environment. But first it is necessary to fill the environment.env file in the project root.

# Command to build and execute:
$ docker-compose up

# Only build:
$ docker-compose build

# Turn-off command:
$ docker-compose down

From that point on, all containers will be available. To access the application, just open the address http://localhost:8000 in your browser.

Handling the project

  1. To add products to the store:
  2. Create a superuser:
# Create superuser (admin), run the command and fill username, email and password:
$ docker exec -ti web createsuperuser

3.   Open the browser and go to localhost:8000/admin, then login with the user created earlier.

4.   Once logged into the admin panel, go to Products and fill in the fields.

Configuring MercadoPago

  1. Create a MercadoPago account:
  2. Create test keys at:
  3. Copy keys and fill in the environment.env: MERCADO_PAGO_PUBLIC_KEY and MERCADO_PAGO_ACCESS_TOKEN

NOTE: To put Mercadopago into production, activate the production credentials in the same link mentioned above and use the keys.


The structure contained in the docker-compose.yaml file provides separate containers for the Django project and the database (PostgreSQL).


All database-related changes must be made using Django's own ORM. To create a new migration just run docker exec -ti web python makemigrations and docker exec -ti web python migrate. The model diagram can be seen in the root directory of this project as database_diagram.png.

Command to generate database diagram (it needs django-extensions and pygraphviz libs):

$ docker exec -ti web python graph_models main_app mercadopago_payment -g -o database_diagram.png


To run the tests, simply enter the following commands in your terminal:

# Run the tests with coverage to generate the coverage report:
$ docker exec -ti web coverage run -m pytest -vx

# Display the report and list the lines that are not covered by the tests:
$ docker exec -ti web coverage report -i

To validate templates:

$ docker exec -ti web python validate_templates

This project currently contains 70% of test coverage.

Improvements that can be made

Download details:

Author: heldercelso
Source code:

#python #django

What is GEEK

Buddha Community

Building E-commerce with Django integrated with MercadoPago API
Einar  Hintz

Einar Hintz


API Integration Practices and Patterns

We all hear it so often that we almost stop hearing it: “Integration is critical to meeting users’ needs.”

Integration work consumes 50%-80% of the time and budget of digital transformation projects, or building a digital platform, while innovation gets only the leftovers, according to SAP and Salesforce. And as everyone from legacy enterprises to SaaS startups launches new digital products, they all hit a point at which the product cannot unlock more value for users or continue to grow without making integration a feature.

If I were to sum up the one question behind all of the other questions that I hear from customers, enterprises, partners, and developers, it would be something like: “Is integration a differentiator that we should own? Or an undifferentiated but necessary feature that supports what we’re trying to accomplish?”

This Refcard won’t try to answer that question for you. Rather, no matter what type of development work you do, API integration is a fact of life today, like gravity. Why? Today, experience is paramount. The average enterprise uses more than 1,500 cloud applications (with the number growing by 20% each year). Every app needs to integrate with other systems in a fluid and ever-changing application ecosystem. So instead, I’ll share some of the common practices you’re likely to contend with as well as some patterns to consider.

This is a preview of the API Integrations Practices and Patterns Refcard. To read the entire Refcard, please download the PDF from the link above.

#apis #api integration #integration patterns #api cloud #api patterns #api authentication #api errors #apis and integrations

Top E-Commerce Mobile App Developers in USA

Looking to develop an E-Commerce app for your business or start-up? We at, AppClues Infotech have the best team of E-Commerce mobile app developers in USA for iOS & Android users. Get in touch with our E-Commerce experts to take your E-Commerce business to the next level.

E-Commerce App Development Services
• Ecommerce Technology Consulting
• Custom E-Commerce App Development
• E-Commerce Wallet Development
• E-Commerce Plugin Integration
• E-Commerce App UI/UX Designing
• B2B & B2C E-Commerce App Solutions

For more info:
Call: +1-978-309-9910

#e-commerce app development company in usa #hire e-commerce app developers in usa #custom e-commerce app development #create an e-commerce app #cost to build e-commerce app #m-commerce app development company in usa

Top E-Commerce App Development Company in USA

Looking to develop an eCommerce app for your business? We at, AppClues Infotech provide the best eCommerce mobile app development services for Android and iOS users. Get in touch with our eCommerce experts to take your e-commerce business to the next level.

For more info:
Call: +1-978-309-9910

#e-commerce app development company in usa #hire e-commerce app developers in usa #custom e-commerce app development #create an e-commerce app #cost to build e-commerce app #m-commerce app development company in usa

Autumn  Blick

Autumn Blick


Public ASX100 APIs: The Essential List

We’ve conducted some initial research into the public APIs of the ASX100 because we regularly have conversations about what others are doing with their APIs and what best practices look like. Being able to point to good local examples and explain what is happening in Australia is a key part of this conversation.


The method used for this initial research was to obtain a list of the ASX100 (as of 18 September 2020). Then work through each company looking at the following:

  1. Whether the company had a public API: this was found by googling “[company name] API” and “[company name] API developer” and “[company name] developer portal”. Sometimes the company’s website was navigated or searched.
  2. Some data points about the API were noted, such as the URL of the portal/documentation and the method they used to publish the API (portal, documentation, web page).
  3. Observations were recorded that piqued the interest of the researchers (you will find these below).
  4. Other notes were made to support future research.
  5. You will find a summary of the data in the infographic below.


With regards to how the APIs are shared:

#api #api-development #api-analytics #apis #api-integration #api-testing #api-security #api-gateway

Ahebwe  Oscar

Ahebwe Oscar


Django admin full Customization step by step

Welcome to my blog , hey everyone in this article you learn how to customize the Django app and view in the article you will know how to register  and unregister  models from the admin view how to add filtering how to add a custom input field, and a button that triggers an action on all objects and even how to change the look of your app and page using the Django suit package let’s get started.


Custom Titles of Django Admin

Exclude in Django Admin

Fields in Django Admin

#django #create super user django #customize django admin dashboard #django admin #django admin custom field display #django admin customization #django admin full customization #django admin interface #django admin register all models #django customization