Hello,
I am new to django.
I have a scenario where a user has logged in the application and he is
navigating through the application.
on every navigation i want to check whether the user has a valid
session.
do i need to write the code to check for the session in my view
or what would be the best
http://googleblogg3r.blogspot.com/ - Watch these huge women rub and
tug their way out of almost any situation.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
> Ah, not something I'm familiar with. Yet more to learn
Wikipedia has a decent write-up of the core idea:
http://en.wikipedia.org/wiki/Comet_(programming)
Most of the backing for this sort of thing has come from the Dojo folks.
--
"Bur
At 10:32 PM 11/4/2007, you wrote:
>On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
> > No. The only way to send stuff to a browser is to respond to an HTTP
> > request, so if you want the browser to see regular status updates you'll
> > have to set it up so that the browser makes periodic re
Thanks guys, that did the trick and caching works great now.
On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
> On 11/4/07, Hugh Bien <[EMAIL PROTECTED]> wrote:
>
> > By what level do you mean what version of Django? I'm running Django
> > 0.96.
> >
>
> Yes. 0.96 precedes the fix I mentioned
On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
> No. The only way to send stuff to a browser is to respond to an HTTP
> request, so if you want the browser to see regular status updates you'll
> have to set it up so that the browser makes periodic requests for status.
> I've never used this
I'm not sure about this particular instance, but Templates are iterators I
think so you might be able to come up with somthing if you hack around with
the internals. Sorry I can't be more specific, but I don't have access to my
normal environment at the moment!
Ben
On 04/11/2007, Karen Tracey <[
On 04-Nov-07, at 4:00 PM, Graham Dumpleton wrote:
>> why dont you do apache2ctl graceful?
>
> As far as the consequences on a loaded Django application is
> concerned, doing a graceful as opposite to a restart (OP wrongly said
> reload), is not really any different.
agreed. But when restart is
On 11/4/07, Hugh Bien <[EMAIL PROTECTED]> wrote:
> By what level do you mean what version of Django? I'm running Django 0.96.
>
Yes. 0.96 precedes the fix I mentioned. So, try:
@cache_page
instead of:
@cache_page(60 * 15)
If that fixes the problem, and you really need to specify the timeout
Hi Karen,
By what level do you mean what version of Django? I'm running Django 0.96.
- Hugh
On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
> On 11/4/07, tonemcd <[EMAIL PROTECTED]> wrote:
>
> > check this out:-
> > http://groups.google.com/group/django-users/msg/581a32c198e6ae07
> >
> > No
On 11/4/07, tonemcd <[EMAIL PROTECTED]> wrote:
> check this out:-
> http://groups.google.com/group/django-users/msg/581a32c198e6ae07
>
> Not sure cache decorators have arguments...
They do as of revision 5619 (July 5), when
http://code.djangoproject.com/ticket/1015 was fixed. Hugh, what level a
Hugo,
check this out:-
http://groups.google.com/group/django-users/msg/581a32c198e6ae07
Not sure cache decorators have arguments...
Cheers,
Tone
On Nov 4, 11:13 pm, "Hugh Bien" <[EMAIL PROTECTED]> wrote:
> Hi,
> I've emailed a few questions to this mailing list already and I've gotten
> great
On Nov 5, 10:33 am, Eugene Morozov <[EMAIL PROTECTED]> wrote:
> On 4 нояб, 07:05, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
>
> > You might at least try mod_python 3.3.1 instead of the older
> > mod_python 3.2.10. The newer version fixes a lot of problems including
> > memory leaks.
>
> Hello
On 11/4/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>
> A view has a loop - each iteration may take 3 seconds, and it will loop
> 20+
> times, so 1 min of processing.
>
> Is there some way to dump stuff to the browser page each loop?
No. The only way to send stuff to a browser is to respond to a
On 4 нояб, 07:05, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> You might at least try mod_python 3.3.1 instead of the older
> mod_python 3.2.10. The newer version fixes a lot of problems including
> memory leaks.
Hello Graham,
Compiled and installed 3.3.1. Exactly the same result! Apache consume
Hi,
I've emailed a few questions to this mailing list already and I've gotten
great responses, so thanks everyone for helping out people who are new to
Django.
Okay, on to my question. I'm trying to get caching working with my weblog
but I keep running into an AttributeError. All I am doing is i
A view has a loop - each iteration may take 3 seconds, and it will loop 20+
times, so 1 min of processing.
Is there some way to dump stuff to the browser page each loop?
Right now I am printing to the console, which is fine, but not cool. It's more
for testing, wich will happen 100's of times
Thanks for your replies, Kenneth and Graham! Graham explained my
problem better than I could, and mod_wsgi looks very useful indeed.
I'll try to install it this week, so also thanks for creating it. :-)
Sander
--~--~-~--~~~---~--~~
You received this message becaus
On 11/4/07, Brot <[EMAIL PROTECTED]> wrote:
>
> Ok, thank you... that's standard python stuff. It's no secret, that
> I'm new to python :-(
> But I found another solution. I don't really now which on is the
> better one?!
>
> partnerlist = [ep.partner for ep in
> Event.objects.latest
> ('date').eve
I've got a model with an ImageField. But, when I attempt to add an
image via the Admin interface, I receive the error message: "Upload a
valid image. The file you uploaded was either not an image or a
corrupted image."
I'm pretty sure that all of my paths are set correctly because I can
change th
On Oct 19, 3:11 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-10-19 at 06:54 -0700, äL wrote:
> > I would like to order a list in a view by foreign key. If I try
> >orderinghow in the
> > code below my list is ordered by 'person'. And this means that the
> > list
> > ist order
On Nov 4, 7:02 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 11/4/07, Brot <[EMAIL PROTECTED]> wrote:
>
>
>
> > > partner_list = [ep.partner for ep in Event.objects.latest
> > > ('date').eventpartner_set.all()]
>
> > Ok, that works! But there is another problem now. I would like to sort
> >
> Hope the above helps too.
Hello both of you.
All your suggestions were great and solved my problem. Thank's a lot .
Melita
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
On 11/4/07, Goutham DL <[EMAIL PROTECTED]> wrote:
>
> Its working now.There was a slight error in my url conf.
> I had put r'^students/(?P\w+)/$' when i should have put r'^(?
> P\w+)/'. It was the /students/ part of the URL that was giving
> the problem with CSS. Its now working properly.
> Can som
On 11/4/07, Brot <[EMAIL PROTECTED]> wrote:
>
> >
> > partner_list = [ep.partner for ep in Event.objects.latest
> > ('date').eventpartner_set.all()]
>
> Ok, that works! But there is another problem now. I would like to sort
> the list of partners.
> The sort-criteria should be a field from the part
On Nov 4, 4:14 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 11/4/07, Brot <[EMAIL PROTECTED]> wrote:[snip]
>
> To get the last event I use:
>
> > Event.objects.latest('date')
>
> > To get a list of EventPartners i use:
> > Event.objects.latest('date').eventpartner_set.all()
>
> > But how d
Its working now.There was a slight error in my url conf.
I had put r'^students/(?P\w+)/$' when i should have put r'^(?
P\w+)/'. It was the /students/ part of the URL that was giving
the problem with CSS. Its now working properly.
Can someone tell as to why the error occured?My knowledge of URLcon
On 11/4/07, Goutham DL <[EMAIL PROTECTED]> wrote:
>
> Anyone?
Sheesh, give people a chance. In the hour you let the original query sit,
there was virtually no traffic on this list; it's quite likely that no one
with any ideas on how to help even read the question before you posted the
follow-up.
On 11/4/07, Brot <[EMAIL PROTECTED]> wrote:[snip]
To get the last event I use:
> Event.objects.latest('date')
>
> To get a list of EventPartners i use:
> Event.objects.latest('date').eventpartner_set.all()
>
> But how do I get a list of my Partners? I tried a few things, but I
> didn't find a solu
On 11/4/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> That seems to be a silly question now. I have another related
> question regarding type of "self.cleaned_data['guess_the_number']",
> string or integer or float?
In general it depends on the type of field. In this case it's a RegExField,
so
On 11/3/07, crybaby <[EMAIL PROTECTED]> wrote:
>
>
> Breakpoint works if you set it and run in debug mode (click the bug
> button, not the play button), don't run it in run mode and expect
> breakpoint to work. That's what I was doing.
>
> Now I have one more problem:
>
> I have selected a form ob
Anyone?
On Nov 4, 6:14 pm, Goutham DL <[EMAIL PROTECTED]> wrote:
> The CSS for one of my pages is not loading. Its working properly for
> all the other pages.
> The page is displaying properly but without the CSS.
> When i looked at the server, it showed a http response of 500.Iam
> using django
That seems to be a silly question now. I have another related
question regarding type of "self.cleaned_data['guess_the_number']",
string or integer or float?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
The CSS for one of my pages is not loading. Its working properly for
all the other pages.
The page is displaying properly but without the CSS.
When i looked at the server, it showed a http response of 500.Iam
using django 0.96 on windows.
The server is django's development server.
Can someone help
PART-TIME JOB FOR GOOGLE,NO INVESTMENT,FREE MONEY
u all are familier about google but do u know that google gives us
opportunity to build our free website any one can earn free money up
to $4000 per month :
1) NO PRE INVESTMENT
2) U'll get ur website totally for free
3) U can build ur websi
On 11/4/07, Dokter Bob <[EMAIL PROTECTED]> wrote:
> My bad - it turned out there was a non-existent view listed in our
> url's.
> Somehow this caused the admin logout to not work (and some other
> strange problems too).
I suspect the reason for this is that the admin now uses the 'url'
template t
Hello,
These are my models
class Event(models.Model):
date = models.DateField(core=True)
type = models.ForeignKey(EventType, limit_choices_to = {'useable':
True})
class Partner(models.Model):
name = models.CharField(max_length=50)
class EventPartner(models.Model):
On Sun, 2007-11-04 at 10:54 +, omat wrote:
> I change one thing at a time when debugging but after posting here, I
> go on with experimenting. And when I respond to a request, like
> posting the traceback, usually it is not the very exact instance that
> I am running currently.
Well, there's
You probably want to use "Complex lookups with Q objects" (http://
www.djangoproject.com/documentation/db-api/)
here is how i use it on a site:
from django.db.models import Q
query = Q()
for term in request.GET['area'].split(' '):
q = Q(city__icontains = term) \
Hello,
I need to upload several pictures from a single form. Then (I think) I
need to loop through the list of FILES and bind the data to a form and
save it. However, my code below doesn't work. No images are saved and
all I get is the data from the other fields of the last picture, saved
the num
I change one thing at a time when debugging but after posting here, I
go on with experimenting. And when I respond to a request, like
posting the traceback, usually it is not the very exact instance that
I am running currently. I change it to be consistent with the on going
discussion, but sometim
On Nov 4, 4:26 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 03-Nov-07, at 8:57 PM, Sander Dijkhuis wrote:
>
> > I often have to reload one project because I've updated the code.
> > Currently, I use `/etc/init.d/apache2 reload`
>
> why dont you do apache2ctl graceful?
As far as the conse
After some e-mail discussions with Jacob Kaplan-Moss from the Django
team, I've moved all of the sites listed on the old DjangoPoweredSites
wiki page to Djangosites.org.
It took a fair bit of time to weed out some not-working pages and
expired domains (which have, of course, been purchased by spa
My bad - it turned out there was a non-existent view listed in our
url's.
Somehow this caused the admin logout to not work (and some other
strange problems too).
Sorry to have bothered you. ;)
Regards,
Dokter Bob
--~--~-~--~~~---~--~~
You received this message b
44 matches
Mail list logo