Source code for the ckan.org website
ckan.org
Alex-Pavlyuk
, ostyhar
, rbrtmrtn
, amercader
, alexmorev
|—— blog
| |—— management
| |—— commands
|—— ckan_pages
|—— ckanorg
| |—— settings
| |—— static
| |—— css
| |—— fonts
| |—— img
| |—— js
| |—— scss
| |—— templates
| |—— account
| |—— blog
| |—— ckan_pages
| |—— contact
| |—— events
| |—— faq
| |—— home
| |—— snippets
| |—— tags
| |—— wagtailadmin
| |—— wagtailmetadata
|—— contact
|—— dashboard
|—— events
|—— faq
|—— 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
requirements.txt
#:~/wagtail$ python3 -m venv wagenv
#:~/wagtail$ source wagenv/bin/activate
(wagenv) #:~/wagtail$ git clone https://github.com/ckan/ckan.org.git
psycopg2
in requirements.txt
.wheel
library(wagenv) #:~/wagtail$ pip install wheel
requirements.txt
in project root folder. Be aware about versions of these dependencies!!!(wagenv) #:~/wagtail$ pip install -r requirements.txt
cache
and media
links from ckan.org folder.media
folder in the ckan.org
directory.static
folder in the ckan.org
directory and run python manage.py collectstatic
.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'),
}
}
NOTE. Wagtail 5.0.2 uses PostgreSQL 12 or later
(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',
- '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
SECRET_KEY
variable:@@ -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"
python manage.py runserver
.http://127.0.0.1:8000/
.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.
Populate the references table and ensure that usage counts for images, documents and snippets are displayed accurately
python manage.py rebuild_references_index
main
branch of the repository https://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 cloned main
branch of the repository with last updates.main
branch of your forked repository and name it as "[task key] / [task summary]
".develop
branch of original repository so the PO (Product owner) can merge it after he/she will test the work done on Development.OS: Ubuntu 22.04.2 LTS (Jammy)
Python: 3.8.17
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: