awesome :-)
Glad I could help.
Feel free to ask anything, I will try to help!
--
cu
Wolfram
http://uxebu.com - web consultancy
You need AJAX, RIA, JavaScript and all this modern stuff? We got it!
On Sun, Nov 2, 2008 at 1:14 AM, Rob Goedman <[EMAIL PROTECTED]> wrote:
>
> Wolfram,
>
> You bet
Hi there.
Following scenario:
I have a model that contains several options about the layout of a
page, for example background-image and background-color, some text
fields etc.
the model also has a unique slug field, which indicates where the page
is located.
Now I want to write a form that allo
belred wrote:
> i have an wget event in a cron job. the view does some processing
> which involves calling external websites and databases (takes about 25
> seconds) and updates some module level dictionary lookup variables
> (about 7 MB of data) which the rest of the program reads. but
> unfort
belred wrote:
> i'm having touble finding documention about django signals that
> explain how they behave under apache child processes. if i have a
> signal go off and have a listener for that signal. will only the
> listener in same child process receive it or will that same listener
> in all apa
from django.contrib.comments.models import Comment
from post.models import Post
#get comments for model
Comment.objects.for_model(Post).count()
#get comment for instance
Comment.objects.for_model(Post.objects.get(id=1)).count()
2008/11/2 David.D <[EMAIL PROTECTED]>
>
> I can get comment_count i
On Sun, Nov 2, 2008 at 4:52 AM, void <[EMAIL PROTECTED]> wrote:
>
> Can someone point to the correct way to do this?
>
> Suppose i'm working in a tumblelog, it's basically , 4 o 5 tipes of
> "post item" that share some cmmon information.
>
> So the first approach i would go is:
>
> cllass Post(mod
On Nov 2, 3:29 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> belred wrote:
> > i have an wget event in a cron job. the view does some processing
> > which involves calling external websites and databases (takes about 25
> > seconds) and updates some module level dictionary lookup variables
> >
I'm getting this error:
Caught an exception while rendering: hour must be in 0..23
What I'm doing is adding up all the time that was recorded (time
field) and I noticed that when ever the total is greater than 23:00:00
this error comes up.
I tried executing the same query using a mysql query br
You will need to display the dependent ChoiceField empty at first, but
set the first ChoiceField to submit the form "onchange". (I like to
use the JQuery events system for this, but you can do it with "attr".)
Then have the view redisplay the form with the dependent ChoiceField
populated. IIRC, t
dont mind me ppl. i got this working. i simply used a mysql function
that returns a string for example TRIM()
On Nov 2, 8:26 am, reyjexter <[EMAIL PROTECTED]> wrote:
> I'm getting this error:
>
> Caught an exception while rendering: hour must be in 0..23
>
> What I'm doing is adding up all the ti
How come this page:
http://docs.djangoproject.com/en/dev/ref/forms/fields/#module-django.forms.fields
does not contain information about password fields?
How do I create and use a password form field then?
Clearly, django has support for password form fields, since they are
used in the standard
Can you be more specific? What are you trying to do?
-Jeff
On Nov 1, 3:52 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I have found some post of 2007 on this argument but maybe with django
> 1.0 something is changed.
>
> how do you do that ?
>
> thanks everyone :)
--~--~-~--~---
Hi Nick,
you can do this by passing the widget parameter to a CharField.
A little example:
password =
forms.CharField(label=_(u'Password'),widget=forms.PasswordInput(render_value=False))
Lukas
On Nov 2, 5:58 pm, nkulmati <[EMAIL PROTECTED]> wrote:
> How come this
> page:http://docs.djangoproje
hi,
i want to get random records form the database, the queryset looks
like this :
"
questions = Question.objects.filter(quiz__pk=quiz_id).order_by('?')
[:10]
"
the problem is that if i want to use questions variable again, it
everytimes changes the returned records from db for a new random an
hi,
i want to get random records form the database, the queryset looks
like this :
"
questions = Question.objects.filter(quiz__pk=quiz_id).order_by('?')
[:10]
"
the problem is that if i want to use questions variable again, it
everytimes changes the returned records from db for a new random and
Hi
Been working through the online tutorial without problems up to the
end of part 3. However if I now go back to the admin and try to edit
choices for a Poll I get an error message saying "Please correct the
errors below." without indicating any particular field.
If I have created no Choices fo
hi,
i want to get random records form the database, the queryset looks
like this :
"
questions = Question.objects.filter(quiz__pk=quiz_id).order_by('?')
[:10]
"
the problem is that if i want to use questions variable again, it
everytimes changes the returned records from db for a new random an
I'm wondering if I did the right thing, here. I wanted to replace the
admin/base_site.html template, but only for requests to /myapp/admin/
*, leaving requests to /admin/* alone.
The first thing I tried was a copy/modify of base_site.html to myapp/
templates/admin/myapp/, but the modifications w
Hi Nick,
you can do this by passing the widget parameter to a CharField.
A little example:
password =
forms
.CharField
(label=_(u'Password'),widget=forms.PasswordInput(render_value=False))
Lukas
Am 02.11.2008 um 17:58 schrieb nkulmati:
>
> How come this page:
> http://docs.djangoproject.co
http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-preview/ ??
On Sun, Nov 2, 2008 at 6:54 AM, Flavio <[EMAIL PROTECTED]> wrote:
>
> Hi there.
>
> Following scenario:
>
> I have a model that contains several options about the layout of a
> page, for example background-image and backg
Hi,
given
class MyModel(models.Model):
name = models.CharField(max_length=150)
myinteger = models.IntegerField()
^
def __unicode__(self):
return u"Here is my: %s" % (self.name)
one has to give a __unicode__ method to get a nice string representation of
MyModel()
I need
AvK wrote:
> hi,
> i want to get random records form the database, the queryset looks
> like this :
> "
> questions = Question.objects.filter(quiz__pk=quiz_id).order_by('?')
> [:10]
>
> "
> the problem is that if i want to use questions variable again, it
> everytimes changes the returned record
AvK wrote:
> hi,
> i want to get random records form the database, the queryset looks
> like this :
> "
>
PS: You asked this question at 11:44, then again at 11:45 and yet again
at 12:25. Please have a little patience!
regards
Steve
--~--~-~--~~~---~--~~
You
Looks like I posted too soon. Apparently my third solution above
*only* works on the index page. Clicking on a model page from there
reverts the view back to the default template. So I am looking for
any solution to this problem that doesn't involve modifying every
admin-site template.
Thanks,
is touchingt the wsgi file supposed reload every file in the the
entire django project or just just reload the one wsgi file?
thanks,
bryan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
On Nov 3, 7:09 am, belred <[EMAIL PROTECTED]> wrote:
> is touchingt the wsgi file supposed reload every file in the the
> entire django project or just just reload the one wsgi file?
If you are talking about the WSGI script file when using Apache/
mod_wsgi, it depends on how you have Apache/mod
i am using linux and i am using mod_wsgi to run django.
i don't understand this sentence.
"This should only be done for daemon processes and not within the
Apache child processes"...
we have many apache child process. if i follow this code:
if environ['mod_wsgi.process_group'] != '':
impo
On Nov 3, 2:03 am, belred <[EMAIL PROTECTED]> wrote:
> On Nov 2, 3:29 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>
>
> > belred wrote:
> > > i have an wget event in a cron job. the view does some processing
> > > which involves calling external websites and databases (takes about 25
> > > se
To get an integer to print with leading 0s
print '%0d' % my_model.myinteger
To get an integer to print with 10 digits, filled with leading 0s
print '%0.10d' % my_model.myinteger
If you wanted this to be the default value shown for the model
def __unicode__(self): return u'%0.10d' % self.myinteg
Are you looking for something like 'django-tracking' ??
http://code.google.com/p/django-tracking/
I was just perusing this last night, for use on a site of mine.
-- joe
On Nov 1, 3:52 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I have found some post of 2007 on this argument but ma
>From personal experience ...
The webfaction support crew is AWESOME and either interact with you at
a clue-level, if you have one ... or they will reach out and fix stuff
in your files, if you have somewhat less than a clue.
Their forums, FAQ and how-to docs are well populated.
And ... those a
Yes, I would second that. They have been great both when i know exactly what
i need them to do, and equally as good when I've been completely useless and
not had a clue about something.
Tom
On Sun, Nov 2, 2008 at 11:11 PM, JoeJ <[EMAIL PROTECTED]> wrote:
>
>
> From personal experience ...
>
> Th
On Nov 3, 9:55 am, belred <[EMAIL PROTECTED]> wrote:
> i am using linux and i am using mod_wsgi to run django.
>
> i don't understand this sentence.
>
> "This should only be done for daemon processes and not within the
> Apache child processes"...
>
> we have many apache child process. if i fol
In this case, as the amount of data is fairly small, I'm inclined to
download the full queryset and let the template ignore the irrelevant
data.
Thanks Russ & Marcelo for your very helpful insights.
--~--~-~--~~~---~--~~
You received this message because you are s
On Nov 2, 2:58 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Nov 3, 2:03 am, belred <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Nov 2, 3:29 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > > belred wrote:
> > > > i have an wget event in a cron job. the view does some processing
> > > > whic
see also this:
http://www.djangosnippets.org/snippets/1031/
for a tumblelog I have been actually fetching queries for each item type,
concatenating them as lists, then sorting by date.
that's much simpler since its usually mostly display.
I mostly use model inheritance in situations where I need
thanks for your detailed explanation. i had to read it 3 times to try
to absorb everything :) i do not need to have the code be portable
beyond mod_wsgi. if i'm following what you and steve have said and
pages you both pointed me to, it appears if i want to share global
data i really need to use
It's just simple amazing that I waste another night to figure out how
to glue two and more apps together inside one template.
I read about custom tags and I thing it isn't (or at least it
shouldn't be) the way of doing it. too much fuss imho.
Example:
I have home page with menu on one side, news
Once you get each working individually, I would make inclusion tags
for the items that will be on every page (Menu, NewsList, Footer,
Survey). The contents in the middle is what is shown by a view (At
least in my setup)
Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com
--~--~-~--~-
are you saing this:
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags
is an explanation to my question ?
If yes, many thanks to you and... silly me.
if not, could you point me some solution explained in detail?
--~--~-~--~~~---~--~~
ilmarik wrote:
> It's just simple amazing that I waste another night to figure out how
> to glue two and more apps together inside one template.
> I read about custom tags and I thing it isn't (or at least it
> shouldn't be) the way of doing it. too much fuss imho.
>
> Example:
> I have home page
Yes exactly.
http://dpaste.com/hold/88396/ is the inclusion tag that I use for my
navigation menu @ http://www.gustafsonandassociates.com/
Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com
On Sun, Nov 2, 2008 at 6:57 PM, ilmarik <[EMAIL PROTECTED]> wrote:
>
> are you saing this:
> http
On Nov 3, 12:31 pm, belred <[EMAIL PROTECTED]> wrote:
> thanks for your detailed explanation. i had to read it 3 times to try
> to absorb everything :) i do not need to have the code be portable
> beyond mod_wsgi. if i'm following what you and steve have said and
> pages you both pointed me to
On Nov 3, 11:53 am, belred <[EMAIL PROTECTED]> wrote:
> On Nov 2, 2:58 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Nov 3, 2:03 am, belred <[EMAIL PROTECTED]> wrote:
>
> > > On Nov 2, 3:29 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > > > belred wrote:
> > > > > i have an w
On Oct 30, 4:04 pm, lapucho <[EMAIL PROTECTED]> wrote:
> Can I use AdminDateWidget outside admin app?
>
> from django.contrib.admin import widgets
> from models import AvisoPublicitario
> from django.forms import ModelForm
>
> class AvisoPublicitarioForm(ModelForm):
>
> fecha = forms.DateField
HI,
This is semi-off topic, but it is a python question.
I'm trying to use some of the generic django applications, like django-
tagging. Taking django-tagging, for example, it requires me to symlink
the source folder to "site-packages/tagging". However, I want to keep
site-packages structured a
On Nov 3, 4:58 am, stryderjzw <[EMAIL PROTECTED]> wrote:
> HI,
>
> This is semi-off topic, but it is a python question.
>
> I'm trying to use some of the generic django applications, like django-
> tagging. Taking django-tagging, for example, it requires me to symlink
> the source folder to "site-
Hmm, I tried django_tagging, but it still gives me ImportErrors. I
think it's because, for django-tagging project, they internally look
for tagging as the package name.
On Nov 2, 11:44 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Nov 3, 4:58 am, stryderjzw <[EMAIL PROTECTED]> wrote:
>
>
48 matches
Mail list logo