from django.contrib import admin

from timed.projects.admin import ProjectAdmin
from timed.projects.models import Project
from timed_adfinis.redmine.models import RedmineProject

admin.site.unregister(Project)


class RedmineProjectInline(admin.StackedInline):
    model = RedmineProject


@admin.register(Project)
class ProjectAdmin(ProjectAdmin):
    """Adfinis specific project including Redmine issue configuration."""

    inlines = ProjectAdmin.inlines + [RedmineProjectInline, ]

from django.contrib import admin

from timed.projects.admin import ProjectAdmin
from timed.projects.models import Project
from timed_adfinis.redmine.models import RedmineProject
from timed_adfinis.subscription.admin import SubscriptionProjectInline

admin.site.unregister(Project)


class RedmineProjectInline(admin.StackedInline):
    model = RedmineProject


@admin.register(Project)
class ProjectAdmin(ProjectAdmin):
    """Adfinis specific project including Redmine issue configuration."""

    inlines = ProjectAdmin.inlines + [
        RedmineProjectInline, SubscriptionProjectInline
    ]

Add support subscriptions for parity with SSA portal
Add support subscriptions for parity with SSA portal

These includes:
* customer password
* subscription and packages
* orders
* import from timescout

  from django.contrib import admin
  
  from timed.projects.admin import ProjectAdmin
  from timed.projects.models import Project
  from timed_adfinis.redmine.models import RedmineProject
+ from timed_adfinis.subscription.admin import SubscriptionProjectInline
  
  admin.site.unregister(Project)
  
  
  class RedmineProjectInline(admin.StackedInline):
      model = RedmineProject
  
  
  @admin.register(Project)
  class ProjectAdmin(ProjectAdmin):
      """Adfinis specific project including Redmine issue configuration."""
  
-     inlines = ProjectAdmin.inlines + [RedmineProjectInline, ]
+     inlines = ProjectAdmin.inlines + [
+         RedmineProjectInline, SubscriptionProjectInline
+     ]
  
Add support subscriptions for parity with SSA portal
## Code Before:
from django.contrib import admin

from timed.projects.admin import ProjectAdmin
from timed.projects.models import Project
from timed_adfinis.redmine.models import RedmineProject

admin.site.unregister(Project)


class RedmineProjectInline(admin.StackedInline):
    model = RedmineProject


@admin.register(Project)
class ProjectAdmin(ProjectAdmin):
    """Adfinis specific project including Redmine issue configuration."""

    inlines = ProjectAdmin.inlines + [RedmineProjectInline, ]

## Instruction:
Add support subscriptions for parity with SSA portal
## Code After:
from django.contrib import admin

from timed.projects.admin import ProjectAdmin
from timed.projects.models import Project
from timed_adfinis.redmine.models import RedmineProject
from timed_adfinis.subscription.admin import SubscriptionProjectInline

admin.site.unregister(Project)


class RedmineProjectInline(admin.StackedInline):
    model = RedmineProject


@admin.register(Project)
class ProjectAdmin(ProjectAdmin):
    """Adfinis specific project including Redmine issue configuration."""

    inlines = ProjectAdmin.inlines + [
        RedmineProjectInline, SubscriptionProjectInline
    ]
