
from snowy.accounts.models import UserProfile
from snowy.notes.models import Note, NoteTag
from reversion.admin import VersionAdmin
from django.contrib import admin

class NoteAdmin(VersionAdmin):
    list_display = ('created', 'author', 'title')
    search_fields = ['content', 'title']
    prepopulated_fields = {'slug': ('title',)}

admin.site.register(Note, NoteAdmin)
admin.site.register(NoteTag)
admin.site.register(UserProfile)


from snowy.accounts.models import UserProfile
from snowy.notes.models import Note, NoteTag
#from reversion.admin import VersionAdmin
from django.contrib import admin

#class NoteAdmin(VersionAdmin):
class NoteAdmin(admin.ModelAdmin):
    list_display = ('created', 'author', 'title')
    search_fields = ['content', 'title']
    prepopulated_fields = {'slug': ('title',)}

admin.site.register(Note, NoteAdmin)
admin.site.register(NoteTag)
admin.site.register(UserProfile)

Complete removal of reversion usage
Complete removal of reversion usage

  
  from snowy.accounts.models import UserProfile
  from snowy.notes.models import Note, NoteTag
- from reversion.admin import VersionAdmin
+ #from reversion.admin import VersionAdmin
  from django.contrib import admin
  
- class NoteAdmin(VersionAdmin):
+ #class NoteAdmin(VersionAdmin):
+ class NoteAdmin(admin.ModelAdmin):
      list_display = ('created', 'author', 'title')
      search_fields = ['content', 'title']
      prepopulated_fields = {'slug': ('title',)}
  
  admin.site.register(Note, NoteAdmin)
  admin.site.register(NoteTag)
  admin.site.register(UserProfile)
  
Complete removal of reversion usage
## Code Before:

from snowy.accounts.models import UserProfile
from snowy.notes.models import Note, NoteTag
from reversion.admin import VersionAdmin
from django.contrib import admin

class NoteAdmin(VersionAdmin):
    list_display = ('created', 'author', 'title')
    search_fields = ['content', 'title']
    prepopulated_fields = {'slug': ('title',)}

admin.site.register(Note, NoteAdmin)
admin.site.register(NoteTag)
admin.site.register(UserProfile)

## Instruction:
Complete removal of reversion usage
## Code After:

from snowy.accounts.models import UserProfile
from snowy.notes.models import Note, NoteTag
#from reversion.admin import VersionAdmin
from django.contrib import admin

#class NoteAdmin(VersionAdmin):
class NoteAdmin(admin.ModelAdmin):
    list_display = ('created', 'author', 'title')
    search_fields = ['content', 'title']
    prepopulated_fields = {'slug': ('title',)}

admin.site.register(Note, NoteAdmin)
admin.site.register(NoteTag)
admin.site.register(UserProfile)
