from django.contrib import admin
from friendlyurls.models import *

class UrlMappingAdmin(admin.ModelAdmin):
  list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)


from django.contrib import admin
from friendlyurls.models import *

class UrlMappingAdmin(admin.ModelAdmin):
  list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
  search_fields = ('friendly_path','content_type__name')
admin.site.register(UrlMapping, UrlMappingAdmin)


Allow searching of vanity urls
Allow searching of vanity urls

  from django.contrib import admin
  from friendlyurls.models import *
  
  class UrlMappingAdmin(admin.ModelAdmin):
    list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
+   search_fields = ('friendly_path','content_type__name')
  admin.site.register(UrlMapping, UrlMappingAdmin)
  
  
Allow searching of vanity urls
## Code Before:
from django.contrib import admin
from friendlyurls.models import *

class UrlMappingAdmin(admin.ModelAdmin):
  list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)


## Instruction:
Allow searching of vanity urls
## Code After:
from django.contrib import admin
from friendlyurls.models import *

class UrlMappingAdmin(admin.ModelAdmin):
  list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
  search_fields = ('friendly_path','content_type__name')
admin.site.register(UrlMapping, UrlMappingAdmin)

