Index: generic/date_based.py
===================================================================
--- generic/date_based.py	(revision 593)
+++ generic/date_based.py	(working copy)
@@ -2,12 +2,13 @@
 from django.core.exceptions import Http404, ObjectDoesNotExist
 from django.core.extensions import DjangoContext as Context
 from django.core.xheaders import populate_xheaders
+from django.views.generic import get_dynamic_lookup
 from django.models import get_module
 from django.utils.httpwrappers import HttpResponse
 import datetime, time
-
+           
 def archive_index(request, app_label, module_name, date_field, num_latest=15,
-                  template_name=None, extra_lookup_kwargs={}, extra_context={}):
+                  template_name=None, extra_lookup_kwargs={}, extra_context={}, **keywds):
     """
     Generic top-level archive of date-based objects.
 
@@ -21,6 +22,8 @@
     mod = get_module(app_label, module_name)
     lookup_kwargs = {'%s__lte' % date_field: datetime.datetime.now()}
     lookup_kwargs.update(extra_lookup_kwargs)
+    lookup_kwargs.update(get_dynamic_lookup(keywds))
+    
     date_list = getattr(mod, "get_%s_list" % date_field)('year', **lookup_kwargs)[::-1]
     if not date_list:
         raise Http404("No %s.%s available" % (app_label, module_name))
@@ -49,7 +52,7 @@
     return HttpResponse(t.render(c))
 
 def archive_year(request, year, app_label, module_name, date_field,
-                 template_name=None, extra_lookup_kwargs={}, extra_context={}):
+                 template_name=None, extra_lookup_kwargs={}, extra_context={},**keywds):
     """
     Generic yearly archive view.
 
@@ -67,6 +70,8 @@
     if int(year) >= now.year:
         lookup_kwargs['%s__lte' % date_field] = now
     lookup_kwargs.update(extra_lookup_kwargs)
+    lookup_kwargs.update(get_dynamic_lookup(keywds))
+    
     date_list = getattr(mod, "get_%s_list" % date_field)('month', **lookup_kwargs)
     if not date_list:
         raise Http404
@@ -86,7 +91,7 @@
 
 def archive_month(request, year, month, app_label, module_name, date_field,
                   month_format='%b', template_name=None, extra_lookup_kwargs={},
-                  extra_context={}):
+                  extra_context={},**keywds):
     """
     Generic monthly archive view.
 
@@ -119,6 +124,7 @@
     if last_day >= now.date():
         lookup_kwargs['%s__lte' % date_field] = now
     lookup_kwargs.update(extra_lookup_kwargs)
+    lookup_kwargs.update(get_dynamic_lookup(keywds))
     object_list = mod.get_list(**lookup_kwargs)
     if not object_list:
         raise Http404
@@ -138,7 +144,7 @@
 
 def archive_day(request, year, month, day, app_label, module_name, date_field,
                 month_format='%b', day_format='%d', template_name=None,
-                extra_lookup_kwargs={}, extra_context={}, allow_empty=False):
+                extra_lookup_kwargs={}, extra_context={}, allow_empty=False,**keywds):
     """
     Generic daily archive view.
 
@@ -167,6 +173,7 @@
     if date >= now.date():
         lookup_kwargs['%s__lte' % date_field] = now
     lookup_kwargs.update(extra_lookup_kwargs)
+    lookup_kwargs.update(get_dynamic_lookup(keywds))
     object_list = mod.get_list(**lookup_kwargs)
     if not allow_empty and not object_list:
         raise Http404
@@ -201,7 +208,7 @@
 def object_detail(request, year, month, day, app_label, module_name, date_field,
                   month_format='%b', day_format='%d', object_id=None, slug=None,
                   slug_field=None, template_name=None, template_name_field=None,
-                  extra_lookup_kwargs={}, extra_context={}):
+                  extra_lookup_kwargs={}, extra_context={},**keywds):
     """
     Generic detail view from year/month/day/slug or year/month/day/id structure.
 
@@ -230,6 +237,7 @@
     else:
         raise AttributeError("Generic detail view must be called with either an object_id or a slug/slugfield")
     lookup_kwargs.update(extra_lookup_kwargs)
+    lookup_kwargs.update(get_dynamic_lookup(keywds))    
     try:
         object = mod.get_object(**lookup_kwargs)
     except ObjectDoesNotExist:
Index: generic/list_detail.py
===================================================================
--- generic/list_detail.py	(revision 593)
+++ generic/list_detail.py	(working copy)
@@ -5,9 +5,10 @@
 from django.core.extensions import DjangoContext as Context
 from django.core.paginator import ObjectPaginator, InvalidPage
 from django.core.exceptions import Http404, ObjectDoesNotExist
+from django.views.generic import get_dynamic_lookup
 
 def object_list(request, app_label, module_name, paginate_by=None, allow_empty=False,
-                template_name=None, extra_lookup_kwargs={}, extra_context={}):
+                template_name=None, extra_lookup_kwargs={}, extra_context={},**kwargs):
     """
     Generic list of objects.
 
@@ -34,6 +35,8 @@
     """
     mod = models.get_module(app_label, module_name)
     lookup_kwargs = extra_lookup_kwargs.copy()
+    lookup_kwargs.update(get_dynamic_lookup(keywds))
+    
     if paginate_by:
         paginator = ObjectPaginator(mod, lookup_kwargs, paginate_by)
         page = request.GET.get('page', 0)
@@ -73,7 +76,7 @@
 
 def object_detail(request, app_label, module_name, object_id=None, slug=None,
                   slug_field=None, template_name=None, template_name_field=None,
-                  extra_lookup_kwargs={}, extra_context={}):
+                  extra_lookup_kwargs={}, extra_context={},**kwargs):
     """
     Generic list of objects.
 
@@ -91,6 +94,8 @@
     else:
         raise AttributeError("Generic detail view must be called with either an object_id or a slug/slug_field")
     lookup_kwargs.update(extra_lookup_kwargs)
+    lookup_kwargs.update(get_dynamic_lookup(keywds))
+    
     try:
         object = mod.get_object(**lookup_kwargs)
     except ObjectDoesNotExist:
Index: generic/__init__.py
===================================================================
--- generic/__init__.py	(revision 593)
+++ generic/__init__.py	(working copy)
@@ -0,0 +1,15 @@
+def get_dynamic_lookup(keywords):
+   lookups = {}
+   
+   if keywords.has_key("dynamic_lookup_kwargs"):
+       dynamic_lookup_kwargs = keywords["dynamic_lookup_kwargs"]
+
+       del keywords["dynamic_lookup_kwargs"]
+
+       for lookup, url_keyword in dynamic_lookup_kwargs.items():
+           if keywords.has_key(url_keyword):
+               lookups[lookup] = keywords[url_keyword]
+           else:
+               raise Exception, "dynamic variable %s, was needed but is not defined in the url pattern" % (url_keyword)
+
+   return lookups
