input: Write a python function to get all URL patterns from a Django project.
  assert get_all_urlpatterns() == ['/', '/products/', '/cart/', '/customers/', '/admin/', '/__debug__/']
output: def get_all_urlpatterns():
      from django.urls import URLPattern, URLResolver
      from django.urls import get_resolver
  
      def list_urls(lis, acc=None):
          if acc is None:
              acc = []
          for x in lis:
              if isinstance(x, URLPattern):
                  acc.append(x.pattern.regex.pattern)
              elif isinstance(x, URLResolver):
                  list_urls(x.url_patterns, acc)
          return acc
  
      resolver = get_resolver()
      patterns = list_urls(resolver.url_patterns)
      return [pattern for pattern in patterns if pattern != '^$']