Skip to content

Commit

Permalink
Merge branch 'main' into task/WP-453--tapisproject-django-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondsgarrett committed Apr 3, 2024
2 parents 28a8092 + 00b610b commit 906d967
Show file tree
Hide file tree
Showing 63 changed files with 161 additions and 861 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Related

<!--
- [FP-123](https://jira.tacc.utexas.edu/browse/FP-123)
- [WP-123](https://tacc-main.atlassian.net/browse/WP-123)
- requires https://github.com/TACC/Core-CMS/pull/117
-->

Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/ptdatax-cms.yml

This file was deleted.

127 changes: 5 additions & 122 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,56 +1,18 @@
# ignore intellij IDE things
.idea/

# OsX DS_Store nonsense
# macOS DS_Store nonsense
.DS_Store
nohup.out

# ignore virtualenv folder
.env/

/portal/.docs/build/

#ignore local static and media folders
server/static
server/portal/static/vendor/lib/node_modules
server/media
server/cms
server/docs

# Ignore local Django settings
# ignore secrets & settings
## so dev learns those should not be committed in this repo
*secrets.py
*settings_secret.py
*settings_custom.py
*settings_local.py

docker_repo.var
server/src

#ignore portal.env
portal.env

#celery
celerybeat-schedule

# don't commit certs
certs/

# no node modules
node_modules/

#no coverage
client/coverage

# no client build
client/build/

# no client side build
/portal/static/build/

# in case you leave that here
datadump.json

# no development databases
db.sqlite3*

# ignore various Python things
__pycache__/
Expand Down Expand Up @@ -81,90 +43,11 @@ docs/_build/
.docs/build/
target/

/server/conf/docker/logs.txt

###############################
# Ansible .gitignores content.
.vagrant/
/static
Vagrantfile.local
vagrantfile.local
*.retry

# Custom

# Byte-compiled / optimized / DLL files
*.zip
*.exe
*.msi
__pycache__/
*.py[cod]
db.sqlite3
logs/
log/
docker/requirements.txt
.db/
# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
# distribution / packaging
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Ansible config files
playbooks/hosts
!playbooks/group_vars/*.example.yml
!playbooks/roles/secret_files/.gitkeep

# vscode
.vscode/

# Gitcrypt key
portal_crypt.key

# vim stuff
*.swp
3 changes: 3 additions & 0 deletions a2cps_cms/src/taccsite_cms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `taccsite_cms/`

Add files to overwrite those in this directory within [Core-CMS](https://github.com/TACC/Core-CMS).
39 changes: 0 additions & 39 deletions a2cps_cms/src/taccsite_cms/settings_custom.py

This file was deleted.

4 changes: 2 additions & 2 deletions apcd-cms/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TACC/Core-CMS#v3.11.6
FROM taccwma/core-cms:c5bea4c
# TACC/Core-CMS#v4.5.0
FROM taccwma/core-cms:5473db7

WORKDIR /code

Expand Down
2 changes: 1 addition & 1 deletion apcd-cms/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- core_cms_net

postgres:
image: postgres:11.5
image: postgres:14.9
environment:
- POSTGRES_PASSWORD=taccforever
- POSTGRES_USER=postgresadmin
Expand Down
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/admin_exception/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.apps import AppConfig

class AdminExceptionConfig(AppConfig):
name = 'admin_exception'
name = 'apps.admin_exception'
2 changes: 2 additions & 0 deletions apcd-cms/src/apps/admin_exception/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def getDate(row):
context['org_options'].append(entity_name)
# to make sure All is first in the dropdown filter options after sorting alphabetically
context['org_options'] = sorted(context['org_options'], key=lambda x: (x != 'All', x))
# Remove empty strings
context['org_options'] = [option for option in context['org_options'] if option != '']
if status not in context['status_options']:
if status != None:
context['status_options'].append(status)
Expand Down
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/admin_extension/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.apps import AppConfig

class AdminExtensionConfig(AppConfig):
name = 'admin_extension'
name = 'apps.admin_extension'
2 changes: 2 additions & 0 deletions apcd-cms/src/apps/admin_extension/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def getDate(row):
if entity_name not in context['org_options']:
context['org_options'].append(entity_name)
context['org_options'] = sorted(context['org_options'], key=lambda x: (x != 'All', x))
# Remove empty strings
context['org_options'] = [option for option in context['org_options'] if option != '']
if status not in context['status_options']:
context['status_options'].append(status)
context['status_options'] = sorted(context['status_options'], key=lambda x: (x != 'All', x))
Expand Down
4 changes: 2 additions & 2 deletions apcd-cms/src/apps/admin_regis_table/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.apps import AppConfig


class CustomExampleConfig(AppConfig):
name = 'custom_example'
class AdminRegConfig(AppConfig):
name = 'apps.admin_regis_table'
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/admin_regis_table/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.urls import path
from apps.admin_regis_table.views import RegistrationsTable

app_name = 'administration'
app_name = 'admin_regis_table'
urlpatterns = [
path('list-registration-requests/', RegistrationsTable.as_view(), name='admin_regis_table'),
path(r'list-registration-requests/?status=(?P<status>)/', RegistrationsTable.as_view(), name='admin_regis_table'),
Expand Down
6 changes: 3 additions & 3 deletions apcd-cms/src/apps/admin_regis_table/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from apps.utils.registrations_data_formatting import _set_registration
from apps.components.paginator.paginator import paginator
import logging
from dateutil import parser
from datetime import date as datetimeDate

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -95,7 +95,7 @@ def get_context_data(self, registrations_content, registrations_entities, regist

def getDate(row):
date = row[1]
return date if date is not None else parser.parse('1-1-0001') # put 'None' date entries all together at end of listing
return date if date is not None else datetimeDate(1,1,1) # put 'None' date entries all together at end of listing w/ date 1-1-0001

registrations_content = sorted(registrations_content, key=lambda row:getDate(row), reverse=True) # sort registrations by newest to oldest

Expand Down Expand Up @@ -126,5 +126,5 @@ def getDate(row):

context['query_str'] = queryStr
context.update(paginator(self.request, registration_table_entries))
context['pagination_url_namespaces'] = 'administration:admin_regis_table'
context['pagination_url_namespaces'] = 'admin_regis_table:admin_regis_table'
return context
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/admin_submissions/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.apps import AppConfig

class SubmissionConfig(AppConfig):
name = 'admin_submissions'
name = 'apps.admin_submissions'
5 changes: 5 additions & 0 deletions apcd-cms/src/apps/apcd_login/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class APCDLoginConfig(AppConfig):
name = 'apps.apcd_login'
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/exception/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.apps import AppConfig

class ExceptionFormConfig(AppConfig):
name = 'exception'
name = 'apps.exception'
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ <h4>Acknowledgment of Terms</h4>
id="requestor-email" pattern="^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[a-z]{2,4}$" />
</div>
</div>
<div class="field-wrapper textinput required"><label>
I request an exception on behalf of:
</label></div>


<div class="field-wrapper checkbox required">
<div class="field-errors" style="display: none"></div>
Expand Down Expand Up @@ -384,6 +380,7 @@ <h4>Acknowledgment of Terms</h4>
// exception block number
function getHelpText(fieldSelection, file_type, exceptions) {
helpText = document.getElementById(`help-text-threshold-requested_${exceptions}`);
thresholdInput = document.getElementById(`threshold-requested_${exceptions}`)
$.ajax({
url: "{% url 'exception:get-cdls' %}",
type: 'GET',
Expand All @@ -392,9 +389,10 @@ <h4>Acknowledgment of Terms</h4>
},
success: function(response) {
let cdls = response;
//To change help text for requested threshold percentage
//To change input's max value & help text for requested threshold percentage
for (let i = 0; i < cdls.length; i++)
if (fieldSelection == cdls[i].field_list_code) {
thresholdInput.max = cdls[i].threshold_value
helpText.innerHTML = "";
helpText.innerHTML = `Must be less than the ${cdls[i].threshold_value}% required.`
};
Expand Down
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/extension/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.apps import AppConfig

class ExtensionFormConfig(AppConfig):
name = 'extension'
name = 'apps.extension'
Loading

0 comments on commit 906d967

Please sign in to comment.