Giter Site home page Giter Site logo

quxdns's Introduction

Qjango - A Qux Django Template

Getting Started

account="quxdev"
repo="qjango"

git clone https://github.com/${account}/${repo}.git
cd ${repo}

# Update submodules
git submodule update --init

# Create virtual environment
python3 -m venv venv

if [[ $OSTYPE != darwin* ]]; then
    sed -i '' 's/PS1=\"(venv)/PS1=\"(venv:${repo})/g' venv/bin/activate
else
    sed -i 's/PS1=\"(venv)/PS1=\"(venv:${repo})/g' venv/bin/activate
fi

# Activate virtual environment
source venv/bin/activate

# Upgrade pip and install packages
pip install --upgrade pip
pip install -r requirements.txt

# Migrate models to db.sqlite3
python manage.py migrate

# Configure project/.env
dotenv="project/.env"
if [ ! -f dotenv ]; then
    touch ${dotenv}
    secret=$(python manage.py generate_secret_key)
    echo "DJANGO_SECRET_KEY=\"${secret}\"" >> ${dotenv}
    echo "DJANGO_DEBUG=true" >> ${dotenv}
    echo "BOOTSTRAP=bs5" >> ${dotenv}
fi

# Runserver and test
python manage.py runserver

ENVIRONMENT

Django

  • DJANGO_SECRET_KEY
  • DJANGO_DEBUG
  • DJANGO_ALLOWED_HOSTS
  • DJANGO_SITE_ID
  • BOOTSTRAP=bs5

Database

  • DB_TYPE = [sqlite3|mysql]
  • DB_NAME
  • DB_USERNAME
  • DB_PASSWORD
  • DB_HOST
  • DB_PORT

wsgi.py

!! There is no reason to set these by default.

  • DJANGO_SETTINGS_MODULE
  • DJANGO_PYTHON_PATH

Templates

_blank.html

  1. qux_page_title_extra: additional classes in heading
  2. qux_page_title: page title
  3. qux_page_content: page content

quxdns's People

Contributors

vishalapte 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.