Maybe you can try {% ifequal request.META.PATH_INFO "/ricerca/" %},
but I think a templatetag will do this better. ;)
On Oct 14, 3:53 pm, Alessandro <[EMAIL PROTECTED]> wrote:
> I have a menu with a class="active" to insert when a page is loaded.
>
> I am searching a way to put this class="active
tions?
>
> problem being that if all those processes happen at about the same
> time, they will all see enough money, then they will all process it.
>
> On Jul 1, 5:12 am, pength <[EMAIL PROTECTED]> wrote:
>
>
>
> > sorry for the bad indent of the "#models.py&q
e)
people = models.ForeignKey(People)
dealt_date = models.DateTimeField(auto_now_add=True)
On Jul 1, 4:53 pm, pength <[EMAIL PROTECTED]> wrote:
> I am using Django0.96/apache2/mod_python(running prefork MPM) / mysql,
> for my Django project, a typical Django environment, I think. And
>
I am using Django0.96/apache2/mod_python(running prefork MPM) / mysql,
for my Django project, a typical Django environment, I think. And
usually there're more than 10 apache2 processes running on my site, as
the online users is about 100+.
I found a problem that sometimes if one user clicks a lin
:06 am, pength <[EMAIL PROTECTED]> wrote:
> As Generic Views are using RequestContext by default, in most cases
> it's quite good. But I have some special generic views, which will
> populate the result via Ajax, so, to make it more effecient, I don't
> want the views to us
As Generic Views are using RequestContext by default, in most cases
it's quite good. But I have some special generic views, which will
populate the result via Ajax, so, to make it more effecient, I don't
want the views to use RequestContext. but how to "disable"
RequestContext in generic views?
T
Tim and Scott, thank you very much!
On Jun 9, 10:03 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> >> I think this way, apache could be a little more faster. Am I
> >> right?
>
> > I don't think it will be faster. Django normally runs as a
> > long-standing process (either inside Apache or as a stan
s enough privileges to write in the
> directories containing .py files.
>
> Regards,
> Valts.
>
> On Mon, Jun 9, 2008 at 1:25 PM, pength <[EMAIL PROTECTED]> wrote:
>
> > I have justed built my site on slicehost. Alhough my site is running
> > properly, I found i
I have justed built my site on slicehost. Alhough my site is running
properly, I found if I update any file (.py file, of course), it
never recreate the .pyc file. Actually, if I delete any .pyc file,
then it will never appear.
I think there's something wrong with my site config, can anyone give
I found that the problems comes because I am using a middleware of
perform_bench... so no problem here, just write this info. in case any
other people falls the same trap. ;)
On Jan 13, 2:41 pm, pength <[EMAIL PROTECTED]> wrote:
> Thanks for your reply.
>
> I am using MySQL 5.0.
transaction? or I am wrong on this point?
On 1月13日, 上午3时06分, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Transaction behaviour depends on database backend. What backend do you
> use and have you setup transaction support for it?
>
> On 12 янв, 20:45, pength <[EMAIL PROTECTED]
At first, I tried to search in this group, but only got an un-answered
question similar to mine:
http://groups.google.com/group/django-users/browse_thread/thread/767716b62a244b33/85b8203990407a6c?lnk=gst&q=transaction+default#85b8203990407a6c
in my settings.py, i am using TransactionMiddleware. a
I have met similar problem, and still don't know why...I have two py
scripts to call some model methods using raw sql UPDATE, one script
runs correctly when I use transaction, but the other doesn't. really
strange..
On 12月27日, 下午11时57分, beewee <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the la
hello all, together with my Djano app, I am using an independently-
running python scripts, using Django's ORMs. It's running like a
daemon, check one table in DB, and calls function at pre-set time. The
main codes are like:
def main_daemon():
for event in
Daemon_Event.objects.filter(event_occu
I am working on a same type of webgame, and it's also on the very
early stage. though it supports Chinese and English, now the content
is mainly in Chinese, so I just can't write the testing address here.
I'll mail to you, if you are interest, just take a look there.
On 10月7日, 下午10时33分, Russell <
well, I am doing some similiar things, for example, I want to show the
time when this Django/Apache server start, and set some "gloabl
variables" which all of my apps can use, just do like this:
I have a primary app named "city", and every other app's views.py will
add a line as "from myproject.ci
I am not very sure if I have any misunderstanding about your
situation, but I am doing a similiar "multi-oneotoone-relation" in my
project. My models are like these:
class Daemon_Event_List(models.Model): ###this is a basic event list,
but only record the event time
event_type = models.Positi
well, the locale directory should be in up-level of project
directorysorry for disturbing. ;)
On 2月5日, 下午2时05分, "pength" <[EMAIL PROTECTED]> wrote:
> i am using i18n as the following way. In urls.py, i added
> (r'^i18n/', include('django.conf.urls.
i am using i18n as the following way. In urls.py, i added
(r'^i18n/', include('django.conf.urls.i18n')),
and in my page, there're 2 buttons as
http://localhost:8000/i18n/setlang/?language=zh-cn
http://localhost:8000/i18n/setlang/?language=en
in my dev server (manage.py runserver), everything is O
my problem is very similar with:
http://groups.google.com/group/django-users/browse_frm/thread/43b3e6d2d0a691d/f2e05622f3aef6bb?lnk=gst&q=__main__+models&rnum=2#f2e05622f3aef6bb
but there i don't think someone had solved that question. so I just
make that question simple. I have set environment v
in my template file, there's a var which i can use {{var1}} to get its
value. and if i put the code
document.write({{var1}});
DIRECTLY in my template file, it's OK, the var1's value appears in my
.html file.
but if I use
in template file, and then in my.js, write
document.write({{var1}});
i think i am facing the same problem with [EMAIL PROTECTED]
well, i have done as Jorge suggested, but just don't know how to
retriving the my_data in my_template.html.
I tried with {{my_data.key}}, though no error occurred, but there's no
value appeared
--~--~-~--~~~
thanks Terry. I posted 3 days ago, just couldn't see it in the list
until now. ;(
On Oct 31, 1:29 am, "Terry" <[EMAIL PROTECTED]> wrote:
> pength wrote:
> > I think it's a common way in C or C++ project to do like this, just
> > don't kn
first, I have searched in this group as "settings". "global
constant"...etc, but i don't think I have got what I need. ;(
well, I want to define some global constant, like:
MAX_UNIT_FOR_ONE_USER = 100
then I want to use this constant in all the applications of my whole
project, in my views.py,
24 matches
Mail list logo