Code Monkey home page Code Monkey logo

edman-api-query-backend's Introduction

Description

This project is the backend code for tagging recipes from the Edman API. You can read more info about the Edman API.

Setting configurations

You can set configurations in the file named 'settings.py' in the folder 'edman_api_backend'.

You can set PostgreSQL as the database.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'DATABASE_NAME',
        'USER': 'USERNAME',
        'PASSWORD': 'PASSWORD',
        'HOST': 'HOST',
        'PORT': 5432,
    }
}

You can set the client url for the CORS policy and the authentication.

CORS_ORIGIN_WHITELIST = [
     'YOUR_CLIENT_URL'
]
CSRF_TRUSTED_ORIGINS = ['YOUR_CLIENT_URL']

Running the code

You can run the code following the commands in the root folder.

Install all packages related to your project.

pip install -r requirements.txt

Migrate all migrations.

python manage.py migrate

Create the super user to manage the database

python manage.py createsuperuser

Run the code

python manage.py runserver

Building and Deploying the project

Deploying the django project on Pythonanywhere

You can deploy the Django project on Pythonanywhere. You can learn how to deploy Django projects on Pythonanywhere.

  • Upload your source code to Git and import that in Pythonanywhere
  • Create a virtual env file and activate that
  • Install all packages related to your project
  • Create a new web app
  • Set the configurations (e.g. virtual env file, project root folder)
  • Change the settings
  • Migrate all migrations
  • Reload the web app

edman-api-query-backend's People

Contributors

oleksandr-guzenko avatar

Watchers

 avatar

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.