Skip to content

Commit 132ae52

Browse files
authored
Merge pull request #10 from juntagrico/1.6
1.6
2 parents 88fe0c0 + bdb617e commit 132ae52

File tree

4 files changed

+57
-9
lines changed

4 files changed

+57
-9
lines changed

.github/workflows/ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will cookiecut the code and roughly check if the result works.
2+
3+
name: ci
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main, release/** ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
env:
15+
JUNTAGRICO_SECRET_KEY: fake
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.11'
22+
- name: run cookiecutter
23+
run: |
24+
pip install cookiecutter
25+
cookiecutter . --no-input
26+
- name: test run app
27+
run: |
28+
cd code
29+
pip install -r requirements.txt
30+
python -m manage collectstatic
31+
python -m manage test juntagrico.tests.test_profile
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
juntagrico~=1.5.0
1+
juntagrico~=1.6.0
22
gunicorn==22.0.0
3-
psycopg2==2.8.4
3+
psycopg>=3.1.8

{{cookiecutter.code}}/{{cookiecutter.project_slug}}/settings.py

+24-6
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
'django.contrib.messages',
3131
'django.contrib.staticfiles',
3232
'django.contrib.admin',
33+
'{{cookiecutter.project_slug}}',
3334
'juntagrico',
35+
'fontawesomefree',
36+
'import_export',
3437
'impersonate',
3538
'crispy_forms',
3639
'adminsortable2',
37-
'{{cookiecutter.project_slug}}',
3840
'polymorphic',
3941
]
4042

@@ -126,8 +128,14 @@
126128
STATIC_URL = 'static/'
127129
STATIC_ROOT = BASE_DIR / 'static'
128130

129-
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
130-
131+
STORAGES = {
132+
"default": {
133+
"BACKEND": "django.core.files.storage.FileSystemStorage",
134+
},
135+
"staticfiles": {
136+
"BACKEND": "django.contrib.staticfiles.storage.ManifestStaticFilesStorage",
137+
},
138+
}
131139

132140
# django.contrib.sites Settings
133141

@@ -141,7 +149,7 @@
141149
'django.contrib.auth.backends.ModelBackend'
142150
)
143151

144-
LOGIN_REDIRECT_URL = "/my/home"
152+
LOGIN_REDIRECT_URL = "/"
145153

146154

147155
# django.contrib.sessions Settings
@@ -161,6 +169,11 @@
161169
CRISPY_TEMPLATE_PACK = 'bootstrap4'
162170

163171

172+
# import_export Settings
173+
174+
IMPORT_EXPORT_EXPORT_PERMISSION_CODE = 'view'
175+
176+
164177
# juntagrico Settings
165178

166179
WHITELIST_EMAILS = []
@@ -192,6 +205,11 @@ def whitelist_email_from_env(var_env_name):
192205
"ESR" : "{{cookiecutter.ESR}}"}
193206
SHARE_PRICE = "{{cookiecutter.share_price}}"
194207

195-
INFO_EMAIL = "{{cookiecutter.info_email}}"
196-
SERVER_URL = "{{cookiecutter.server_url}}"
208+
CONTACTS = {
209+
"general": "{{cookiecutter.info_email}}"
210+
}
211+
ORGANISATION_WEBSITE = {
212+
'name': "{{cookiecutter.server_url}}",
213+
'url': "https://{{cookiecutter.server_url}}"
214+
}
197215
STYLES = {'static': ['{{cookiecutter.project_slug}}/css/customize.css']}

{{cookiecutter.code}}/{{cookiecutter.project_slug}}/urls.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
path('admin/', admin.site.urls),
77
path('impersonate/', include('impersonate.urls')),
88
path('', include('juntagrico.urls')),
9-
path('', juntagrico.views.home),
109
]

0 commit comments

Comments
 (0)