Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Problem with customising dashboard forms

35 views
Skip to first unread message

Ewa Adamus

unread,
Mar 2, 2025, 11:33:19 AMMar 2
to django-oscar
Hi everyone,
I want to customise catalogue product model, adding few additional fields. 
So, after forking catalogue app - everything was ok, I wanted to customise dashboard forms, to make additional  fields appear. And I have: django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: catalogue

My sklep/sklepapps/catalogue/models.py:

from django.db import models

from oscar.apps.catalogue.abstract_models import AbstractProduct


class Product(AbstractProduct):

rodzaj = models.CharField(max_length=255, unique=True, blank=True, null=True)

opis = models.TextField(max_length=1000, help_text="Krótka charakterystyka typu miodu", unique=True, blank=True, null=True) # dla dłuższych opisów

miody_foto = models.ImageField(upload_to = 'miody_foto', unique=True, blank=True, null=True, default='miody_foto/spadz.jpg')


from oscar.apps.catalogue.models import *


my sklep/sklepapps/dashboard/catalogue/forms.py:


from oscar.apps.dashboard.catalogue import forms as base_forms


class ProductForm(base_forms.ProductForm):


class Meta(base_forms.ProductForm.Meta):


fields = (

'opis', 'rodzaj','miody_foto'

)


my settings.py:

INSTALLED_APPS = [

'django.contrib.admin',

'django.contrib.auth',

'django.contrib.contenttypes',

'django.contrib.sessions',

'django.contrib.messages',

'django.contrib.staticfiles',


'django.contrib.sites',

'django.contrib.flatpages',


'oscar.config.Shop',

'oscar.apps.analytics.apps.AnalyticsConfig',

'oscar.apps.checkout.apps.CheckoutConfig',

'oscar.apps.address.apps.AddressConfig',

'oscar.apps.shipping.apps.ShippingConfig',

#'oscar.apps.catalogue.apps.CatalogueConfig',

'oscar.apps.catalogue.reviews.apps.CatalogueReviewsConfig',

'oscar.apps.communication.apps.CommunicationConfig',

'oscar.apps.partner.apps.PartnerConfig',

'oscar.apps.basket.apps.BasketConfig',

'oscar.apps.payment.apps.PaymentConfig',

'oscar.apps.offer.apps.OfferConfig',

'oscar.apps.order.apps.OrderConfig',

'oscar.apps.customer.apps.CustomerConfig',

'oscar.apps.search.apps.SearchConfig',

'oscar.apps.voucher.apps.VoucherConfig',

'oscar.apps.wishlists.apps.WishlistsConfig',

'oscar.apps.dashboard.apps.DashboardConfig',

'oscar.apps.dashboard.reports.apps.ReportsDashboardConfig',

'oscar.apps.dashboard.users.apps.UsersDashboardConfig',

'oscar.apps.dashboard.orders.apps.OrdersDashboardConfig',

#'oscar.apps.dashboard.catalogue.apps.CatalogueDashboardConfig',# do zmiany chyba

'oscar.apps.dashboard.offers.apps.OffersDashboardConfig',

'oscar.apps.dashboard.partners.apps.PartnersDashboardConfig',

'oscar.apps.dashboard.pages.apps.PagesDashboardConfig',

'oscar.apps.dashboard.ranges.apps.RangesDashboardConfig',

'oscar.apps.dashboard.reviews.apps.ReviewsDashboardConfig',

'oscar.apps.dashboard.vouchers.apps.VouchersDashboardConfig',

'oscar.apps.dashboard.communications.apps.CommunicationsDashboardConfig',

'oscar.apps.dashboard.shipping.apps.ShippingDashboardConfig',


# 3rd-party apps that oscar depends on

'widget_tweaks',

'haystack',

'treebeard',

'sorl.thumbnail', # Default thumbnail backend, can be replaced

'django_tables2',

#my apps:

'sklepapps.catalogue.apps.CatalogueConfig',

'sklepapps.dashboard.catalogue'

]



Ewa Adamus

unread,
Mar 3, 2025, 2:55:46 AMMar 3
to django...@googlegroups.com
Hi everyone,
I send these message again to the googlegroup, because not sure previous was sent in proper way.
I want to customise catalogue product model, adding few additional fields. 
So, according to oscar docs: I forked ‘catalogue' app - everything was ok, I wanted to customise dashboard forms, to make additional  fields appear. 
And I have: django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: catalogue
don’t know, what ‘m I missing. Any help would be appreciated

With best regards

Ewa

Ewa Adamus

unread,
Mar 3, 2025, 11:21:04 AMMar 3
to django...@googlegroups.com
Hi,
I see. I didn’t fork dashboard app. 
But if I try to fork main dashboard:

 ./manage.py oscar_fork_app dashboard myapps  


get:

ModuleNotFoundError:


Can anyone, any hint?


Ewa

Aaron Jack

unread,
Mar 3, 2025, 4:05:12 PMMar 3
to django-oscar
do you have a directory called myapps?

do you need to replace 'myapps' with 'sklepapps'

Reply all
Reply to author
Forward
0 new messages