{"id":21753785,"url":"https://github.com/melardev/djangorestshopapy","last_synced_at":"2025-07-08T10:36:33.116Z","repository":{"id":52014318,"uuid":"170418038","full_name":"melardev/DjangoRestShopApy","owner":"melardev","description":"Python Ecommerce API application built with Rest Framework","archived":false,"fork":false,"pushed_at":"2019-02-13T01:24:27.000Z","size":203,"stargazers_count":15,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T09:18:05.489Z","etag":null,"topics":["auth","crud","django","e-commerce","ecommerce","pagination","python","rest-framework","shop","shopping-cart"],"latest_commit_sha":null,"homepage":"http://melardev.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melardev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-13T01:20:07.000Z","updated_at":"2024-09-20T11:42:56.000Z","dependencies_parsed_at":"2022-08-24T11:31:27.598Z","dependency_job_id":null,"html_url":"https://github.com/melardev/DjangoRestShopApy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/melardev/DjangoRestShopApy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melardev%2FDjangoRestShopApy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melardev%2FDjangoRestShopApy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melardev%2FDjangoRestShopApy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melardev%2FDjangoRestShopApy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melardev","download_url":"https://codeload.github.com/melardev/DjangoRestShopApy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melardev%2FDjangoRestShopApy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264251203,"owners_count":23579640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","crud","django","e-commerce","ecommerce","pagination","python","rest-framework","shop","shopping-cart"],"created_at":"2024-11-26T09:11:32.629Z","updated_at":"2025-07-08T10:36:33.081Z","avatar_url":"https://github.com/melardev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nThis is one of my E-commerce API app implementations. It is written in python, using Django and DRF as the main frameworks.\nThis is not a finished project by any means, but it has a valid enough shape to be git cloned and studied if you are interested in this topic.\nIf you are interested in this project take a look at my other server API implementations I have made with:\n\n- [Node Js + Sequelize](https://github.com/melardev/ApiEcomSequelizeExpress)\n- [Node Js + Bookshelf](https://github.com/melardev/ApiEcomBookshelfExpress)\n- [Node Js + Mongoose](https://github.com/melardev/ApiEcomMongooseExpress)\n- Django\n- Flask\n- [Java Spring Boot + Hibernate](https://github.com/melardev/SBootApiEcomMVCHibernate)\n- Golang go-gonic\n- Ruby on Rails\n- AspNet Core\n- AspNet MVC\n- Laravel\n\n## WARNING\nI have mass of projects to deal with so I make some copy/paste around, if something I say is missing or is wrong, then I apologize\nand you may let me know opening an issue.\n\n# Getting started\n1. Git clone the project\n2. In windows run reset_all.ps1, in linux reset_all.sh, or take line by line and execute them yourself in your terminal window,\nplease notice that I run `python3` in that script because this is how I set up my pc, but if your default python 3 is accessible with\n`python` then change it. This script is used to remove any migrations if any, remove the sqlite db if any, create the db and then migrate.\nAt the end of this step you have a db.sqlite3.\n\n# TODO\n- Improve error messages, for example when commenting a product without a being authenticated the error structur\nis misleading, errors has to be a json object not a string.\n - The short url for comments, does not seem to work, /comments/:id does not work, but\n /products/:slug/comments/:pk does ... hum, fix it\n - Security:\n    - Secure file upload\n    - Secure all user input\n    - CORS\n- then run server with\n`python3 manage.py runserver 8080`\nIt is convenient to use port 8080 because all the requests made in postman are using that port, the postman file is `api.postman_collection.json`,\nyou can import it and test the requests by yourself -)\n\n# Features\n- Authentication / Authorization\n- Paging\n- Products, Orders, OrderItems, Addresses, Custom User model, Tags, Categories, Comments, TimestampedModel, FileUpload(Polymorphic)\n- Products associated to images, file upload without any 3party package\n- CRUD operations on products, comments, tags, categories\n![Fetching products page](./github_images/postman.png)\n- Orders, guest users may place an order\n![Database diagram](./github_images/db_structure.png)\n\n# What you will learn\n- Django\n    - middlewares\n    - authentication\n    - authorization\n- Django ORM\n    - associations: hasMany, belongsTo, belongsToMany\n    - scopes\n    - complex queries\n    - paging\n    - eager loading, select columns\n    \n        \n- seed data with python-faker\n\n- misc\n    - project structure\n    \n    \n# Resources\n- [Django framework](https://www.djangoproject.com/)\n- [Django rest framework](https://www.django-rest-framework.org/)\n- [django-rest-framework-jwt](https://github.com/GetBlimp/django-rest-framework-jwt)\n- [Django ORM Cookbook](http://books.agiliq.com/projects/django-orm-cookbook/en/latest/index.html) IMO, the best Django ORM Resource.\n- [django-polymorphic](https://django-polymorphic.readthedocs.io/en/stable/) FileUpload, ProductImage, TagImage, CategoryImage are implemented using this package\n\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelardev%2Fdjangorestshopapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelardev%2Fdjangorestshopapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelardev%2Fdjangorestshopapy/lists"}