GithubHelp home page GithubHelp logo

Comments (7)

CarlQLange avatar CarlQLange commented on June 10, 2024 6

Just in case someone wants this (and I think lots do), here's a copy-pastable solution:

In ckanext-scheming/ckanext/scheming/templates/scheming/package/snippets/package_form.html

from

{% block metadata_fields %}
{% endblock %}

to

{% block metadata_fields %}
  {% block package_metadata_fields_custom %}
    {% block custom_fields %}
      {% snippet 'snippets/custom_form_fields.html', extras=data.extras, errors=errors, limit=3 %}
    {% endblock %}
  {% endblock %}
{% endblock %}

from ckanext-scheming.

wardi avatar wardi commented on June 10, 2024

Just not yet implemented.

The way I'm using scheming I don't want free-form extras, but many users would like to still offer support and the combining schema extras and free-form extras should work with the latest ckan master. We should have a way to specify if free-form dataset extras should be allowed with a schema.

from ckanext-scheming.

florianm avatar florianm commented on June 10, 2024

Cool, no worries. I've got some prod data in extra fields which is tricky to migrate as any edit to a dataset with scheming fields deletes any extra fields. Would be great to choose from displaying extra fields or not, and retaining them (or not). Had a look in the code but couldn't figure out where the magic needs to happen :-)

from ckanext-scheming.

florianm avatar florianm commented on June 10, 2024

@wardi as scheming disables free-form extra fields, and harvesting requires them, what's the path of least resistance to ckan_harvest between two ckan instances with (easy: the same, harder: different) custom dataset schemas?

from ckanext-scheming.

wardi avatar wardi commented on June 10, 2024

@florianm free-form extras should work if we just add the edit fields back to the template. Care to give that a try?

The only problem is: how do we handle free-form extras with names that match the ones in the schema?

from ckanext-scheming.

NicolaiLolansen avatar NicolaiLolansen commented on June 10, 2024

@CarlQLange Thanks a lot, this works just fine (y)

from ckanext-scheming.

GordianDziwis avatar GordianDziwis commented on June 10, 2024

@wardi There is already logic which checks if a key is defined in the root or under extras.

from ckanext-scheming.

Related Issues (20)

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.