Giter Club home page Giter Club logo

ckanext-widgets's People

Contributors

poguez avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zoek1

ckanext-widgets's Issues

Add views for error status codes

Add a view for error status codes

We need add a templates for error status codes because in a widget maybe looks ugly the default error page.

I propose implement views for principal error status codes and analyze other possible error codes:

  • 401 - Unauthorized to read resource
  • 404 - Resource not found
  • 500 - Internal server error

deepinscreenshot20140715052638

La imagen del widget no se despliega de manera correcta

screenshot from 2014-09-17 11 47 52

In the results of the API call we don't get the dictionary with the path to the image in the image_url field.

"organization": {
"description": "Cartográfica es una empresa que se especializa en el análisis geoespacial, así como en la generación de mapas dinámicos e infografías.",
"created": "2014-08-14T14:09:49.234689",
"title": "Cartográfica",
"name": "cartografica",
"revision_timestamp": "2014-08-14T18:10:10.762406",
"is_organization": true,
"state": "active",
"image_url": "20140814-180949.158037cartografica.png",
"revision_id": "e694ebb5-4a00-499f-a285-5b5c870e7d3a",
"type": "organization",
"id": "d2581ddd-7dba-413a-b678-a2ff15ca8f0b",
"approval_status": "approved"
},
The "image_url" in the dictionary doesn't go through the dictization that takes place in group dictize:
https://github.com/ckan/ckan/blob/b0ca98a14fce1d4f7f9578723cd9cd3150da5335/ckan/lib/dictization/model_dictize.py#L429-438

It just returns the first organization:
https://github.com/ckan/ckan/blob/b0ca98a14fce1d4f7f9578723cd9cd3150da5335/ckan/lib/dictization/model_dictize.py#L249-259


Español

En los resultados de la llamada a la API no regresa de manera correcta el diccionario con el path a la imagen.

La imagen que regresa la llamada de package no pasa por el preprocesamiento de la URL de la imagen:
https://github.com/ckan/ckan/blob/b0ca98a14fce1d4f7f9578723cd9cd3150da5335/ckan/lib/dictization/model_dictize.py#L429-438

Sino que regresa directamente el diccionario de la organización si preformatear la url de la imagen.
https://github.com/ckan/ckan/blob/b0ca98a14fce1d4f7f9578723cd9cd3150da5335/ckan/lib/dictization/model_dictize.py#L249-259

"organization": {
"description": "Cartográfica es una empresa que se especializa en el análisis geoespacial, así como en la generación de mapas dinámicos e infografías.",
"created": "2014-08-14T14:09:49.234689",
"title": "Cartográfica",
"name": "cartografica",
"revision_timestamp": "2014-08-14T18:10:10.762406",
"is_organization": true,
"state": "active",
"image_url": "20140814-180949.158037cartografica.png",
"revision_id": "e694ebb5-4a00-499f-a285-5b5c870e7d3a",
"type": "organization",
"id": "d2581ddd-7dba-413a-b678-a2ff15ca8f0b",
"approval_status": "approved"
},

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.