Exemple #1
0
along with this program.  If not, see <http://www.gnu.org/licenses/>
"""

__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _

from prometeo.core.utils import check_dependency
from prometeo.core.widgets.models import *
from prometeo.core.menus.models import *

check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.auth')


def install(sender, **kwargs):
    user_area_not_logged_menu, is_new = Menu.objects.get_or_create(
        slug="user_area_not_logged")

    # Links.
    register_link, is_new = Link.objects.get_or_create(
        title=_("Register"),
        slug="register",
        description=_("Register a new account"),
        url=reverse("user_register"),
        only_authenticated=False,
        menu=user_area_not_logged_menu)
Exemple #2
0
__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _
from django.contrib.auth.models import Group

from prometeo.core.auth.models import MyPermission
from prometeo.core.utils import check_dependency
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature
from prometeo.core.widgets.models import *

check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.auth')
check_dependency('prometeo.core.notifications')

def install(sender, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")
    users_group, is_new = Group.objects.get_or_create(name=_('Users'))

    # Menus.
    calendar_menu, is_new = Menu.objects.get_or_create(
        slug="calendar-menu",
        description=_("Main menu for calendar")
    )
Exemple #3
0
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _
from django.contrib.auth.models import Group

from prometeo.core.auth.models import MyPermission
from prometeo.core.utils import check_dependency
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature

from ..models import *

check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.auth')
check_dependency('prometeo.documents')
check_dependency('prometeo.partners')


def install(sender, created_models, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")

    can_view_partner, is_new = MyPermission.objects.get_or_create_by_natural_key(
        "view_partner", "partners", "partner")
    can_add_partner, is_new = MyPermission.objects.get_or_create_by_natural_key(
        "add_partner", "partners", "partner")
    can_view_contact, is_new = MyPermission.objects.get_or_create_by_natural_key(
Exemple #4
0
__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _
from django.contrib.auth.models import Group

from prometeo.core.auth.models import MyPermission
from prometeo.core.utils import check_dependency
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature

check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.auth')
check_dependency('prometeo.todo')

def install(sender, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")
    users_group, is_new = Group.objects.get_or_create(name=_('Users'))
    employees_group, is_new = Group.objects.get_or_create(name=_('Employees'))

    # Menus.
    project_menu, is_new = Menu.objects.get_or_create(
        slug="project-menu",
        description=_("Main menu for projects")
    )
Exemple #5
0
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _
from django.contrib.auth.models import Group

from prometeo.core.auth.models import MyPermission
from prometeo.core.utils import check_dependency
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature

from ..models import *

check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.auth')
check_dependency('prometeo.products')
check_dependency('prometeo.partners')
check_dependency('prometeo.documents')

def install(sender, created_models, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")
    administrative_employees_group, is_new = Group.objects.get_or_create(name=_('Administrative Employees'))

    # Menus.
    stock_menu, is_new = Menu.objects.get_or_create(
        slug="stock_menu",
        description=_("Main menu for stock management")
Exemple #6
0
You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>
"""

__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _

from prometeo.core.utils import check_dependency
from prometeo.core.widgets.models import *
from prometeo.core.menus.models import *

check_dependency('prometeo.core.widgets')


