All Projects → thomas545 → ecommerce_api

thomas545 / ecommerce_api

Licence: MIT license
E-commerce by Django Rest Framework

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ecommerce api

Modern Django
Modern Django: A Guide on How to Deploy Django-based Web Applications in 2017
Stars: ✭ 662 (+324.36%)
Mutual labels:  django-rest-framework, restful-api
Django Rest Framework Tutorial
Django-REST-framework 基本教學 - 從無到有 DRF-Beginners-Guide 📝
Stars: ✭ 630 (+303.85%)
Mutual labels:  django-rest-framework, restful-api
mathesar
Web application providing an intuitive user experience to databases.
Stars: ✭ 95 (-39.1%)
Mutual labels:  django-rest-framework, restful-api
AquilaCMS
AquilaCMS is an Open Source and "all in one" ecommerce solution, self hosted, built using nodejs (MERN stack)
Stars: ✭ 69 (-55.77%)
Mutual labels:  ecommerce, ecommerce-api
Blogbackendproject
Backend code for my blogs, develop with Django Rest framework.
Stars: ✭ 204 (+30.77%)
Mutual labels:  django-rest-framework, restful-api
Djangorestframework Book
Django REST framework 3 中文文档, API参考, 最佳实践指南
Stars: ✭ 28 (-82.05%)
Mutual labels:  django-rest-framework, restful-api
instagram-api-clone
Instagram RESTful API clone made with Django REST framework
Stars: ✭ 56 (-64.1%)
Mutual labels:  django-rest-framework, restful-api
Usaspending Api
Server application to serve U.S. federal spending data via a RESTful API
Stars: ✭ 166 (+6.41%)
Mutual labels:  django-rest-framework, restful-api
awesome-medusajs
A curated list of awesome resources related to MedusaJS 😎
Stars: ✭ 113 (-27.56%)
Mutual labels:  ecommerce, ecommerce-api
djburger
Framework for safe and maintainable web-projects.
Stars: ✭ 75 (-51.92%)
Mutual labels:  django-rest-framework, restful-api
abandoned-carts-opencart
Reach out to prospects with bailed shopping carts; gain valuable insight to usability and recover lost sales.
Stars: ✭ 15 (-90.38%)
Mutual labels:  ecommerce
django-rql
Django RQL library
Stars: ✭ 83 (-46.79%)
Mutual labels:  django-rest-framework
sanic-currency-exchange-rates-api
This is a self hosted, free, open source Python Currency Exchange Rate API fork.
Stars: ✭ 20 (-87.18%)
Mutual labels:  restful-api
SpringsScala
Sample Projects for Creating Springs Web services in Scala
Stars: ✭ 16 (-89.74%)
Mutual labels:  restful-api
symfony-todo-backend
This is the result of all the videos that were created in the series that i published on the playlist. LINK BELOW
Stars: ✭ 172 (+10.26%)
Mutual labels:  restful-api
ska
Sign data using symmetric-key algorithm encryption. Validate signed data and identify possible validation errors. Uses sha-(1, 224, 256, 385 and 512)/hmac for signature encryption. Custom hash algorithms are allowed. Useful shortcut functions for signing (and validating) dictionaries and URLs.
Stars: ✭ 39 (-75%)
Mutual labels:  django-rest-framework
django-user-management
User management model mixins and api views.
Stars: ✭ 56 (-64.1%)
Mutual labels:  django-rest-framework
wongames
🎮 Ecommerce de jogos no estilo Steam. Desenvolvido com Next.js, TypeScript, GraphQL, etc.
Stars: ✭ 18 (-88.46%)
Mutual labels:  ecommerce
apex-rest-route
A simple framework for building Restful API on Salesforce
Stars: ✭ 75 (-51.92%)
Mutual labels:  restful-api
django-rest-framework-files
File download and upload support for Django REST framework
Stars: ✭ 29 (-81.41%)
Mutual labels:  django-rest-framework

Python 3.6 Django 2.2 license

Ecommerce API

