> 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 rig
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 developmen
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
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 cushine
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 m
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 18:23, Lee Hinde wrote:
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 = '%m-%d-%Y'
> Thanks, th
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 th
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 above
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 al
> 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 hav
>
>
>
> 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 wo
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. T
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]
> http://stackoverflow.com/questions/2344751/in-django-model-inheritance-does-it-allow-you-to-override-a-parent-models-a
>
It seems
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
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 wo
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
fixt
17 matches
Mail list logo