Source code for the ckan.org website
- Title:
ckan.org
- Contributors:
Alex-Pavlyuk
,ostyhar
,rbrtmrtn
,amercader
,alexmorev
- Preview: https://ckan.org/
|—— blog
| |—— management
| |—— commands
|—— ckan_pages
|—— ckanorg
| |—— settings
| |—— static
| |—— css
| |—— fonts
| |—— img
| |—— js
| |—— scss
| |—— templates
| |—— account
| |—— blog
| |—— ckan_pages
| |—— contact
| |—— events
| |—— home
| |—— snippets
| |—— tags
| |—— wagtailadmin
| |—— wagtailmetadata
|—— contact
|—— dashboard
|—— events
|—— home
|—— managers
|—— menus
|—— scss
| |—— base
| |—— components
| |—— layout
| |—— main.scss
| |—— sections
| |—— vendor
|—— search
| |—— templates
| |—— search
|—— streams
|—— Dockerfile
|—— LICENSE.txt
|—— README.md
|—— cache
|—— media
|—— manage.py
|—— requirements.txt
- Python 3.8 or higher
- Django >=3.1, <3.2
- Wagtail >=2.10,<2.11
#:~/wagtail$ python3 -m venv wagenv
#:~/wagtail$ source wagenv/bin/activate
(wagenv) #:~/wagtail$ git clone https://github.com/ckan/ckan.org.git
(wagenv) #:~/wagtail$ pip install wheel
5. Install all required dependences from requirements.txt
in project root folder. Be aware about versions of these dependences!!!
(wagenv) #:~/wagtail$ pip install -r requirements.txt
diff --git a/ckanorg/settings/base.py b/ckanorg/settings/base.py
index be311ca..ec8777f 100644
--- a/ckanorg/settings/base.py
+++ b/ckanorg/settings/base.py
@@ -225,11 +225,7 @@ with open(BASE_DIR + '/../config/secret.txt') as f:
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2',
- 'NAME': 'ckanorg',
- 'USER': 'ckanorg',
- 'PASSWORD': DB_PASS,
- 'HOST': DB_HOST,
- 'PORT': 5432,
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
(Ask managers for db.sqlite3
file and copy it into the ckan.org
folder).
Otherwise run: python manage.py makemigrations; python manage.py migrate
.
diff --git a/ckanorg/settings/base.py b/ckanorg/settings/base.py
index be311ca..3837822 100644
--- a/ckanorg/settings/base.py
+++ b/ckanorg/settings/base.py
@@ -49,7 +49,6 @@ INSTALLED_APPS = [
'wagtail.admin',
'wagtail.core',
- 'wagtailcache',
'modelcluster',
'taggit',
@@ -87,18 +86,8 @@ MIDDLEWARE = [
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'wagtail.contrib.redirects.middleware.RedirectMiddleware',
- 'wagtailcache.cache.FetchFromCacheMiddleware',
]
-CACHES = {
- 'default': {
- 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
- 'LOCATION': os.path.join(BASE_DIR, 'cache'),
- 'KEY_PREFIX': 'wagtailcache',
- 'TIMEOUT': 3600, # one hour (in seconds)
- }
-}
-
X_FRAME_OPTIONS = 'ALLOWALL'
ROOT_URLCONF = 'ckanorg.urls'
diff --git a/ckanorg/settings/base.py b/ckanorg/settings/base.py
index be311ca..d0b68dc 100644
--- a/ckanorg/settings/base.py
+++ b/ckanorg/settings/base.py
@@ -192,11 +181,13 @@ WAGTAIL_SITE_NAME = "ckanorg"
BASE_URL = '<https://ckan.org'>
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
-EMAIL_HOST = 'email-smtp.eu-central-1.amazonaws.com'
+EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
-EMAIL_HOST_USER = 'AKIAUWX42BAVQ3UFZFUU'
-DEFAULT_FROM_EMAIL = 'noreply@ckan.org'
+EMAIL_HOST_USER = 'linkdigitaltest@gmail.com'
+DEFAULT_FROM_EMAIL = 'linkdigitaltest@gmail.com'
+EMAIL_HOST_PASSWORD = 'my-password'
+
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_CONFIRM_EMAIL_ON_GET = True
@@ -216,20 +207,11 @@ ALLOWED_HOSTS = ['*']
WAGTAIL_APPEND_SLASH = False
-with open(BASE_DIR + '/../config/secret.txt') as f:
- data = f.read().strip().split(',')
- SECRET_KEY = data[0]
- EMAIL_HOST_PASSWORD = data[1]
- DB_HOST = data[2]
- DB_PASS = data[3]
+SECRET_KEY = "qwerty"
You will not see some images, as media folder is empty. If you need them, you can edit pages in admin section and upload your test images. (To login as admin into the provided sqlite database, contact managers).
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
to work with django models and styles.
- Create a new fork from
main
branch of the repositoryhttps://github.com/ckan/ckan.org
. A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project. So all tasks that you push are going to our fork repository, not the main one. If it was done earlier be sure you have clonedmain
branch of the repository with last updates. - Create a new branch from
main
branch of your forked repository and name it as "[task key] / [task summary]
". - Make all required changes.
- Push your finished task code to your fork repository (cloned).
- Deploy your changes to Development environment by making a Pull Request to
develop
branch of original repository so the PO (Product owner) can merge it after he/she will test the work done on Development.
- software
OS: Ubuntu 20.04.4 LTS Python: 3.8.10
- hardware
CPU: Intel® Core™ i7 GPU: Intel® HD Graphics 4000
This material is copyright (c) 2006-2018 Open Knowledge Foundation and contributors.
It is open and licensed under the GNU Affero General Public License (AGPL) v3.0 whose full text may be found at: