https://nuxtjs.org/docs/3.x/get-started/installation
Nuxt.js is a framework for building server-side rendered (SSR) applications with Vue.js. It is a powerful tool for building SEO-friendly, fast, and scalable web applications. Nuxt.js 3 is the latest version of the framework and it is built on top of Vue 3.
https://vueform.com/docs/getting-started
https://www.django-rest-framework.org/
https://caddyserver.com/docs/getting-started
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. It is a production-ready server that is easy to use, configure, and extend.
We use Caddy as a reverse proxy to serve the Django application and the Vue.js frontend. It also handles the automatic HTTPS certificate generation and renewal. Configuration is simple and straightforward. Here is an example of a Caddyfile:
example.com {
reverse_proxy
{
to localhost:8000
}
}
This configuration will automatically generate an HTTPS certificate for example.com and proxy all requests to the Django application running on port 8000.
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use Mailpit when generating the project a local SMTP server with a web interface will be available.
Download the latest Mailpit release for your OS.
Copy the binary file to the project root.
Make it executable:
$ chmod +x mailpit
./mailpit
Send emails from your Django application in development without sending them to real email addresses. Mailpit is a local SMTP server with a web interface that allows you to view emails sent from your application.
https://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html#mailpit https://github.com/axllent/mailpit
$ ./mailpit
INFO[2023/11/17 18:22:21] [smtpd] starting on 0.0.0.0:1025
INFO[2023/11/17 18:22:21] [http] starting server on http://localhost:8025/
After you have created your SMTP credentials and updating the .env file, you can test the email sending functionality from the Django shell.
$ ./manage.py shell_plus
from django.core.mail import send_mail
# Define the email parameters
subject = 'Test Email'
message = 'This is a test email sent from the Django shell.'
from_email = 'support@afb.pet'
to_email = ['shep@afb.pet']
# Send the email
send_mail(
subject=subject,
from_email=from_email,
message=message,
recipient_list=to_email,
fail_silently=False,
)
# create a superuser
$ ./manage.py createsuperuser
# create a new app
$ ./manage.py startapp <app_name>
# create a new migration
$ ./manage.py makemigrations
# run migrations
$ ./manage.py migrate
# run the development server
$ ./manage.py runserver
# run the development server with a specific port
$ ./manage.py runserver 8080
# run the development server with a specific host
$ ./manage.py runserver
# With django-extensions installed, you can run the
# development server with Werkzeug's debugger.
# https://werkzeug.palletsprojects.com/en/3.0.x/
$ ./manage.py runserver_plus
# Rollback to an empty DB
$ ./manage.py migrate afbcore zero
https://github.com/unfoldadmin/django-unfold#installation
launch.json
configurations for running, debugging and testing Django applications.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Django Runserver",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver"
],
"django": true,
"justMyCode": true,
},
{
"name": "Django Test (Current file)",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/apps/api/manage.py",
"args": [
"test",
"--keepdb",
"${fileDirname}",
"--pattern",
"${fileBasename}"
],
"django": true,
"justMyCode": true,
}
{
"name": "Django Test (all)",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/apps/api",
"program": "./manage.py",
"args": [
"test",
"afbcore/tests"
],
"django": true,
"justMyCode": true,
}
]
}
https://
The Django Unfold Admin is a modern Django admin theme that uses the latest technologies. It is a drop-in replacement for Django's built-in admin interface.