def install(sender, **kwargs):
    sidebar_region, is_new = Region.objects.get_or_create(slug="sidebar")

    # Menus.
    main_menu, is_new = Menu.objects.get_or_create(slug="main",
                                                   description=_("Main menu"))

    # Widgets.
    menu_widget_template, is_new = WidgetTemplate.objects.get_or_create(
        title=_("Menu"),
        slug="menu-widget-template",
        description=_("It renders a menu."),
        source="prometeo.core.widgets.base.dummy",
Exemple #7
0
__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _
from django.contrib.auth.models import Group

from prometeo.core.auth.models import MyPermission
from prometeo.core.utils import check_dependency
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature
from prometeo.core.widgets.models import *

check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.auth')


def install(sender, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")
    users_group, is_new = Group.objects.get_or_create(name=_('Users'))

    # Menus.
    todo_menu, is_new = Menu.objects.get_or_create(
        slug="todo_menu", description=_("Main menu for tasks"))

    # Links.
    tasks_link, is_new = Link.objects.get_or_create(
Exemple #8
0
You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>
"""

__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _

from prometeo.core.utils import check_dependency
from prometeo.core.widgets.models import *

check_dependency('prometeo.core.widgets')

def install(sender, **kwargs):    
    # Widgets.
    categories_widget_template, is_new = WidgetTemplate.objects.get_or_create(
        title=_("Categories"),
        slug="categories-widget-template",
        description=_("It renders the category tree."),
        source="prometeo.core.taxonomy.widgets.categories",
        template_name="taxonomy/widgets/categories.html",
    )

    tag_cloud_widget_template, is_new = WidgetTemplate.objects.get_or_create(
        title=_("Tags cloud"),
        slug="tag-cloud-widget-template",
        description=_("It renders the tags cloud."),
Exemple #9
0
along with this program.  If not, see <http://www.gnu.org/licenses/>
"""

__author__ = 'Emanuele Bertoldi <*****@*****.**>'
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _

from prometeo.core.utils import check_dependency
from prometeo.core.widgets.models import *
from prometeo.core.menus.models import *

check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.auth')

def install(sender, **kwargs):
    user_area_not_logged_menu, is_new = Menu.objects.get_or_create(slug="user_area_not_logged")
    
    # Links.
    register_link, is_new = Link.objects.get_or_create(
        title=_("Register"),
        slug="register",
        description=_("Register a new account"),
        url=reverse("user_register"),
        only_authenticated=False,
        menu=user_area_not_logged_menu
    )
Exemple #10
0
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _
from django.contrib.auth.models import Group #, User

from prometeo.core.auth.models import MyPermission
from prometeo.core.utils import check_dependency
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature

from ..models import *

check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.auth')
check_dependency('prometeo.addressing')
check_dependency('prometeo.documents')

def install(sender, created_models, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")
    administrative_employees_group, is_new = Group.objects.get_or_create(name=_('Administrative Employees'))

    # Menus.
    partners_menu, is_new = Menu.objects.get_or_create(
        slug="partners_menu",
        description=_("Main menu for partners app")
    )
Exemple #11
0
along with this program.  If not, see <http://www.gnu.org/licenses/>
"""

__author__ = "Emanuele Bertoldi <*****@*****.**>"
__copyright__ = "Copyright (c) 2011 Emanuele Bertoldi"
__version__ = "0.0.5"

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb
from django.utils.translation import ugettext_noop as _

from prometeo.core.auth.models import MyPermission
from prometeo.core.menus.models import *
from prometeo.core.utils import check_dependency

check_dependency("prometeo.core.menus")
check_dependency("prometeo.core.auth")


def install(sender, **kwargs):
    user_profile_menu, is_new = Menu.objects.get_or_create(
        slug="user_profile_menu", description=_("Main menu for user profiles")
    )

    # Links.
    user_profile_notifications_link, is_new = Link.objects.get_or_create(
        title=_("Notifications"),
        slug="user_profile_notifications",
        url="{% url notification_list object.username %}",
        menu=user_profile_menu,
    )
Exemple #12
0
__copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi'
__version__ = '0.0.5'

from django.core.urlresolvers import reverse
from django.db.models.signals import post_syncdb, post_save
from django.utils.translation import ugettext_noop as _
from django.contrib.contenttypes.models import ContentType

from prometeo.core.utils import check_dependency
from prometeo.core.widgets.models import *
from prometeo.core.menus.models import *
from prometeo.core.notifications.models import Signature

from ..models import *

check_dependency('django.contrib.auth')
check_dependency('django.contrib.contenttypes')
check_dependency('django.contrib.comments')
check_dependency('prometeo.core.widgets')
check_dependency('prometeo.core.menus')
check_dependency('prometeo.core.taxonomy')
check_dependency('prometeo.core.notifications')

def install(sender, **kwargs):
    main_menu, is_new = Menu.objects.get_or_create(slug="main")
    sidebar_region, is_new = Region.objects.get_or_create(slug="sidebar")
    
    # Menus.
    user_area_not_logged_menu, is_new = Menu.objects.get_or_create(
        slug="user_area_not_logged",
        description=_("User area for anonymous users")