GithubHelp home page GithubHelp logo

tbpweb's Introduction

tbpweb

TBP CA-A website rework, build in Django

Setup

Vagrant will automatically setup a virtual machine with the correct setup for developing hknweb.

Install Vagrant and VirtualBox Make sure you install Virtual Box 6.0.14, as Vagrant is not compatible with newer versions of Virtual Box.

Fork the tbpweb repository and clone your fork to your local machine

Open terminal, and cd into the cloned directory. Check to make sure there is a Vagrantfile in the directory. From there, type

$ vagrant up

which will download and boot a Linux virtual machine, then run setup.

To access the environment, run

$ vagrant ssh

which will ssh your terminal into the virtual machine.

See Development for how to run the Django web server.

From here, run

$ cd tbpweb

Make sure pipenv is installed in your virtual machine. To do this, run

$ pip3 install pipenv

Next, make sure there is a Pipfile in your current directory and run

$ pipenv shell

To install django, run

$ pipenv install django

There may be warnings that installation of some packages failed, but as long as you can run the command below successfully you are good to go.

If you make any Django changes (to the database models, for instance) you will have to create and migrate migrations. You can do so with the command below. If there were changes to database models made by other developers and you pulled those changes, you just have to run make migrate.

$ make migrations
$ make migrate

If you would like to access the admin interface, create a superuser using the command

$ make superuser

Finally, to run the web instance, simply run the command

$ make run

This will start the development server at http://0.0.0.0:3000/. If you go into your web browser and access localhost:3000, you should be able to see the site now!

To access the admin site, access http://0.0.0.0:3000/admin. Use the credentials you created for your superuser to login.

To exit out of the pipenv shell, run

$ exit

The same command can be used to exit out of the virtual machine ssh connection.

To turn off the virtual machine, run

$ vagrant halt

which will attempt to safely shutdown the virtual machine, or kill it otherwise.

tbpweb's People

Contributors

chevin-ken avatar dinganthony avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.