Thanks for the pointer! I finally ended up defining my own field,
which allowed me more flexibility:
class CodeCategoryChoiceField(ChoiceField):
def clean(self, value):
return CodeCategory.objects.get(pk=value)
Thanks!
Julien
On Mar 27, 8:53 pm, peschler <[EMAIL PROTECTED]> wrote:
Hi again.
Thank you Thomas for your help.
I think that I passed the role and authentication problem, but now I
have another problem.
Here is what I have done wrong.
When I created my database named 'iFriendsDB' in postgresql I created
it as super user.
and then within the iFriendsDB created the us
Hello List!
Things clicked tonight! I visited with Jacob at PyCon and decided that it
was time to really learn Django. I have gone through most of the Django
book (online) and the Head First XHTML with CSS books. Tonight, everything
came together and I've written my first web pages using Django
On Mar 27, 9:05 pm, Mike H <[EMAIL PROTECTED]> wrote:
> Reading large
> chunks of file data from a db just wastes db resources
A recipe is unlikely to be a large chunk of file data. Pictures of
food, sure, don't store those in the DB. Storing the text in the DB
also means you can make use of its
It's not possible to use aggregate functions in any Django release,
but IIRC it is something that has been added in the queryset-refactor
branch.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
On Thu, Mar 27, 2008 at 9:19 PM, Dan Ellis <[EMAIL PROTECTED]> wrote:
> It's not possible to use aggregate functions in any Django release,
> but IIRC it is something that has been added in the queryset-refactor
> branch.
Be careful how you say that: you're free to write any piece of SQL you
l
Hello,
My experience field by default gets displayed as a drop
down..everything works fine when it is displayed this way. However I
want the field to be displayed in my template as Radio Buttons. So I
added the line ' experience =
forms.CharField(widget=forms.RadioSelect) ' to my ModelClass.
How
I recently made a new production database for a site using the
following methods:
1. Ran syncdb to create all tables needed for the project
2. Used data transfer in PG Navicat to bring in old data I need
Now when I try to create a new object in the admin interface I keep
getting:
IntegrityErr
Greg, check out settings.py. CSS counts as media -- it's a static
file you want to serve up to the outside. The exact details of how
this works depend on how the server you're on is set up, but
essentially you have two options. You go into settings.py and fill in
values for media_root and medi
On Thu, Mar 27, 2008 at 9:27 PM, Greg <[EMAIL PROTECTED]> wrote:
>
> Hello,
> My experience field by default gets displayed as a drop
> down..everything works fine when it is displayed this way. However I
> want the field to be displayed in my template as Radio Buttons. So I
> added the lin
http://www.djangoproject.com/documentation/static_files/
On Mar 27, 9:28 pm, "Brian Armstrong" <[EMAIL PROTECTED]> wrote:
> Greg, check out settings.py. CSS counts as media -- it's a static
> file you want to serve up to the outside. The exact details of how
> this works depend on how the serv
Brian,
I tried this but still doesn't work:
//
class SurveyForm(ModelForm):
experience = forms.ChoiceField(widget=forms.RadioSelect)
class Meta:
model = Survey
//
Nothing gets displayed in the template
On Mar 27, 9:32 pm, "Brian Armstrong" <[EMAIL PROTECTED]> wrote:
> On Thu,
On Thu, Mar 27, 2008 at 9:49 PM, Greg <[EMAIL PROTECTED]> wrote:
> class SurveyForm(ModelForm):
> experience = forms.ChoiceField(widget=forms.RadioSelect)
A ChoiceField requires you to pass in a set of choices for it to use.
--
"Bureaucrat Conrad, you are technically correct -- the best k
On Mar 27, 3:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Well, books can be redefined as:
>
> def books(self):
> progs = self.programs.all()
> return sum([prog.publications.all().filter(type=u'Book').count()
> for prog in progs])
>
> and likewise for the other methods.
Nice.
Yes, instead of returning all the records and counting them in python
you would be using your databases COUNT() funciton.
On Mar 27, 10:33 pm, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote:
> On Mar 27, 3:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Well, books can be redefined as
I think he meant recipes in that are there any recipes to accomplish
this (storing binary data to the DB). Unless I'm getting this
completely wrong, he was not talking about cooking recipes :).
I would be interested in a solution for this too. There are cases
where apps running as the apache/web
That's probably a discussion for the django-developers list,
http://groups.google.com/group/django-developers . Unless those
changes happen, you're likely best off creating multiple dictionaries
or extending them in the individual url dict.
On Thu, Mar 27, 2008 at 12:49 PM, Michael <[EMAIL PROTEC
Thanks a lot. Its works
On Mar 27, 8:33 pm, Peter Rowell <[EMAIL PROTECTED]> wrote:
> Specifically, you might look athttp://www.djangosnippets.org/snippets/9/.
>
> This allows you to do something like:
>
> {% expr candidate.vote_set.filter(vote='TU').count() as count %}
>
> and now {{coun
101 - 118 of 118 matches
Mail list logo