Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 10 Next »

Initialize the django project

Create a gitlab repo

Create a blank git project on a gitlab server that will hold the django project. It is helpful to have this git repo created prior to initializing the project, so that the django project can be created directly into the repo instead of having to initialize and link the git repo after the django project is created, which tends to be more difficult.

Start the dev environment

To start the project, we need an environment that is setup for developing django projects. It is recommended to have a Docker container specifically for this purpose. Note that we are not going to run the django project from this container. This container is only for starting up the project.

The ece-li-scheduling-docker git repo contains a Dockerfile called Dockerfile.django-dev.001 to build such an environment.

  • Enter the dev environment:

    docker exec -it dev-env-1 /bin/bash
  • Go to the /opt folder.

Now, we are going to clone the git repo using an access token. This is assuming that the project is on a gitlab server.

  • Create the access token.

    • Go to the gitlab repo web page.

    • Under Settings (left sidebar), select Access tokens.

    • In the Token name field, enter initialize project.

    • For the Expiration date field, the default value should be sufficient, as this git clone won’t be needed after the project is initialized.

  • Clone the git repo. For example,

     

Modify ALLOWED_HOSTS.

  • No labels