Re: How to override an attribute?

2012-08-04 Thread .
> But assuming you just want to set up a default, and  be able to override it > at will, you can always do: > class Foo: >    def default_name(self): >       return 'Foo' >    name = CharField(default=default_name) > Class Bar(Foo): >    def default_name(self): >      return "Bar" This looks

ANN: Mezzanine 1.2 and Cartridge 0.6 released!

2012-08-04 Thread Stephen McDonald
Hi all, Very happy to announce the release of Mezzanine [1] and Cartridge [2] versions 1.2 and 0.6 respectively. If you haven't heard of these, they're a BSD licensed CMS and ecommerce platform built with Django, that you can use in a standard Django project. They've been under constant

Re: Github Development Repo

2012-08-04 Thread Marshel Helsper
For the database you can set your git ignore to ignore your database, or store it in a separate path and use git there for that specifically. For your secret key, use the git hook pre committing to change that line, storing the key outside of your project so you don't lose it. Use the post commit

Re: Github Development Repo

2012-08-04 Thread Jonathan Baker
A quick solution would be to keep sensitive information in a local_settings.py file that you don't track with Git. On Sat, Aug 4, 2012 at 4:57 PM, Schmidtchen Schleicher < spiolli...@googlemail.com> wrote: > I want to use GIT as versioning system for my Django project and as a > matter of

Github Development Repo

2012-08-04 Thread Schmidtchen Schleicher
I want to use GIT as versioning system for my Django project and as a matter of cushiness I want to host it publicly on Github. But isn't it dangerous to have the secret key and the database (I'm using sqlite during development) publicly available? What can I do instead? -- You received this

Re: DRYing up my forms.py

2012-08-04 Thread Tomas Neme
But if you subclass the widget, then you'll need to override every form's widget with { forms.DateField: MyDateWidget } so overriding and using your own MyDateField would be less verbose and repetitive On Sat, Aug 4, 2012 at 6:17 PM, Melvyn Sopacua wrote: > On 3-8-2012

Re: DRYing up my forms.py

2012-08-04 Thread Melvyn Sopacua
On 3-8-2012 18:23, Lee Hinde wrote: > > On Aug 3, 2012, at 9:01 AM, Melvyn Sopacua wrote: > >> On 3-8-2012 17:37, Lee Hinde wrote: >> >>> self.fields['photo_response'].widget.attrs["class"] = 'date-field >>> input-small' >>> self.fields['photo_response'].widget.format =

Re: django-admin.py not working on OS X 10.5

2012-08-04 Thread James Walton
Brandon, I had the same issue and this is how I resolved it. 1. Delete the reference django-admin.py in /usr/local/bin that was generated by the installer. 2. Then, manually recreate the symlink by doing: 3. ln -s YOUR_ABSOLUTE_PATH/build/scripts-2.7/django-admin.py /usr/local/bin 4. Close

Re: How to override an attribute?

2012-08-04 Thread Melvyn Sopacua
On 4-8-2012 19:21, . wrote: > 1. Each class should have the same attribute: a unique name. > For example: > class Foo(): ... > class Bar(Foo): ... This makes very little sense if you use pseudo code. Why would a database table need it's name stored in every record? That's what you're saying

RE: How to override an attribute?

2012-08-04 Thread lacrymol...@gmail.com
It's hard to say without the real ino, and not kowing why you want the info to be a field, I see no good reason you´d want a db field where all instances of a given model would share the same value. But assuming you just want to set up a default, and be able to override it at will, you can

Re: How to override an attribute?

2012-08-04 Thread .
> https://docs.djangoproject.com/en/1.4/topics/db/models/#field-name-hiding-is-not-permitted I've already seen this link on stackoverflow. > Easiest solution to your underlying problem would likely be to find a > solution that does not require doing something Django does not support. Do you

Re: Working with a Custom, Dynamic Form (using BaseForm)

2012-08-04 Thread Anton Baklanov
> > > > I am hoping to add an additional field, "Photographers" (from the > 'Photographer' model) to AForm so that users can select a Photographer to > become part of an instance of the 'A' model. > > Does that make sense? > yes, you need to add field and I'm guessing that ModelChoiceField will

Do I understand the support schedule correctly?

2012-08-04 Thread Steve Bergman
I'm considering using Django for 2 projects. An LFS shop and a site which will use Pinax. Both high profile Django apps. At this time, the latest supported Django version for both is 1.3.3. If I understand correctly, the 1.3 branch of Django will no longer get security updates after 1.5 releases.

Re: How to override an attribute?

2012-08-04 Thread Karen Tracey
On Sat, Aug 4, 2012 at 10:55 AM, . wrote: > I'm trying to do the same [1]. > I've already tried all solutions from stackoverflow but none of them > worked. > > [1] >

How to override an attribute?

2012-08-04 Thread .
Hello, I'm trying to do the same [1]. I've already tried all solutions from stackoverflow but none of them worked. [1] http://stackoverflow.com/questions/2344751/in-django-model-inheritance-does-it-allow-you-to-override-a-parent-models-a -- You received this message because you are subscribed

Re: Registering only folks with .org email

2012-08-04 Thread Steve
Thanks, Kurtis. I'll start with subclassing and see how it goes. On Friday, August 3, 2012 4:25:46 PM UTC-4, Kurtis wrote: > > Hey Steve, > > There's a number of ways you could go about tackling this task. I, > typically, would read the original's application code and first determine > how it

loading initial fixture of an app before another

2012-08-04 Thread Michael Palumbo
Hi, I have initial fixtures (initial_data.json) for several apps. The model A of App1 references the model B of App2. I use natural keys to reference it. So when I sync the DB, Django tries to make a query on modelB. However, it appears that the fixtures of my App1 are installed before the