src/jukedj/models.py
def add_default_atypes(project):
    """Add or create the default assettypes for the given project

    :param project: the project that needs default assettypes
    :type project: :class:`muke.models.Project`
    :returns: None
    :rtype: None
    :raises: None
    """
    # create assettypes for project
    for name, desc in DEFAULT_ASSETTYPES:
        at, created = Atype.objects.get_or_create(name=name, defaults={'description': desc})
        at.projects.add(project)
        at.full_clean()
        at.save()
def add_default_atypes(project):
    """Add or create the default assettypes for the given project

    :param project: the project that needs default assettypes
    :type project: :class:`muke.models.Project`
    :returns: None
    :rtype: None
    :raises: None
    """
    # create assettypes for project
    for name, desc in DEFAULT_ASSETTYPES:
        at, created = Atype.objects.get_or_create(name=name, defaults={'description': desc})
        at.projects.add(project)
        at.full_clean()
        at.save()
Add or create the default assettypes for the given project

    :param project: the project that needs default assettypes
    :type project: :class:`muke.models.Project`
    :returns: None
    :rtype: None
    :raises: None