Skip to content

A Sample Application for SSR + CSR using Python/Django.

Notifications You must be signed in to change notification settings

fecoderchinh/django-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django 4.0 Sample Blog using SSR + CSR

Resources

  1. Django 4.0
  2. DataTable (jQuery)
  3. Django Rest Framework
  4. Django Parler (imported Parler Rest within)

These details were based on Django First App Tutorial and working on Windows.

Check for the version that installed on your machine.

Run py -m django --version to check for the current Django version.

Creating a project

Run django-admin startproject djangoBlog at your root of project's directory.

The development server

Run py manage.py runserver


Create a setup.txt that includes the packages needs.

For this project, we have to add the below packages:

pymysql
mysqlclient
django-crispy-forms
django-parler
djangorestframework
django-rosetta
django-sass

Run pip install -r .\setup.txt to build all packages inside the setup.txt

And don't forget to add these packages in your settings.py

INSTALLED_APPS = [
    ...,
    'parler',
    'crispy_forms',
    'rest_framework',
    'rosetta',
    'django_sass',
    ...,
]

Run py .\manage.py collectstatic to collect static files from each of your applications (and any other places you specify) into a single location that can easily be served in production.


For more Tutorials, you may also want to visit This Page.

THE PROJECT IS STILL IN DEVELOPMENT.