Site Sections: Satchmo Main | Wiki | Demo Store |

Changeset 1461

Show
Ignore:
Timestamp:
08/27/08 22:57:11 (3 months ago)
Author:
bkroeze
Message:

removing all core=True calls for compatibility with latest Django HEAD

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • satchmo/trunk/satchmo/contact/models.py

    r1424 r1461  
    3737    An organization can be a company, government or any kind of group. 
    3838    """ 
    39     name = models.CharField(_("Name"), max_length=50, core=True
     39    name = models.CharField(_("Name"), max_length=50,
    4040    type = models.CharField(_("Type"), max_length=30, 
    4141        choices=ORGANIZATION_CHOICES) 
     
    9999    with. 
    100100    """ 
    101     first_name = models.CharField(_("First name"), max_length=30, core=True
    102     last_name = models.CharField(_("Last name"), max_length=30, core=True
     101    first_name = models.CharField(_("First name"), max_length=30,
     102    last_name = models.CharField(_("Last name"), max_length=30,
    103103    user = models.ForeignKey(User, blank=True, null=True, unique=True) 
    104104    role = models.CharField(_("Role"), max_length=20, blank=True, null=True, 
     
    178178    contact = models.ForeignKey(Contact, verbose_name=_("Contact")) 
    179179    type = models.CharField(_("Type"), max_length=30,choices=INTERACTION_CHOICES) 
    180     date_time = models.DateTimeField(_("Date and Time"), core=True
     180    date_time = models.DateTimeField(_("Date and Time"),
    181181    description = models.TextField(_("Description"), max_length=200) 
    182182 
     
    196196        max_length=20, blank=True) 
    197197    phone = models.CharField(_("Phone Number"), blank=True, max_length=30, 
    198         core=True
     198       
    199199    primary = models.BooleanField(_("Primary"), default=False) 
    200200 
     
    229229    description = models.CharField(_("Description"), max_length=20, blank=True, 
    230230        help_text=_('Description of address - Home, Office, Warehouse, etc.',)) 
    231     addressee = models.CharField(_("Addressee"), core=True, max_length=80) 
    232     street1 = models.CharField(_("Street"), core=True, max_length=80) 
     231    addressee = models.CharField(_("Addressee"), max_length=80) 
     232    street1 = models.CharField(_("Street"), max_length=80) 
    233233    street2 = models.CharField(_("Street"), max_length=80, blank=True) 
    234234    state = models.CharField(_("State"), max_length=50, blank=True) 
  • satchmo/trunk/satchmo/giftcertificate/models.py

    r1424 r1461  
    104104    notes = models.TextField(_('Notes'), blank=True) 
    105105    balance_used = models.DecimalField(_("Amount Used"), decimal_places=2, 
    106         max_digits=8, core=True
     106        max_digits=8,
    107107    orderpayment = models.ForeignKey(OrderPayment, null=True, verbose_name=_('Order Payment')) 
    108108    used_by = models.ForeignKey(Contact, verbose_name=_('Used by'), 
  • satchmo/trunk/satchmo/l10n/models.py

    r1424 r1461  
    7474    """ 
    7575    country = models.ForeignKey(Country) 
    76     name = models.CharField(_('Admin Area name'), max_length=60, core=True
     76    name = models.CharField(_('Admin Area name'), max_length=60,
    7777    abbrev = models.CharField(_('Postal Abbreviation'), max_length=3, null=True, blank=True) 
    7878    active = models.BooleanField(_('Area is active'), default=True) 
  • satchmo/trunk/satchmo/payment/models.py

    r1431 r1461  
    5151    creditType = CreditChoiceCharField(_("Credit Card Type"), max_length=16) 
    5252    displayCC = models.CharField(_("CC Number (Last 4 digits)"), 
    53         max_length=4, core=True
     53        max_length=4,
    5454    encryptedCC = models.CharField(_("Encrypted Credit Card"), 
    5555        max_length=40, blank=True, null=True, editable=False) 
  • satchmo/trunk/satchmo/product/comments.py

    r1424 r1461  
    9797     
    9898    if pks: 
     99        pks = [pk for pk in pks if _is_int(pk)] 
    99100        productdict = Product.objects.in_bulk(pks) 
    100101        products = [] 
     
    116117         
    117118         
     119def _is_int(v): 
     120    try: 
     121        v = int(v) 
     122        return True 
     123    except ValueError: 
     124        return False 
  • satchmo/trunk/satchmo/product/models.py

    r1454 r1461  
    8383    """ 
    8484    site = models.ForeignKey(Site, verbose_name=_('Site')) 
    85     name = models.CharField(_("Name"), core=True, max_length=200) 
     85    name = models.CharField(_("Name"), max_length=200) 
    8686    slug = models.SlugField(_("Slug"), help_text=_("Used for URLs, auto-generated from name if blank"), blank=True) 
    8787    parent = models.ForeignKey('self', blank=True, null=True, 
     
    222222    category = models.ForeignKey(Category, related_name="translations") 
    223223    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    224     name = models.CharField(_("Translated Category Name"), max_length=255, core=True
     224    name = models.CharField(_("Translated Category Name"), max_length=255,
    225225    description = models.TextField(_("Description of category"), default='', blank=True) 
    226226    version = models.IntegerField(_('version'), default=1) 
     
    248248    caption = models.CharField(_("Optional caption"), max_length=100, 
    249249        null=True, blank=True) 
    250     sort = models.IntegerField(_("Sort Order"), core=True
     250    sort = models.IntegerField(_("Sort Order"),
    251251 
    252252    def translated_caption(self, language_code=None): 
     
    280280    categoryimage = models.ForeignKey(CategoryImage, related_name="translations") 
    281281    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    282     caption = models.CharField(_("Translated Caption"), max_length=255, core=True
     282    caption = models.CharField(_("Translated Caption"), max_length=255,
    283283    version = models.IntegerField(_('version'), default=1) 
    284284    active = models.BooleanField(_('active'), default=True) 
     
    299299    """ 
    300300    site = models.ForeignKey(Site, verbose_name=_('Site')) 
    301     name = models.CharField(_("Name of Option Group"), max_length=50, core=True, 
     301    name = models.CharField(_("Name of Option Group"), max_length=50,  
    302302        help_text=_("This will be the text displayed on the product page.")) 
    303303    description = models.CharField(_("Detailed Description"), max_length=100, 
     
    330330    optiongroup = models.ForeignKey(OptionGroup, related_name="translations") 
    331331    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    332     name = models.CharField(_("Translated OptionGroup Name"), max_length=255, core=True
     332    name = models.CharField(_("Translated OptionGroup Name"), max_length=255,
    333333    description = models.TextField(_("Description of OptionGroup"), default='', blank=True) 
    334334    version = models.IntegerField(_('version'), default=1) 
     
    358358    objects = OptionManager() 
    359359    option_group = models.ForeignKey(OptionGroup) 
    360     name = models.CharField(_("Display value"), max_length=50, core=True
     360    name = models.CharField(_("Display value"), max_length=50,
    361361    value = models.CharField(_("Stored value"), max_length=50) 
    362362    price_change = models.DecimalField(_("Price Change"), null=True, blank=True, 
     
    391391    option = models.ForeignKey(Option, related_name="translations") 
    392392    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    393     name = models.CharField(_("Translated Option Name"), max_length=255, core=True
     393    name = models.CharField(_("Translated Option Name"), max_length=255,
    394394    version = models.IntegerField(_('version'), default=1) 
    395395    active = models.BooleanField(_('active'), default=True) 
     
    436436    """ 
    437437    site = models.ForeignKey(Site, verbose_name=_('Site')) 
    438     name = models.CharField(_("Full Name"), max_length=255, core=True, blank=False, 
     438    name = models.CharField(_("Full Name"), max_length=255, blank=False, 
    439439        help_text=_("This is what the product will be called in the default site language.  To add non-default translations, use the Product Translation section below.")) 
    440440    slug = models.SlugField(_("Slug Name"), blank=True, 
     
    741741    product = models.ForeignKey('Product', related_name="translations") 
    742742    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    743     name = models.CharField(_("Full Name"), max_length=255, core=True
     743    name = models.CharField(_("Full Name"), max_length=255,
    744744    short_description = models.TextField(_("Short description of product"), help_text=_("This should be a 1 or 2 line description for use in product listing screens"), max_length=200, default='', blank=True) 
    745745    description = models.TextField(_("Description of product"), help_text=_("This field can contain HTML and should be a few paragraphs explaining the background of the product, and anything that would help the potential customer make their purchase."), default='', blank=True) 
     
    856856    """ 
    857857 
    858     name = models.CharField(_('Custom field name'), max_length=40, core=True
     858    name = models.CharField(_('Custom field name'), max_length=40,
    859859    slug = models.SlugField(_("Slug"), help_text=_("Auto-generated from name if blank"), 
    860860        blank=True) 
     
    883883    customtextfield = models.ForeignKey(CustomTextField, related_name="translations") 
    884884    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    885     name = models.CharField(_("Translated Custom Text Field Name"), max_length=255, core=True
     885    name = models.CharField(_("Translated Custom Text Field Name"), max_length=255,
    886886    version = models.IntegerField(_('version'), default=1) 
    887887    active = models.BooleanField(_('active'), default=True) 
     
    11631163    """ 
    11641164    subscription = models.ForeignKey(SubscriptionProduct) 
    1165     price = models.DecimalField(_("Price"), help_text=_("Set to 0 for a free trial.  Leave empty if product does not have a trial."), max_digits=10, decimal_places=2, null=True, core=True
     1165    price = models.DecimalField(_("Price"), help_text=_("Set to 0 for a free trial.  Leave empty if product does not have a trial."), max_digits=10, decimal_places=2, null=True,
    11661166    expire_days = models.IntegerField(_("Trial Duration"), help_text=_("Length of trial billing cycle (days).  Leave empty if product does not have a trial."), null=True, blank=True) 
    11671167 
     
    11961196    """ 
    11971197    product = models.OneToOneField(Product, verbose_name=_('Product'), primary_key=True) 
    1198     options = models.ManyToManyField(Option, core=True, verbose_name=_('Options')) 
    1199     parent = models.ForeignKey(ConfigurableProduct, core=True, validator_list=[variant_validator], verbose_name=_('Parent')) 
     1198    options = models.ManyToManyField(Option, verbose_name=_('Options')) 
     1199    parent = models.ForeignKey(ConfigurableProduct, validator_list=[variant_validator], verbose_name=_('Parent')) 
    12001200 
    12011201    objects = ProductVariationManager() 
     
    13611361    product = models.ForeignKey(Product) 
    13621362    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES, null=True, blank=True) 
    1363     name = models.SlugField(_("Attribute Name"), max_length=100, core=True
     1363    name = models.SlugField(_("Attribute Name"), max_length=100,
    13641364    value = models.CharField(_("Value"), max_length=255) 
    13651365 
     
    13771377    """ 
    13781378    product = models.ForeignKey(Product) 
    1379     price = models.DecimalField(_("Price"), max_digits=14, decimal_places=6, core=True
     1379    price = models.DecimalField(_("Price"), max_digits=14, decimal_places=6,
    13801380    quantity = models.IntegerField(_("Discount Quantity"), default=1, help_text=_("Use this price only for this quantity or higher")) 
    13811381    expires = models.DateField(_("Expires"), null=True, blank=True) 
     
    14231423    caption = models.CharField(_("Optional caption"), max_length=100, 
    14241424        null=True, blank=True) 
    1425     sort = models.IntegerField(_("Sort Order"), core=True
     1425    sort = models.IntegerField(_("Sort Order"),
    14261426 
    14271427    def translated_caption(self, language_code=None): 
     
    14541454    productimage = models.ForeignKey(ProductImage, related_name="translations") 
    14551455    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES) 
    1456     caption = models.CharField(_("Translated Caption"), max_length=255, core=True
     1456    caption = models.CharField(_("Translated Caption"), max_length=255,
    14571457    version = models.IntegerField(_('version'), default=1) 
    14581458    active = models.BooleanField(_('active'), default=True) 
  • satchmo/trunk/satchmo/shipping/modules/tiered/models.py

    r1460 r1461  
    204204class CarrierTranslation(models.Model): 
    205205    carrier = models.ForeignKey('Carrier', related_name='translations') 
    206     languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES, core=True
    207     name = models.CharField(_('Carrier'), max_length=50, core=True
     206    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES,
     207    name = models.CharField(_('Carrier'), max_length=50,
    208208    description = models.CharField(_('Description'), max_length=200) 
    209209    method = models.CharField(_('Method'), help_text=_("i.e. US Mail"), max_length=200) 
     
    214214    min_total = models.DecimalField(_("Min Price"),  
    215215        help_text=_('The minumum price for this tier to apply'),  
    216         max_digits=10, decimal_places=2, core=True
    217     price = models.DecimalField(_("Shipping Price"), max_digits=10, decimal_places=2, core=True
     216        max_digits=10, decimal_places=2,
     217    price = models.DecimalField(_("Shipping Price"), max_digits=10, decimal_places=2,
    218218    expires = models.DateField(_("Expires"), null=True, blank=True) 
    219219     
  • satchmo/trunk/satchmo/shipping/modules/tieredquantity/models.py

    r1296 r1461  
    201201class CarrierTranslation(models.Model): 
    202202    carrier = models.ForeignKey('Carrier', edit_inline=models.STACKED, related_name='translations', num_in_admin=2) 
    203     languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES, core=True
    204     name = models.CharField(_('Carrier'), max_length=50, core=True
     203    languagecode = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES,
     204    name = models.CharField(_('Carrier'), max_length=50,
    205205    description = models.CharField(_('Description'), max_length=200) 
    206206    method = models.CharField(_('Method'), help_text=_("i.e. US Mail"), max_length=200) 
     
    211211        edit_inline=models.TABULAR, related_name='tiers', num_in_admin=5) 
    212212    quantity = models.IntegerField(_("Min Quantity"),  
    213         help_text=_('Minimum qty in order for this to apply?'), core=True
     213        help_text=_('Minimum qty in order for this to apply?'),
    214214    handling = models.DecimalField(_("Handling Price"), max_digits=10,  
    215         decimal_places=2, core=True
     215        decimal_places=2,
    216216    price = models.DecimalField(_("Shipping Per Item"), max_digits=10,  
    217         decimal_places=2, core=True
     217        decimal_places=2,
    218218    expires = models.DateField(_("Expires"), null=True, blank=True) 
    219219     
  • satchmo/trunk/satchmo/shop/models.py

    r1438 r1461  
    388388    cart = models.ForeignKey(Cart, verbose_name=_('Cart')) 
    389389    product = models.ForeignKey(Product, verbose_name=_('Product')) 
    390     quantity = models.IntegerField(_("Quantity"), core=True
     390    quantity = models.IntegerField(_("Quantity"),
    391391 
    392392    def _get_line_unitprice(self): 
     
    460460    An arbitrary detail about a cart item. 
    461461    """ 
    462     cartitem = models.ForeignKey(CartItem, related_name='details', core=True
     462    cartitem = models.ForeignKey(CartItem, related_name='details',
    463463    value = models.TextField(_('detail')) 
    464464    name = models.CharField(_('name'), max_length=100) 
     
    569569    timestamp = models.DateTimeField(_("Timestamp"), blank=True, null=True) 
    570570    status = models.CharField(_("Status"), max_length=20, choices=ORDER_STATUS, 
    571         core=True, blank=True, help_text=_("This is set automatically.")) 
     571        blank=True, help_text=_("This is set automatically.")) 
    572572 
    573573    objects = OrderManager() 
     
    899899    order = models.ForeignKey(Order, verbose_name=_("Order")) 
    900900    product = models.ForeignKey(Product, verbose_name=_("Product")) 
    901     quantity = models.IntegerField(_("Quantity"), core=True
     901    quantity = models.IntegerField(_("Quantity"),
    902902    unit_price = models.DecimalField(_("Unit price"), 
    903903        max_digits=18, decimal_places=10) 
     
    962962    Name, value pair and price delta associated with a specific item in an order 
    963963    """ 
    964     item = models.ForeignKey(OrderItem, verbose_name=_("Order Item"), core=True
     964    item = models.ForeignKey(OrderItem, verbose_name=_("Order Item"),
    965965    name = models.CharField(_('Name'), max_length=100) 
    966966    value = models.CharField(_('Value'), max_length=255) 
     
    10331033    order = models.ForeignKey(Order, verbose_name=_("Order")) 
    10341034    status = models.CharField(_("Status"), 
    1035         max_length=20, choices=ORDER_STATUS, core=True, blank=True) 
     1035        max_length=20, choices=ORDER_STATUS, blank=True) 
    10361036    notes = models.CharField(_("Notes"), max_length=100, blank=True) 
    10371037    timestamp = models.DateTimeField(_("Timestamp")) 
     
    10531053    payment = PaymentChoiceCharField(_("Payment Method"), 
    10541054        max_length=25, blank=True) 
    1055     amount = models.DecimalField(_("amount"), core=True, 
     1055    amount = models.DecimalField(_("amount"),  
    10561056        max_digits=18, decimal_places=10, blank=True, null=True) 
    10571057    timestamp = models.DateTimeField(_("timestamp"), blank=True, null=True) 
     
    10891089class OrderVariable(models.Model): 
    10901090    order = models.ForeignKey(Order, related_name="variables") 
    1091     key = models.SlugField(_('key'), core=True
    1092     value = models.CharField(_('value'), core=True, max_length=100) 
     1091    key = models.SlugField(_('key'),
     1092    value = models.CharField(_('value'), max_length=100) 
    10931093 
    10941094    class Meta:         
     
    11071107    """A tax line item""" 
    11081108    order = models.ForeignKey(Order, related_name="taxes") 
    1109     method = models.CharField(_("Model"), max_length=50, core=True
     1109    method = models.CharField(_("Model"), max_length=50,
    11101110    description = models.CharField(_("Description"), max_length=50, blank=True) 
    1111     tax = models.DecimalField(_("Tax"), core=True, 
     1111    tax = models.DecimalField(_("Tax"),  
    11121112        max_digits=18, decimal_places=10, blank=True, null=True) 
    11131113 
  • satchmo/trunk/satchmo/supplier/models.py

    r1424 r1461  
    6161    """ 
    6262    order = models.ForeignKey(SupplierOrder) 
    63     line_item = models.ForeignKey(RawItem, core=True, verbose_name=_('Line Item')) 
    64     line_item_quantity = models.IntegerField(_("Line Item Quantity"), core=True
     63    line_item = models.ForeignKey(RawItem, verbose_name=_('Line Item')) 
     64    line_item_quantity = models.IntegerField(_("Line Item Quantity"),
    6565    line_item_total = models.DecimalField(_("Line Item Total"), max_digits=6,decimal_places=2) 
    6666     
     
    8080    """ 
    8181    order = models.ForeignKey(SupplierOrder) 
    82     status = models.CharField(_("Status"), max_length=20, choices=SUPPLIERORDER_STATUS, core=True, blank=True) 
     82    status = models.CharField(_("Status"), max_length=20, choices=SUPPLIERORDER_STATUS, blank=True) 
    8383    notes = models.CharField(_("Notes"), max_length=100, blank=True) 
    8484    date = models.DateTimeField(_('Date'), blank=True) 
  • satchmo/trunk/satchmo/upsell/models.py

    r1424 r1461  
    129129    menu = models.ForeignKey(Upsell, related_name="translations") 
    130130    languagecode = models.CharField(_('language'), max_length=10,  
    131         choices=settings.LANGUAGES, core=True, default=settings.LANGUAGES[0][0]) 
     131        choices=settings.LANGUAGES, default=settings.LANGUAGES[0][0]) 
    132132    description = models.TextField(_('Description'), blank=True) 
    133133