[EMAIL PROTECTED] wrote:
>
>
> On Nov 7, 1:53 pm, Jonathan Buchanan <[EMAIL PROTECTED]>
> wrote:
>> [EMAIL PROTECTED] wrote:
>>> Here's what I've done:
>>> if request.method == 'POST':
>>> submission = request.POST.copy()
>>> submission['slug'] = slugify(submission['name'])
>>>
On Nov 7, 1:53 pm, Jonathan Buchanan <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] wrote:
> > Here's what I've done:
>
> > if request.method == 'POST':
> > submission = request.POST.copy()
> > submission['slug'] = slugify(submission['name'])
> > form = ClubFormClass(subm
[EMAIL PROTECTED] wrote:
> Here's what I've done:
>
> if request.method == 'POST':
> submission = request.POST.copy()
> submission['slug'] = slugify(submission['name'])
> form = ClubFormClass(submission)
> if Club.objects.get(slug=submission['slug']):
> f
Here's what I've done:
if request.method == 'POST':
submission = request.POST.copy()
submission['slug'] = slugify(submission['name'])
form = ClubFormClass(submission)
if Club.objects.get(slug=submission['slug']):
form.errors['name'] = 'Club is already in
I have a public-facing form where registered users can submit clubs.
Later, I access the data by slug, using a generic object_detail view.
My problem is that someone can input a club that's already there.
Besides polluting the database, it breaks when they try to access the
club's page (GET retur
5 matches
Mail list logo