add saving favorite locations
[qcg-portal.git] / filex / forms.py
index 1c9ffe9..db6587b 100644 (file)
@@ -1,6 +1,15 @@
 # coding=utf-8
 from django import forms
 
+from filex.models import Favorite
+
+
+class FavoriteForm(forms.ModelForm):
+    class Meta:
+        model = Favorite
+        fields = ('owner', 'host', 'path')
+        widgets = {'owner': forms.HiddenInput()}
+
 
 class NewDirForm(forms.Form):
     host = forms.CharField(label=u'Host', max_length=256, widget=forms.HiddenInput())