<commit_before>from os import path, makedirs

from django.conf import settings
from django.contrib.admin import widgets
from django import forms
from django.template.defaultfilters import slugify
from django.template import mark_safe

from ella.photos.models import Photo
from ella.media.models import Media
from ella.photos.imageop import get_img_size


class PhotoWidget(widgets.ForeignKeyRawIdWidget):
    """
    Widget for photo with option to generate screenshot from video

    TODO: more user friendly form
    """
    def render(self, name, value, attrs=None):
        print value
        return mark_safe(
             'Generate photo <input type="checkbox" name="%s" %s /> at <input type="text" name="%s" /> second or use custom: %s' % \<commit_msg>- deleted forgotten print statements<commit_after>from os import path, makedirs

from django.conf import settings
from django.contrib.admin import widgets
from django import forms
from django.template.defaultfilters import slugify
from django.template import mark_safe

from ella.photos.models import Photo
from ella.media.models import Media
from ella.photos.imageop import get_img_size


class PhotoWidget(widgets.ForeignKeyRawIdWidget):
    """
    Widget for photo with option to generate screenshot from video

    TODO: more user friendly form
    """
    def render(self, name, value, attrs=None):
        return mark_safe(
             'Generate photo <input type="checkbox" name="%s" %s /> at <input type="text" name="%s" /> second or use custom: %s' % \
{'fraction_non_alphanumeric': 0.08207485226526592, 'fraction_numerical': 0.0, 'mean_word_length': 4.046357615894039, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1635095', 'n_tokens_mistral': 415, 'n_tokens_neox': 402, 'n_words': 158}