{"id":24774371,"url":"https://github.com/pabvald/elections","last_synced_at":"2026-04-13T00:44:45.286Z","repository":{"id":37977452,"uuid":"238010586","full_name":"pabvald/elections","owner":"pabvald","description":"Small interactive web application which allows to compute the seat distribution of an Spanish election","archived":false,"fork":false,"pushed_at":"2023-08-24T20:12:36.000Z","size":19552,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T02:55:33.941Z","etag":null,"topics":["asta","css3","django","docker-containers","html5","javascript","python"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pabvald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-03T16:31:42.000Z","updated_at":"2024-10-27T08:02:34.000Z","dependencies_parsed_at":"2022-09-06T15:40:59.440Z","dependency_job_id":null,"html_url":"https://github.com/pabvald/elections","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabvald%2Felections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabvald%2Felections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabvald%2Felections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabvald%2Felections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pabvald","download_url":"https://codeload.github.com/pabvald/elections/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245181541,"owners_count":20573717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asta","css3","django","docker-containers","html5","javascript","python"],"created_at":"2025-01-29T05:48:44.030Z","updated_at":"2026-04-13T00:44:45.234Z","avatar_url":"https://github.com/pabvald.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 1. Project structure\n\nThe following describes the content of each of the folders in this repository:\n\n- **democrazy/**: contains the basic files of the Django project\n    \n- **docs/**\n    - **examples/**: contains two example *.jon* files with the data of a regional and a local election. Both files can be loaded into the system\n                \u003cbr\u003e - *cyl_2019.json*\n                \u003cbr\u003e - *valladolid_2019.json*\n    - **schema/**\n                \u003cbr\u003e - *election_schema.json*: schema that specifies the format that the .json files that are used to import / export data in the system must have\n    - **uml-models/**:\n                \u003cbr\u003e - *uml-models.asta*: analysis and design models in a single file *.asta*\n- **main/**\n  - **forms/**: contains the *Python* files with the *forms* of Django\n  \n  - **migrations/**: contains files in which all the changes that have been made to the logical design of the BD since the creation of the project are registered)\n  - **models/**: contains the *Python* files that implement the * models * of Django\n  - **services/**: contains the *Python* files that implement the services\n  - **static/**\u003cbr\u003e\n        - **photos/**: contains the photos included in the HTML files \u003cbr\u003e\n        - **scripts/**: contains *JavaScript* files that give dynamism to HTML pages \u003cbr\u003e\n        - **styles/**: contains *CSS* style files that modify the appearance of HTML pages \u003cbr\u003e\n        \n  - **templates/**: contains HTML + DTL files\n  - **tests/**: contains the unit tests that have been implemented\n  - **views/**: contains the *Python* files with the *views* of Django\n    \u003cbr\u003e ...\n- **db.sqlite**: file containing the SQLite3 database\n- **Dockerfile**: builds the docker containers, both the Dajndo and the nginx web server needed to deploy the application\n- **docker-compose.yml**: defines the use of docker containers\n- **docker-requirements**: text file containing the installation dependencies of docker containers\n- **manage.py**: Django's own file and serves to manage the application through a unified interface\n- **nginx.conf**: web server configuration file nginx\n- **run-coverage.sh**: run the tests in the *main/tests/* directory and provide a report of the coverage of those tests\n- **run-lint.sh**: run the *flake8* tool to evaluate the quality of the written code\n- **run-test.sh**: run the tests in the *main/tests/* directory\n\n### 2. System execution\nTo execute the project you need to install\n- Docker (https://docs.docker.com/install/)\n- Docker Compose (https://docs.docker.com/compose/install/)\n\nOnce both Docker and Docker Compose are installed, it is necessary to perform the following steps to boot the system:\n\n1. Through a console, access the repository folder\n2. Execute the command\n\n```\ndocker-compose up --build\n```\n\n3. Open the browser and go to the address\n```\nlocalhost: 8080\n```\n\n### 3. Execution of the *.sh* files\n\nOnce the system is executing, to be able to execute any of the * .sh * files it is necessary to follow the following steps:\n\n1. Through a console, access the repository folder\n2. Execute the following command so that the corresponding .sh file is executed in the Django * docker * container:\n\n```\ndocker-compose exec django run - ****. sh\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabvald%2Felections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpabvald%2Felections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabvald%2Felections/lists"}