Skip to main content

make your project frontend + django with django-fullstack, it's so easy

Project description

django-fullstack

INTRODUCTION PROJECT

We have several projects that use a django-fullstack, which is very impressive and makes it easy for us to connect the frontend and backend. Next, we want to make our django-fullstack usable by many other frontend frameworks or create one that can be chosen among them. We are also continuously developing all our projects well and consistently asking our team to look for any flaws in our django-fullstack.

  • Flexsibel : flexsibel to coding and easy
  • easy to build : easy to build frontend & backend
  • support django 5.0 : support django 5.0 and async django
  • django friendly : you can integration django and frontend
  • Fast To code : simple code and create new project fast

requirement

  • python >= 3.9 < 3.13
  • django >= 3.0 < 6.0
  • django-fullstack >= 0.1.0 < 2.0.0

documentation

how to install django-fullstack


1. install using pip

pip install django-fullstack

or install using poetry

poetry add django-fullstack

how to create project django-fullstack

command using django-fullstack

django-fullstack startproject name-project

command using django

django-admin startproject name-project

setup to setting.py

Add to setting.py on your project

INSTALLED_APPS = [
    ...'
    'django_fullstack',
]
 # For Setting Django Fullstack
    DJANGO_FULLSTACK = {
        "RENDER": {
            "INDEX": "index.html",
            "URL_SSR": "http://localhost:13714",
            "ENABLED_SSR": False,
        },
        "TEMPLATE": {
            "SERVER_PROTOCOL": "http",
            "DEV_SERVER_HOST": "localhost",
            "DEV_SERVER_PORT": 5173,
            "WS_CLIENT_URL": "@vite/client",
            "ASSETS_PATH": "static/dist",
            "STATIC_URL_PREFIX": "", # add if you prefix your url stactic
        },
        "STATIC_ROOT": "static",
        "CSRF_HEADER_NAME": "HTTP_X_XSRF_TOKEN",
        "CSRF_COOKIE_NAME": "XSRF-TOKEN",
    }

make your app react or vue

generate your file react or vue

django-fullstack create-app vue #use --typescript for using typescript
django-fullstack create-app react #use --typescript for using typescript

Install frontend

this command to install package frontend support nodejs v16 - v20 and npm > v9

npm install 
#or 
yarn install
#or
pnpm install

run you server

To run the backend and frontend simultaneously, you need to run both by opening two terminals, one for Django and the other for the frontend. Once they are running, you can open your browser using http://localhost:8000 or http://127.0.0.1:8000. 1. using python

python manage.py runserver

or using pypy3

pypy3 -m manage.py runserver

run frontend

npm run dev

visit your host django http://localhost:8000 or http://127.0.0.1:8000

staticfiles

if you want to display image or other file in a non-conventional way react and vue, the use folowing :

Image and other file

<img className="w-full lg:w-[60%]" src="/static/image/image.jpg" alt="bla bla"
    />

Production your project

  1. build your frontend
npm run build
#or
yarn run build
#or
pnpm run build
  1. debug your django in setting.py
DEBUG = False
  1. make your project to collectstatic
python manage.py collectstaic
#or
pypy -m manage.py collectstatic

thanks you for support


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_fullstack-0.6.0.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_fullstack-0.6.0-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

Details for the file django_fullstack-0.6.0.tar.gz.

File metadata

  • Download URL: django_fullstack-0.6.0.tar.gz
  • Upload date:
  • Size: 47.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-16-amd64

File hashes

Hashes for django_fullstack-0.6.0.tar.gz
Algorithm Hash digest
SHA256 38b5696c3359e8e4af5d518772a20a46de4c51da9ea85829be5c6156aaaed16c
MD5 58ed477ab917b8f5a7d8ce5dda2d787c
BLAKE2b-256 7ffc08ec0acb6da3ee6c208b3895bd34a11ed4d3a8badc0bdbcb05f8c75c97f1

See more details on using hashes here.

File details

Details for the file django_fullstack-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: django_fullstack-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-16-amd64

File hashes

Hashes for django_fullstack-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 354742b60d8c59f6d59ed96cf03f325e9805c2270bb566576f12a021a45e86cd
MD5 4176402a48234f9d816486e721181fc9
BLAKE2b-256 4ed233f0b0297d40b3a486266c5d5d6726ad7144cf5ac16f3eb9a1ff8d8730bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page