﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
480	Admin interface table detail showing incorrect number of entries	tom.haddon@…	Adrian Holovaty	"I'd posted a comment on this on the mailing list, but thought I should make a more formal ticket (http://groups.google.com/group/django-users/browse_thread/thread/8bc3ee0eb1b881bf) - please note: one of the issues posted here (being able to sort by the job field) has been resolved by including an ordering value in the model. However, the issue below is still outstanding. 

I have a table in my model as follows:

---------------------------------------


{{{
class Schedule(meta.Model):
    id = meta.AutoField(primary_key=True)
    schedule = meta.CharField(maxlength=255, help_text='This takes a
Cron-style format (min hour dom mon dow)')
    job = meta.ForeignKey(Job, db_column='jobid')
    timevariance = meta.IntegerField('Max Duration', default=30,
help_text='The maximum amount of time, in minutes, that you expect the
job to take')
    class META:
        db_table = 'schedule'
        admin = meta.Admin(
            list_display = ('schedule', 'job', 'timevariance'),
        )
}}}


---------------------------------------

For some reason, even though there are 11 records in the database for
this table the admin interface is only showing me one of them.
Underneath that one entry is message text saying ""11 schedules"", so I
know the DB API is finding them, I just don't know why it's not
displaying them.

Here's a dump of the schedules table:

----------------------------------------


{{{
--
-- PostgreSQL database dump
--

SET client_encoding = 'UNICODE';
SET check_function_bodies = false;

SET SESSION AUTHORIZATION 'postgres';

SET search_path = public, pg_catalog;

--
-- TOC entry 3 (OID 18698)
-- Name: schedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE schedule (
    id serial NOT NULL,
    schedule character varying(255),
    jobid integer,
    timevariance integer
);


--
-- Data for TOC entry 6 (OID 18698)
-- Name: schedule; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY schedule (id, schedule, jobid, timevariance) FROM stdin;
1       30 00 * * *     1       30
2       15 01 * * *     2       30
3       10 17 * * *     2       30
4       00 20 * * *     3       30
6       00 18 * * *     3       15
7       00 19 * * *     3       15
8       30 22 * * *     3       30
9       00 23 * * *     3       20
10      30 12 * * *     1       30
11      00 14 * * *     4       20
12      30 15 * * *     3       30
\.


--
-- TOC entry 5 (OID 18804)
-- Name: schedule_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY schedule
    ADD CONSTRAINT schedule_pkey PRIMARY KEY (id);


--
-- TOC entry 7 (OID 18848)
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY schedule
    ADD CONSTRAINT ""$2"" FOREIGN KEY (jobid) REFERENCES job(id);


--
-- TOC entry 4 (OID 18696)
-- Name: schedule_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('schedule_id_seq', 12, true);
}}}



"	defect	closed	contrib.admin		normal	fixed			Unreviewed	0	0	0	0	0	0
