Giter Club home page Giter Club logo

cti-website-backend's People

Contributors

abhishek-ac avatar akibrhast avatar cnk avatar dependabot[bot] avatar emecas avatar fyliu avatar giosce avatar kliu28 avatar shinjonathan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cti-website-backend's Issues

Create Org API endpoint must return better error for duplicate names

We need to put a try/except around saving the org and then return sensible error messages in JSON format.

Example of an error we need to catch and report:

IntegrityError at /api/organizations/
duplicate key value violates unique constraint "data_organization_name_key"
DETAIL:  Key (name)=(test org 2) already exists.
Request Method:	POST
Request URL:	http://localhost:8888/api/organizations/
Django Version:	3.1.8
Exception Type:	IntegrityError
Exception Value:	
duplicate key value violates unique constraint "data_organization_name_key"
DETAIL:  Key (name)=(test org 2) already exists.

[BACKEND][BUG] Geeting Error while tryign to use `django-admin dumpdata` in `cti-website-backend_web_1` container

Error Message

# django-admin dumpdata faqs
Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 8, in <module>
    sys.exit(execute_from_command_line())
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 368, in execute
    self.check()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 392, in check
    all_issues = checks.run_checks(
  File "/usr/local/lib/python3.8/site-packages/django/core/checks/registry.py", line 70, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/usr/local/lib/python3.8/site-packages/django/core/checks/security/base.py", line 236, in check_default_hashing_algorithm
    if settings.DEFAULT_HASHING_ALGORITHM not in {'sha1', 'sha256'}:
  File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 63, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_HASHING_ALGORITHM, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
#

Fix:

Export environment variable pointing to settings file. It seems that for cti-website-backend_web container configuration is located in /CTI-website-backend/config/settings.py file

Ref: https://stackoverflow.com/questions/47700347/django-core-exceptions-improperlyconfigured-requested-setting-use-i18n-but-set#47700674

Assist with migrating deployment to Terraform

Overview

Hello there!

The Ops team is changing the way we deploy applications in Incubator, and we need the help of someone on this project to accomplish that. Thanks in advance!

There was a project.hcl file created and edited by a member of this project at one point - they'll need to be the one to participate.

Action Items

There's an epic issue that describes the overall process: hackforla/incubator#20

Please follow the guide there to effect the Terraform migration of this project's deployment!

Resources/Instructions

The Issue above has all the details you should need. We're using it as a central clearinghouse, so we'll updating it with any new information or clarifications so that we can help everybody.

Please reach out to @nyarly (@judson on slack) or @JasonEb (same handle) with any questions.

Deploy Site To HackForLa New Incubator

Overview

We have some work to do deploying the site to H4LA's new incubator infrastructure (AWS, terraform, terragrunt). We need to do some GitHub Actions work to automate deploying there. And there are a couple of scripts that need writing to fill in data from GitHub APIs; it's probably most convenient to do those in Python so we can use the Django ORM to put things into the database.

Action Items

  • tbd

Resources

  • tbd

Run AWS containers with DEBUG=False

We should not be using DEBUG=True in our containers on AWS. But if we turn that to False with our current set up, we don't get any of the static files served. Install nginx in the container and serve static files from that and the dynamic stuff by proxying to gunicorn.

Create API for Index Contributors filter

Overview

We need to create an API for Index Contributors filter so it can be used on the Organizations page.

Action Items

  • Create an API that will filter the organizations that have already tagged their repositories with civictechindex

Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.