README.md edited online with Bitbucket

This commit is contained in:
Tom Price
2015-04-21 23:32:33 +00:00
parent 0618684de8
commit cef10456eb

View File

@@ -9,19 +9,21 @@ This document is intended to get you up and running, but if don't care about wha
### What is this repository for? ### ### What is this repository for? ###
For the rapid development of the application for medium term deployment, the main branch is being used. For the rapid development of the application for medium term deployment, the main branch is being used.
Once the application is deployed in a production environment, other branches should be used to properly stage edits and pushes of new features. Once the application is deployed in a production environment, other branches should be used to properly stage edits and pushes of new features. When a significant feature is developed on a branch, raise a pull request and it can be reviewed before being put into production.
Most of the documents here assume a basic knowledge of how Python and Django work (hint, if I don't say something, Google it, you will find 10000's of answers). The documentation is purely to be specific to TEC's application of the framework. Most of the documents here assume a basic knowledge of how Python and Django work (hint, if I don't say something, Google it, you will find 10000's of answers). The documentation is purely to be specific to TEC's application of the framework.
### Editing ### ### Editing ###
It is recommended that you use the PyCharm IDE by JetBrains. Whilst other editors are available, this is the best for integration with Django as it can automatically manage all the pesky admin commands that frequently need running, as well as nice integration with git. It is recommended that you use the PyCharm IDE by JetBrains. Whilst other editors are available, this is the best for integration with Django as it can automatically manage all the pesky admin commands that frequently need running, as well as nice integration with git.
Please contact TJP for details on how to acquire this. For the more experienced developer/somebody who doesn't want a full IDE and wants it to open in less than the age of the universe, I can strongly recommend [Sublime Text](http://www.sublimetext.com/). It has a bit of a steaper learning curve, and won't manage anything Django/git related out of the box, but once you get the hang of it is by far the fastest and most powerful editor I have used (for any type of project).
Please contact TJP for details on how to acquire these.
### Python Environment ### ### Python Environment ###
Whilst it is not critical to the success of the application, it has be written with **Python 3** in mind. It might have been tested with Python 2, but it is not guaranteed to work with it. Whilst the Python version used is not critical to the running of the application, using the same version usually helps avoid a lot of issues. Mainly the C implementation of Python 2 (CPython 2) has been used (specifically the Python 2.7 standard). Most of the application has been written with Python 3 in mind however, and should run without issue. Some level of testing on Python 3 has been done, but there is no guarantee it will work (for more information on this please see [[Python Version]] on the wiki)
Once you have Python 3 installed, please follow steps to set up a virtualenv, which will isolate the project from your system environment. Once you have your Python distribution installed, go ahead an follow the steps to set up a virtualenv, which will isolate the project from the system environment.
#### PyCharm #### #### PyCharm ####
If you are using the prefered PyCharm IDE, then this should be quite easy. If you are using the prefered PyCharm IDE, then this should be quite easy.
@@ -43,11 +45,12 @@ To run the Django application follow these steps
5. Run the application 5. Run the application
#### Console Based #### #### Console Based ####
If you aren't using PyCharm, or want to use a console for some reason, this is really easy. Simply run If you aren't using PyCharm, or want to use a console for some reason, this is really easy, there is even [virtualenvwrapper](https://virtualenvwrapper.readthedocs.org/en/latest/) to help things along. Simply run
``` ```
virtualenv <dir> virtualenv <dir>
``` ```
Where dir is the directory you wish to create the virtualenv in. Watch this doesn't do something dumb like call the Python 2 version of it, else you will have that ballache to deal with later. Where dir is the directory you wish to create the virtualenv in.
Next activate the virtualenv. Next activate the virtualenv.
``` ```
Windows Windows
@@ -70,4 +73,4 @@ python manage.py runserver
Please refer to Django documentation for a full list of options available here. Please refer to Django documentation for a full list of options available here.
### Committing, pushing and testing ### ### Committing, pushing and testing ###
Feel free to commit as you wish, on your own branch. On my branch (master for development) do not commit code that you either know doesn't work or don't know works. If you must commit this code, please make sure you say in the commit message that it isn't work, and if you can why it isn't working. If and only if you absolutely must push, then please don't leave it as the HEAD for too long, it's not much to ask but when you are done just make sure you haven't broken the HEAD for the next person. Feel free to commit as you wish, on your own branch. On my branch (master for development) do not commit code that you either know doesn't work or don't know works. If you must commit this code, please make sure you say in the commit message that it isn't working, and if you can why it isn't working. If and only if you absolutely must push, then please don't leave it as the HEAD for too long, it's not much to ask but when you are done just make sure you haven't broken the HEAD for the next person.