Code Monkey home page Code Monkey logo

gouvpt's Introduction

gouvpt

Official uData 2.7.1 (Python 3) theme for the Open Data Portal of Portugal

Usage

Clone and install the theme package in your udata environment:

git clone https://github.com/amagovpt/gouvpt.git
pip install gouvpt/

Then, define the installed theme as current in you udata.cfg:

PLUGINS = ['gouvpt_saml','gouvpt_faqs']
THEME = 'gouvpt'
DEFAULT_LANGUAGE = 'pt'

Portuguese Smart Card Authentication

Portuguese uData portal provides authentication with SmartIdCards and Autenticacao.gov.pt

Install dependencies:

apt-get install xmlsec1

Generate private/public key:

openssl req -nodes -new -x509 -keyout saml/private.pem -keyform PEM -out saml/AMA.pem -outform PEM

Set your udata.cfg with the following parameters

  • SECURITY_SAML_ENTITY_ID = 'www.dadosabertos.gov.pt' : Entity ID
  • SECURITY_SAML_ENTITY_NAME = 'DadosAbertosUdata' : Entity Name
  • SECURITY_SAML_KEY_FILE = '...path.../private.pem' : Private Entity key PEM file path
  • SECURITY_SAML_CERT_FILE = '...path.../AMA.pem' : Public Entity Certificate PEM file path
  • SECURITY_SAML_IDP_METADATA = 'metadata_file1.xml,metadata_file2.xml,..' : Metadata files for IDP's
  • SECURITY_SAML_FAAALEVEL = 1 : : Authentication Level requested to autenticacao.gov.pt

See autenticacao.gov.pt and SAML2 protocol docs for feature information.

Development

Local setup

If you want to execute some development tasks like extracting the translations or running the test suite, you need to install the dependencies localy (in a virtualenv).

python3 -m venv venv
source venv/bin/activate
pip install -r requirements/develop.pip

Ok, you are ready, you can now execute some Development commands.

udata -?
Available tasks:

  init                Initialize your udata instance (search index, user, etc... )
  generate-fixtures   Build sample fixture data (users, datasets, etc... )
  serve               Runs a development server.
  test                Runs the test suite.
  shell               Run a shell in the app context.

Return to udata directory and run:

./run.sh

Run tests with:

pytest

gouvpt's People

Contributors

eupsama avatar gpsilv4 avatar micael-grilo avatar noirbizarre avatar pedromayapires avatar petzlux avatar taniasferreira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gouvpt's Issues

[Sugestão] Não abrir o dropdown com resultados da busca se não estiver preenchido o campo de "Pesquisar"

Resumo
Atualmente quando clicamos no campo de busca (Pesquisar) no header, abre-se uma dropdown vazia (pois ainda não temos valor digitado na busca)...

Plano de teste

  1. Acessar a URL
  2. Clicar no campo de Pesquisar sem ainda ter digitado algo no input

Ou veja o GIF abaixo:

datasets

Sugestão de correção
Ao clicar no botão ou ele receber o foco (click / focus), se o valor do input ainda estiver vazio, então não devemos abrir o dropdown...

A solução deverá ser algo parecido com:

$('[name="q"]').on("focus click", function(e) {
  const $searchInput = $(this).val();
  if ($searchInput.length >= 1 || $searchInput) {
    // open Dropdown && doStuff();
  }
});

[Sugestão] Adicionar um link para os contatos

Resumo
Atualmente na lista do rodapé, o menu de contactos é o único que não tem um sub-item;
Embora o menu já seja clicável, talvez fosse mais intuitivo adicionar um sub-item chamado "formulário de contacto" ou qualquer coisa neste estilo para facilitar o entendimento de quem acessar o site...

Plano de teste

  1. Acessar a URL ou qualquer outra página do site
  2. Fazer scroll down até o fim da página

Ou veja na imagem abaixo:

contactos

Sugestão de correção
Adicionar um sub-item chamado: "Formulário de contacto" que redirecione para a seguinte página.

A solução deverá ser algo parecido com:

<li><a href="/pt/contact/">Formulário de contacto</a></li>

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.