Go-Django
A web framework built in Go, inspired by Django.
This framework is still in development, and is not ready for production use.
This framework, is built from the ground up, and thus there is a lot of work to be done.
It is not a port of Django, but rather a re-implementation of the core concepts of Django, in Go.
The default ORM we use is GORM.
This is because it is one of the most popular ORM's for Go, and it is very easy to use.
Beware!
Most of the code is not tested thoroughly, and there could be bugs present.
If you find any bugs, please report them in the github issues page.
Recommended installation process
Make sure you have your GOPATH set up correctly.
go install github.com/Nigel2392/go-django/[email protected]
This will install the go-django
command-line tool, which you can use to create a new project.
Creating a new project
go-django -startproject <project-name>
This will create a new project in the current directory, with the name you specified.
Following that, change into the project directory, make sure you install the latest tag.
Our tags are in the format of vX.X.X.X
, which might make the go tool struggle.
After changing into the project directory, run the following command:
go get github.com/Nigel2392/[email protected]
go mod tidy
This will install the latest version of the framework, and update the go.mod file.
Now you can run the project with the following command:
go run ./src/
Adminsite
In the main file are a few developer credentials registered.
These are used to log into the adminsite.
You can view the adminsite by going to the <<DOMAIN>>/admin/
url (As specified in config.go).
Finished:
- Routing
- Signals
- Template file system/manager module
- Media file system/manager module
- middleware: CSRF protection, Sessions, AllowedHosts
- Authentication
- Messages (To the templates)
- Sending emails
- Secret keys
- Admin panel extensions (Embed your own templates!)
- Secure hashing with secret.Hash and secret.Compare
- Command-line flag package
- Project-setup tool
- Debug recovery page middleware (Only when running with -debug flag)
In progress:
- Forms
- Testing
- Documentation