<commit_before># coding=utf-8
from django import forms
from .models import Photo, Album


class NewImage(forms.ModelForm):
    class Meta:
        model = Photo
        fields = ['title', 'description', 'published', 'photo']


class NewAlbum(forms.ModelForm):
    class Meta:
        model = Album
        fields = ['title', 'description', 'published', 'photos']

    def __init__(self, profile_=None, *args, **kwargs):
        super(NewAlbum, self).__init__(*args, **kwargs)
        self.fields['photos'].queryset = self.fields['photos'].queryset.filter(owner=profile_)


class EditPhoto(forms.ModelForm):
    class Meta:
        model = Photo
        fields = ['title', 'description', 'published', 'photo']<commit_msg>removed photo upload field from photo edit form<commit_after># coding=utf-8
from django import forms
from .models import Photo, Album


class NewImage(forms.ModelForm):
    class Meta:
        model = Photo
        fields = ['title', 'description', 'published', 'photo']


class NewAlbum(forms.ModelForm):
    class Meta:
        model = Album
        fields = ['title', 'description', 'published', 'photos']

    def __init__(self, profile_=None, *args, **kwargs):
        super(NewAlbum, self).__init__(*args, **kwargs)
        self.fields['photos'].queryset = self.fields['photos'].queryset.filter(owner=profile_)


class EditPhoto(forms.ModelForm):
    class Meta:
        model = Photo
        fields = ['title', 'description', 'published']
{'fraction_non_alphanumeric': 0.14129692832764504, 'fraction_numerical': 0.0013651877133105802, 'mean_word_length': 3.538699690402477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5536968', 'n_tokens_mistral': 425, 'n_tokens_neox': 407, 'n_words': 113}