Skip to content

Commit 79b0934

Browse files
committed
Moved test module inside Django Ledger Application.
Created dev_env with a simple development environment. README.md Update
1 parent 9cd44f7 commit 79b0934

File tree

15 files changed

+48
-13
lines changed

15 files changed

+48
-13
lines changed

AUTHORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Django Ledger was created by [Miguel Sanda](https://github.com/elarroba).
1111
* Miguel Sanda [@elarroba](https://github.com/elarroba)
1212
* Michael Noel [@mnooel](https://github.com/mnooel)
1313

14-
### Accountants & Bookkeepers
14+
### Accountants, CPAs & Bookkeepers
1515
* Miguel Sanda [@elarroba](https://github.com/elarroba)
1616
* Albert Salazar [@Beachwood619](https://github.com/Beachwood619)
17-
* Michael Noel [@mnooel](https://github.com/mnooel)
17+
* Michael Noel, CPA [@mnooel](https://github.com/mnooel)

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,44 @@ urlpatterns = [
9797
]
9898
```
9999

100-
# Screenshots
100+
# How To Set Up Django Ledger for Development
101+
Django Ledger comes with a basic development environments already configured under __dev_env/__ folder not to be used
102+
for production environments. If you want to contribute to the project perform the following steps:
103+
104+
1. Navigate to your projects directory.
105+
2. Clone the repo from github and CD into project.
106+
```shell
107+
git clone https://github.com/arrobalytics/django-ledger.git
108+
cd django-ledger
109+
```
110+
3. Install PipEnv, if not already installed:
111+
```shell
112+
pip install -U pipenv
113+
```
114+
4. Create virtual environment.
115+
```shell
116+
pipenv install
117+
```
118+
If using a specific version of Python you may specify the path.
119+
```shell
120+
pipenv install --python PATH_TO_INTERPRETER
121+
```
122+
5. Activate environment.
123+
```shell
124+
pipenv shell
125+
```
126+
7. Run development server.
127+
```shell
128+
python manage.py runserver
129+
```
101130

131+
# Run Test Suite
132+
After setting up your development environment you may run tests.
133+
```shell
134+
python manage.py test django_ledger
135+
```
136+
137+
# Screenshots
102138
![django ledger entity dashboard](https://us-east-1.linodeobjects.com/django-ledger/public/img/django_ledger_entity_dashboard.png)
103139
![django ledger balance sheet](https://us-east-1.linodeobjects.com/django-ledger/public/img/django_ledger_income_statement.png)
104140
![django ledger income statement](https://us-east-1.linodeobjects.com/django-ledger/public/img/django_ledger_balance_sheet.png)
File renamed without changes.

tests/asgi.py renamed to dev_env/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from django.core.asgi import get_asgi_application
44

5-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings')
5+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dev_env.settings')
66

77
application = get_asgi_application()

tests/settings.py renamed to dev_env/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
'django.contrib.messages',
1515
'django.contrib.staticfiles',
1616

17-
'tests',
1817
'django_ledger'
18+
1919
]
2020

2121
MIDDLEWARE = [
@@ -28,7 +28,7 @@
2828
'django.middleware.clickjacking.XFrameOptionsMiddleware',
2929
]
3030

31-
ROOT_URLCONF = 'tests.urls'
31+
ROOT_URLCONF = 'dev_env.urls'
3232

3333
TEMPLATES = [
3434
{
@@ -47,7 +47,7 @@
4747
},
4848
]
4949

50-
WSGI_APPLICATION = 'tests.wsgi.application'
50+
WSGI_APPLICATION = 'dev_env.wsgi.application'
5151

5252
# Database
5353
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
File renamed without changes.

tests/wsgi.py renamed to dev_env/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from django.core.wsgi import get_wsgi_application
44

5-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings')
5+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dev_env.settings')
66

77
application = get_wsgi_application()
File renamed without changes.
File renamed without changes.

django_ledger/tests/bdd/__init__.py

Whitespace-only changes.

tests/test_auth.py renamed to django_ledger/tests/test_auth.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.urls import reverse
22

3-
from tests.base import DjangoLedgerBaseTest
4-
from tests.settings import LOGIN_URL
3+
from django_ledger.tests.base import DjangoLedgerBaseTest
4+
from dev_env.settings import LOGIN_URL
55

66

77
class AuthTest(DjangoLedgerBaseTest):
@@ -73,4 +73,3 @@ def test_user_can_logout(self):
7373

7474
response = self.client.get(logout_url)
7575
self.assertRedirects(response, expected_url=login_url)
76-

tests/tests_entity.py renamed to django_ledger/tests/tests_entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_entity_views(self):
211211
text=reverse('django_ledger:entity-delete',
212212
kwargs={
213213
'entity_slug': entity_model.slug
214-
})) # ENTITY-LIST VIEW...
214+
})) # ENTITY-LIST VIEW...
215215

216216
# # HOME VIEW
217217
# with self.assertNumQueries(3):

tests/manage.py renamed to manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88
"""Run administrative tasks."""
9-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings')
9+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dev_env.settings')
1010
try:
1111
from django.core.management import execute_from_command_line
1212
except ImportError as exc:

0 commit comments

Comments
 (0)