Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ db.sqlite3
models_bk.py
nohup.out
nohup.*
venv/
local_settings.py
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,65 @@ Please try our basic **tutorial** here - [Movement Database Tutorial](webworm_do

Information on how each interface component feature can be used is
found here - [Movement Database Features Documentation](webworm_docs/Features.md)

## Contributing

### Preparation

Create virtual environment

```shell
python -m venv venv
```

Activate virtual environment.

On Windows
```shell
venv/Scripts/activate
```

On Linux
```shell
source venv/Scripts/activate
```

### Local setup

Create `movement_site/local_settings.py` with approximately following content

```py
import os
LOCAL_BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# SQLite database engine for much simpler setup
# For production, consider using PostgreSQL or another robust database engine
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': LOCAL_BASE_DIR / 'db.sqlite3',
}
}

ALLOWED_HOSTS = ['127.0.0.1']

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'test@gmail.com'
EMAIL_HOST_PASSWORD = 'test'
EMAIL_PORT = 587
```

You may need run following commmand to apply migrations for a first time, and in case you actively develop things.
```shell
python manage.py migrate
```

### Develoment workflow

Run development server
```shell
python manage.py runserver
```

Open http://127.0.0.1:8000/ in the browser
1 change: 1 addition & 0 deletions movement_site/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
}
}

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
Expand Down
6 changes: 3 additions & 3 deletions movement_site/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.urls import include, re_path
from django.contrib import admin


urlpatterns = [
url(r'^', include('webworm.urls')),
url(r'^admin/', admin.site.urls),
re_path(r'^', include('webworm.urls')),
re_path(r'^admin/', admin.site.urls),
]
14 changes: 7 additions & 7 deletions webworm/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.conf.urls import url
from django.urls import re_path

from . import views

urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^wconviewer', views.wconviewer, name='wconviewer'),
url(r'^upload', views.upload, name='upload'),
url(r'^contributors', views.contrib, name='contributors'),
url(r'^release', views.release, name='release'),
url(r'^feedback', views.feedback, name='feedback'),
re_path(r'^$', views.index, name='index'),
re_path(r'^wconviewer', views.wconviewer, name='wconviewer'),
re_path(r'^upload', views.upload, name='upload'),
re_path(r'^contributors', views.contrib, name='contributors'),
re_path(r'^release', views.release, name='release'),
re_path(r'^feedback', views.feedback, name='feedback'),
]