Re: admin list_filter: limit choices to model values?

2012-02-02 Thread Micky Hulse
On Wed, Feb 1, 2012 at 1:59 PM, Micky Hulse  wrote:
> Anywho... Anyone know when Django 1.4 is scheduled to be released?



[quote]

The Django 1.4 roadmap

Before the final Django 1.4 release, several other preview/development
releases will be made available. The current schedule consists of at
least the following:

* Week of January 30, 2012: First Django 1.4 beta release; final
feature freeze for Django 1.4.

* Week of February 27, 2012: First Django 1.4 release candidate;
string freeze for translations.

* Week of March 5, 2012: Django 1.4 final release.

If necessary, additional alpha, beta or release-candidate packages
will be issued prior to the final 1.4 release. Django 1.4 will be
released approximately one week after the final release candidate.

[/quote]

--

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: admin list_filter: limit choices to model values?

2012-02-01 Thread Micky Hulse
Related to my original question:

On top of needing to limit list_filter in the admin, I also needed to
limit the user choices in my FK to auth.user. This bit of code does
just that:



Just thought I would share the code to help others.

I am wondering if I can apply the same logic, as a method, to list_filter?

list_filter = SomeMethod()

(probably not, but that would be nice)

Anywho... Anyone know when Django 1.4 is scheduled to be released?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: admin list_filter: limit choices to model values?

2012-01-30 Thread JHeasly
In 1.4/trunk, looks like filterspec.py gets replaced by filters.py (as part 
of adding the ability to filter a list_filter), so we'll just sit tight and 
wait for 1.4 to be released (rather than have to go  back and remove the 
defunct filterspec code).

— John

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/fHJwHJZDaZMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: admin list_filter: limit choices to model values?

2012-01-25 Thread Micky Hulse
On Fri, Jan 13, 2012 at 3:35 PM, Micky Hulse  wrote:
> Would it be possible for me to setup my list_filter to only show
> author names that have been assigned to my flat pages? For example,
> let's say I have 10 pages, and two of those pages have the been FK'd
> to "bjohnson" and "fjackson"... In my list_filter view, I would like
> to only see "bjohnson" and "fjackson".

Just as an update, I found this:



... and it looks like what I need... Unfortunately, it's new in trunk
(I'm on 1.3).

I am hoping there's something similar to SimpleListFilter in 1.3.

I'm now trying to figure out how to browse Django source for version 1.3. :)

I will post back with more info if I figure something out.

Thanks!
Micky

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: admin list_filter: limit choices to model values?

2012-01-13 Thread Micky Hulse
Maybe simpler: Is there an easy way to limit the list_filter to folks
with "Superuser status"?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



admin list_filter: limit choices to model values?

2012-01-13 Thread Micky Hulse
Hi.

Not sure where to start... Just hoping someone can give me a kick in
the right direction.

I have built a flat page app that allows for an author FK (optional field).

When I setup the admin to allow author as a list_filter, the actual
filter list of authors is way to long to be useful.

Would it be possible for me to setup my list_filter to only show
author names that have been assigned to my flat pages? For example,
let's say I have 10 pages, and two of those pages have the been FK'd
to "bjohnson" and "fjackson"... In my list_filter view, I would like
to only see "bjohnson" and "fjackson".

Does any of this make sense? :D

Any tips and/or advice would be awesome.

Thanks!
Micky

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.