Giter Club home page Giter Club logo

django-example's Introduction

Description

The project is a Django application designed to provide a platform for managing and displaying quotes. It includes functionalities such as storing quotes in a database, retrieving and displaying them on a webpage, and asynchronous task handling using Celery.

Setup

Prerequisites

  • Docker
  • Docker Compose

Installation

Clone the repository:

git clone https://github.com/filiurskyi/django-example

Navigate to the project directory:

cd django-example

Rename file .env.dist into .env and specify your development environment variables. Here's an example:

DJANGO_SECRET_KEY=<your_secret_key>
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
POSTGRES_USER=postgres
POSTGRES_PASSWORD=<pg-password>
POSTGRES_DB=postgres
REDIS_HOST=redis
REDIS_PORT=6379

Build and start the Docker containers:

docker-compose up --build

Usage

Once the setup is complete, you can access the Django development server at http://localhost:8000.

Scripts and Commands

The start.sh script automates the setup process and starts the Django development server and Celery worker. Here's how to use it:

./start.sh

Docker Compose Configuration (docker-compose.yml)

The docker-compose.yml file defines the services required for the project, including Redis, PostgreSQL, and Django. To start the containers defined in this file, run:

docker-compose up

Dockerfile The Dockerfile sets up the environment for running the Django application. It installs the necessary dependencies and sets the entry point to start.sh. To build the Docker image, use:

docker build -t your-image-name .

Requirements

The requirements.txt file lists all Python dependencies required for the project. To install these dependencies, run:

pip install -r requirements.txt

Contributing

Interested in contributing? We welcome contributions of all kinds! Check out our Contributor's Guide to get started.

License

This project is licensed under the MIT License.

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.