Giter Site home page Giter Site logo

djact / maskes Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.45 MB

Backend for MASKES using Django and RestFramework. Mutual Aid South King County and East Side formed at the beginning of the COVID-19 pandemic to provide support to those impacted by the pandemic.

Python 99.23% HTML 0.77%
django rest-api python rest-framework jwt

maskes's Introduction

LIVE: https://skcema-live.herokuapp.com/

HOME PAGE demo

ADMIN DASHBOARD admin

Installation

  1. Database Setup
    • Install latest PostgreSQL:
      MacOSX: https://www.postgresql.org/download/macosx/
      EDB: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
      
    • export ph_config path:
      ### for macOSX postgresql v13.1 using EDB installer ###
      $ export PATH="/Library/PostgreSQL/13/bin:$PATH"
      
    • from the console, run
      createdb -U postgres maskes
      createuser -U postgres -s -P maskes
      
      it'll prompt you for a password for new role, use maskes
  2. Clone Project:
    git clone https://github.com/djact/maskes.git
    
  3. Python Setup:
    • Download/Install Python
      https://www.python.org/downloads/
      
    • Create/Activate python virtual environment
      python3 -m venv env
      source env/bin/activate
      
    • Install dependencies:
      pip install -r requirements.txt
      
    • Migration:
      python manage.py migrate 
      
    • Create a superuser:
      python manage.py createsuperuser
      
    • Add some seed data with
      python generate_faker.py
      
  4. Runserver
        python manage.py runserver
    
  5. You can then log in to the admin portal with your superuser account at
    http://localhost:8000/admin/
    
  6. Email Setup (optional): using your email to send email, create local_settings.py next to settings.py: -> make sure local_settings.py is in .gitingore
        SECRET_KEY = 'yoursecretkey'
        DEBUG = True
        EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
        EMAIL_HOST = '<your-email-host>' 
        EMAIL_PORT = '<email-port>' # eg: 587
        EMAIL_HOST_USER = '[email protected]'
        EMAIL_HOST_PASSWORD = 'your-password' #not support 2-Step Verification
        EMAIL_USE_TLS = True
        
        #AMAZON S3 in production
        if not DEBUG:
            AWS_ACCESS_KEY_ID = 'your-aws-access-key'
            AWS_SECRET_ACCESS_KEY = 'you-aws-secret-access-key'
            AWS_STORAGE_BUCKET_NAME = 'aws-s3-bucket-name'
            AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
            AWS_S3_OBJECT_PARAMETERS = {
                'CacheControl': 'max-age=86400',
            }
            AWS_LOCATION = 'static'
            STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
            DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
            STATIC_URL = 'https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION)
    
        STRIPE_PUBLISHABLE_KEY='your-stripe-public-key'
        STRIPE_SECRET_KEY='yourt-stripe-secret-key'
        STRIPE_WEBHOOK_SECRET='your-stripe-webhook-secret'
    Set Google App Passwords info: https://support.google.com/accounts/answer/185833?hl=en

๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.