Documentation:

  1. Django
  2. Django Rest Framework
  3. API Translation
  4. Upload Package to Pypi

Installation:

-> you must install Elastic Search on your computer (you can use brew)
System Dependencies:
  1. Install git on Linux:
    sudo apt-get install -y git
  2. Clone or download this repo.
  3. Install pip and vitualenv on Linux:
    sudo apt-get install -y virtualenv
    sudo apt-get install -y python3-pip
  4. Create a virtual environment on Linux or Mac:
    virtualenv -p python3 ~/.virtualenvs/ecommerce
  5. Activate the virtual environment on Linux or Mac:
    source ~/.virtualenvs/ecommerce/bin/activate
  6. Install requirements in the virtualenv:
    pip3 install -r requirements.txt
Relational database dependencies (PostgreSQL):
  1. Install components for Ubuntu:
    sudo apt-get update
    sudo apt-get install python-dev libpq-dev postgresql postgresql-contrib

  2. Switch to postgres (PostgreSQL administrative user):
    sudo su postgres

  3. Log into a Postgres session:
    psql

  4. Create database with name ecommerce:
    CREATE DATABASE ecommerce;

  5. Create a database user which we will use to connect to the database:
    CREATE USER ecommerce_user WITH PASSWORD 'ecommerce_pass';

  6. Modify a few of the connection parameters for the user we just created:
    ALTER ROLE ecommerce_user SET client_encoding TO 'utf8';
    ALTER ROLE ecommerce_user SET default_transaction_isolation TO 'read committed';
    ALTER ROLE ecommerce_user SET timezone TO 'UTC';

  7. Give our database user access rights to the database we created:
    GRANT ALL PRIVILEGES ON DATABASE ecommerce TO ecommerce_user;

  8. Exit the SQL prompt and the postgres user's shell session:
    \q then exit

  9. Activate the virtual environment:
    source ~/.virtualenvs/ecommerce/bin/activate

  10. Make Django database migrations: python manage.py makemigrations
    then: python manage.py migrate

Use admin interface:
  1. Create an admin user:
    python manage.py dosuperuser
  2. Run the project locally:
    python manage.py runserver
  3. Navigate to: http://localhost:8000/admin/
Steps for install Celery and work it.
  1. pip install -r requirements.txt
  2. sudo apt-get install -y erlang
  3. sudo apt-get install rabbitmq-server
  4. sudo systemctl enable rabbitmq-server
  5. sudo systemctl start rabbitmq-server to check if rabbitmq is working run: systemctl status rabbitmq-server
  6. run local server for backend
  7. run this command in new terminal in project path with activating virtual env: celery -A ecommerce worker -l info

Setup for Django Channels

  1. Django Channels Deploy
  2. Daphne
  3. Django Channels configration on server

- if you face any problems on server pleas run these commands on production

  1. sudo service supervisor stop
  2. sudo service supervisor start
  3. sudo supervisorctl reread
  4. sudo supervisorctl update
  5. sudo service nginx restart
  6. sudo service apache2 restart

API Endpoints

Register

Method: POST
Endpoint: /registration/
Payload:
{ "username": "USERNAME", "password1": "PASSWORD", "password2": "PASSWORD", "email": "OPTIONAL_EMAIL" }

Login

Method: POST
Endpoint: /login/
Payload:
{ "username": "USERNAME", "password": "PASSWORD" }

Logout

Method: POST
Endpoint: /logout/
Headers: Authorization: JWT YOUR_TOKEN_HERE

Admin Credentials

Username: admin

Password: admin

For Dump and Load data

you should creating a folder to do this operations
for dump data from database:
python manage.py dumpdata products --format json --indent 4 > products/fixures/products.json
For loading data into database:
python manage.py loaddata products/fixures/products.json

dump and restoredatabase:

pg_dump dbname=ecommerce -f /tmp/ecommerce.psql

pg_restore -v --host= --port=5432 --username= --password --dbname=ecommerce /tmp/ecommerce.psql

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].