urlpatterns = patterns('yourapp.views', url(
    '^static_pages/(?P<static_pages_id>\\d+)/(?P<True_or_False>\\D+)$',
    your_view_here, name='your_name_here'))

def your_view_here(request, static_pages_id, True_or_False):
    pass
Django dynamic urls