Re: form.Forms + POST + forms.ChoiceField

2012-04-03 Thread Sergiy Khohlov
try to use django generic class view https://docs.djangoproject.com/en/dev/topics/class-based-views/ Sorting is added by adding next construction to the your class view: class yourclassview(ListView): """ model = yourmodel context_object_name = 'object_or_list'

Re: form.Forms + POST + forms.ChoiceField

2012-04-02 Thread Barry Morrison
If you could point me to a more recent tutorial, I'm more than willing to go through it. Basically what I have now, is a list of links. I want to sort those links based on source (Reddit) then subreddit (Python). The source and subreddits are fed from my DB and I want to select them from a

Re: form.Forms + POST + forms.ChoiceField

2012-04-02 Thread Sergiy Khohlov
Ok. I'm not definitely sure what you want to have but I'm proposing to do simple project with next functionality: 1) prepare list of the links 2) ability to click at the link and receive some additional information about link 3) button for deleting of the link 4) button for creating

Re: form.Forms + POST + forms.ChoiceField

2012-04-02 Thread Barry Morrison
Too much code? I'd rather too much than not enough, but if it'd help, I can cut down on future posts. Thanks for the information/guidance. I'll try your suggestions and post my findings. Much appreciated! On Monday, April 2, 2012 2:18:29 AM UTC-7, skhohlov wrote: > > So much code ;-) >

Re: form.Forms + POST + forms.ChoiceField

2012-04-02 Thread Sergiy Khohlov
So much code ;-) at first I'm proposing to add some code for form.is_valid block for example : if form.is_valid(): source = Sources.objects.get(name=source) allPosts = Posts.objects.filter(PostSource=source) subreddits = SubReddits.objects.all()

form.Forms + POST + forms.ChoiceField

2012-04-01 Thread Barry Morrison
Full Disclosure: I've been using Python for 5-6 months. Django for maybe 3 I have this: https://gist.github.com/a934fe08643e0c3ee017 In an effort to teach myself, I'm simply building a Django app. For teaching purposes only. It's an aggregator of favorites across multiple sites. Right now, I'm