Code

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#11243 closed (fixed)

Not possible to add Model with URLField with the Admin Interface

Reported by: engrams Owned by: nobody
Component: contrib.admin Version: 1.1-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

---
models.py

from django.db import models

# Create your models here.
class Weblink(models.Model):

url = models.URLField(unique=True)
def unicode(self):

return self.url

class Weblink2(models.Model):

url = models.CharField(max_length=200, unique=True)
def unicode(self):

return self.url

---
Activated Admin Interface.

Can add Weblink Objects via the Postgres Database Interface (pgadmin). But not with
the Django Admin interface. If the object save button is clicked at the http://localhost:8002/admin/references/weblink/add/ nothing is happening. Only Waiting for Localhost in Firefox and page loading activity in Firefox.

Objects without URLField can be added via the Admin Interface without problems (Weblink2 is working).
Worked in the release 1.0 but need the Development version (need the development version because of proxy classes in the model).

Django version 1.1 beta 1, using settings 'testproject.settings'
Development server is running at http://127.0.0.1:8002/
Quit the server with CONTROL-C.
[01/Jun/2009 04:36:05] "GET / HTTP/1.1" 404 1915
[01/Jun/2009 04:36:09] "GET /admin HTTP/1.1" 301 0
[01/Jun/2009 04:36:09] "GET /admin/ HTTP/1.1" 200 3986
[01/Jun/2009 04:36:12] "GET /admin/references/weblink2/add/ HTTP/1.1" 200 2688
[01/Jun/2009 04:36:12] "GET /admin/jsi18n/ HTTP/1.1" 200 803
[01/Jun/2009 04:36:17] "POST /admin/references/weblink2/add/ HTTP/1.1" 302 0
[01/Jun/2009 04:36:17] "GET /admin/references/weblink2/ HTTP/1.1" 200 3032
[01/Jun/2009 04:36:21] "GET /admin/references/ HTTP/1.1" 200 2297
[01/Jun/2009 04:36:23] "GET /admin/references/weblink/add/ HTTP/1.1" 200 2681
[01/Jun/2009 04:36:23] "GET /admin/jsi18n/ HTTP/1.1" 200 803

Attachments (1)

testproject.tar.gz (4.0 KB) - added by engrams 5 years ago.
example project which shows the bug

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by engrams

example project which shows the bug

comment:1 Changed 5 years ago by dc

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #9857

comment:2 Changed 4 years ago by russellm

  • Resolution changed from duplicate to fixed

(In [11747]) Fixed #11243 -- Ensured that bash_completion output is emitted in sorted order. Thanks to Alex Gaynor for the report.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.