#9918: URL field validation false negative
---------------------------------+------------------------------------------
          Reporter:  aglzen      |         Owner:  nobody             
            Status:  reopened    |     Milestone:                     
         Component:  Forms       |       Version:  1.0                
        Resolution:              |      Keywords:  URLField validation
             Stage:  Unreviewed  |     Has_patch:  0                  
        Needs_docs:  0           |   Needs_tests:  0                  
Needs_better_patch:  0           |  
---------------------------------+------------------------------------------
Changes (by aglzen):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 Nope, this is definitely an issue.  I haven't been able to track down
 what's causing it, but I get it in a brand-new app, for an otherwise well-
 behaved URLField.

 To reproduce, try entering one of the above URLs into any admin interface
 URLField, or use an app like the below:

 urls.py:
 {{{
 from django.conf.urls.defaults import *
 from test_app.models import *
 urlpatterns = patterns('django.views.generic.create_update',
     (r'^', 'create_object',{'model':TestModel}),
 )
 }}}

 settings.py:
 {{{
 ROOT_URLCONF = 'urls'

 import os
 PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
 TEMPLATE_DIRS = (
     os.path.join(PROJECT_PATH, 'templates')
 )

 INSTALLED_APPS = (
         'test_app',
 )
 }}}

 test_app/models.py:
 {{{
 from django.db import models

 # Create your models here.
 class TestModel(models.Model):
         test_url = models.URLField()
 }}}

 templates/test_app/testmodel_form.html
 {{{
 <html><head></head>
 <body>
         <form action="." method="POST">
         {{form}}
         <input type="submit"/>
         </form>
 </body>
 }}}

 On runserver, and load of 127.0.0.1:8000, enter one of the URLs in the
 original ticket, and receive "This URL appears to be a broken link."

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9918#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to