How to use the datacite.models.DOI.objects.create_for_data function in datacite

To help you get started, we’ve selected a few datacite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-machine-learning / mldata / datacite / views.py View on Github external
def datacite_post(request, slug):
    """
        View posts new data to datacite and requests for a DOI
    """
    data = Data.get_object(slug)
    if request.user == data.user:
        DOI.objects.create_for_data(data)
    return HttpResponseRedirect(reverse('data_view_slug', args=[slug,]))