
test blog
test description
-
For the default filesystem storage configuration,
MEDIA_ROOT
andMEDIA_URL
must be set correctly for the media files to work (like those uploaded by the ckeditor widget). -
Add CKEditor URL include to your project's
urls.py
file:path('ckeditor/', include('ckeditor_uploader.urls')),
-
Note that by adding those URLs you add views that can upload and browse through uploaded images. Since django-ckeditor 4.4.6, those views are decorated using
@staff_member_required
. If you want a different permission decorator (login_required
,user_passes_test
etc.) then add views defined inckeditor.urls
manually to your urls.py.
Prerequisites
Development Requirements
- Python installed on PC
- VS Code IDE (preferred for debugging purposes) or any other IDE to code Python
- PostgreSQL, PgAdmin
- Postman or Chrome/Firefox to access OpenAPI Specs automatically generated by FastAPI Framework
Full Source Code of this tutorial is available on fastapi-postgresql-azure-deploy
branch of this repository.
Create a Workspace
Run the following commands to create our development workspace and launch VS Code that opens our workspace as active directory.
Shell
1
mkdir fastapi-postgres-tutorial
2
cd fastapi-postgres-tutorial
3
code .
Create & Activate Python Virtual Environment
In VS Code navigate to View
and click Terminal
to launch command prompt. Run the below scripts in Terminal to create Python virtual environment.