Re: Problem with django sitemap

2012-12-17 Thread Sandeep kaur
On Tue, Dec 18, 2012 at 1:17 PM, Frankline wrote: > But the sites framework has already been installed, as you can see from my > settings file. > According to me, If that is true then it should not have thrown Import error. To install the sitemap app, follow these steps:

Re: Problem with django sitemap

2012-12-17 Thread Frankline
But the sites framework has already been installed, as you can see from my settings file. On Tue, Dec 18, 2012 at 10:44 AM, Sandeep kaur wrote: > On Sun, Dec 16, 2012 at 10:55 PM, Frankline wrote: > > > > I'm having a problem implementing the sitemaps

Re: Problem with django sitemap

2012-12-17 Thread Sandeep kaur
On Sun, Dec 16, 2012 at 10:55 PM, Frankline wrote: > > I'm having a problem implementing the sitemaps in my application. I'm > > ImportError at /sitemap.xml > > No module named django.contrib.sitemaps > > Request Method: GET > Request URL: http://localhost:8000/sitemap.xml >

AW: problem with timeout

2012-12-17 Thread Szabo, Patrick (LNG-VIE)
Nevermind…select_related() did the trick. 226 queries cut to 4…amazing this little statement ☺ . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo Developer LexisNexis A-1030 Wien, Marxergasse 25 patrick.sz...@lexisnexis.at Tel.:

Re: Problem with django sitemap

2012-12-17 Thread Frankline
Anyone??? On Sun, Dec 16, 2012 at 8:25 PM, Frankline wrote: > I'm having a problem implementing the sitemaps in my application. I'm > using Virtualenv, django 1.4 and Python 2.7. I would appreciate if you > can help me resolve this. > > This is what I have done: > > 1. In

Re: Theming Django with Diazo/XSLT

2012-12-17 Thread Derek
You do not say which part of Django you need to theme. Assuming its the admin, I suggest you look at Grappelli[1] as they have done extensive work in theming. You could either provide your own CSS and override any templates as needed; or start from scratch but with their approach/code as an

AW: problem with timeout

2012-12-17 Thread Szabo, Patrick (LNG-VIE)
Thanks, that does sound like a better idea and now that i think about it i saw this behaviour on many other webinterfaces already…don’t know why i didn’t think about that ☺ However I’ve noticed that it’s not the query that is taking so long, it’s the processing of the result that takes ~180

Re: IntegrityError

2012-12-17 Thread Chris Cogdon
I'd need to see the source for Job and that other model, plus a proper exception traceback, so I can tell at what point the IntegrityError is being thrown. also, you should not be using form.save() there... if you do a commit=False to get a copy of the model, you only need to save that

Re: IntegrityError

2012-12-17 Thread Sandeep kaur
On Tue, Dec 18, 2012 at 2:48 AM, Satinderpal Singh wrote: > I created a search box for searching the information about the client > so that this information uses to create the report. add these lines : > def search(request): > {% endfor %} > > i want to get

Re: IntegrityError

2012-12-17 Thread Chris Cogdon
Can you post the code for the model, and the complete exception trace? I ask you use something that will properly maintain the intending, such as pastebin or dpaste. On Monday, December 17, 2012 1:18:54 PM UTC-8, Satinderpal Singh wrote: > > I created a search box for searching the information

Re: Unexpected behavior with regexp model filtering (Sqlite)

2012-12-17 Thread Chris Cogdon
And for completeness, here's how django implements the regex function when using sqlite3: def _sqlite_regexp(re_pattern, re_string): try: return bool(re.search(re_pattern, re_string)) except: return False -- You received this message because you are subscribed to the

Re: Unexpected behavior with regexp model filtering (Sqlite)

2012-12-17 Thread Chris Cogdon
Django uses "search" rather than "match" for the _regex option. If you want match, make sure the regex starts with a ^ On Monday, December 17, 2012 6:55:09 PM UTC-8, Beni wrote: > > Hi, > > I'm getting stuck on figuring out why regex searches are matching any part > of a field when I use my

Re: Django back button issue after log-out

2012-12-17 Thread Chris Cogdon
But that means you're going to need to wrap _all_ your views in that structure, and that also means that none of those views will be cacheable. That could be desirable, depending on your application. You might also want to consider using @vary_on_cookie, which means that the cache will be

Re: How to stop my views from cacheing

2012-12-17 Thread Chris Cogdon
What you're doing is saying "any _new_ results returned from this view are uncacheable", but that doesn't impact the results that are in the cache already. Read up on this section to see how to "invalidate" the existing cache:

Re: How to stop my views from cacheing

2012-12-17 Thread Dwayne Ghant
Thanks Chris, That's exactly what I thought I was doing. Can you please tell me what missed? How, exactly do unclear the cache; if that's not what I'm currently doing? On Monday, December 17, 2012, Chris Cogdon wrote: > You'll need to clear the cache. Remember, once the view is cached, django >

Re: Use GraphDB with Django

2012-12-17 Thread Amirouche
Héllo, What is you progress on the subject ? I answer your questions based on my experience of both doing Django, and graph database work with a framework like Django. With the Python package Bulbs/Bulbflow, I can interface graph > databases and > model my domain objects.

Unexpected behavior with regexp model filtering (Sqlite)

2012-12-17 Thread Beni
Hi, I'm getting stuck on figuring out why regex searches are matching any part of a field when I use my model's regexp filter (instead of matching linearly); they're behaving like calls to re.search instead of re.match. Since I'm using Sqlite, I registered my own function based on Python's

Re: How to stop my views from cacheing

2012-12-17 Thread Chris Cogdon
You'll need to clear the cache. Remember, once the view is cached, django wont go down to the view until the cache thinks the content has expired. On Monday, December 17, 2012 5:14:56 PM UTC-8, Dwayne Ghant wrote: > > Hello All: > > I have a python view that I'm building but the for some

How to stop my views from cacheing

2012-12-17 Thread Dwayne Ghant
Hello All: I have a python view that I'm building but the for some strange reason the view keeps caching. Just to give an example: @api_view(['POST']) @parser_classes((XMLParser,)) @cache_page(0) @cache_control(private=True) def test_view(request, format=None): return Response({'received

Re: problem with timeout

2012-12-17 Thread Russell Keith-Magee
On Mon, Dec 17, 2012 at 7:34 PM, Szabo, Patrick (LNG-VIE) < patrick.sz...@lexisnexis.at> wrote: > Hi, > > I have an operation that takes about 10 minutes to befinished. It takes > that long because our DB is pretty big. > This produces a timeout. > > I have tried so set the timeout in apache

How to distribute a hybrid Django project/app ??

2012-12-17 Thread Chris Cogdon
[Firstly, sorry if this appears to be a repost: I'd written a lengthy question previously and posted, but never saw it up in the listing. Did the ThreadMonster eat it?] I'm putting the final touches on a art show management tool, written for Django of course, and I am seeing opinions on the

Re: django doesn't send me error mails

2012-12-17 Thread Chris Cogdon
I don't have any magic answers for you yet. My only suggestion would be to find out what's different in the environment between running as uwsgi and running under runserver. Perhaps something in the environment, or perhaps the username under which django runs in either case. /var/log/maillog

Re: A question about the Middleware module "djangodblog" and its "DBLogMiddleware" class

2012-12-17 Thread Bill Freeman
On Mon, Dec 17, 2012 at 3:02 PM, dariyoosh wrote: > *Yes, I suspect so. Try the following: >> >> python manage.py shell >> import djangodblog >> djangodblog.__file__ >> >> (That's two underscores on each side of the word file). This will print >> a string

Re: LDAP search results "disappear"

2012-12-17 Thread peter
On 12/17/2012 03:58 PM, Kevin Cole wrote: On Mon, Dec 17, 2012 at 1:57 PM, Kevin Cole wrote: And here I'll display my ignorance about threading. I've done nothing specific to ask for threading. I wouldn't know how to thread even if I had a sewing machine. ;-) I'm using

Re: A question about the Middleware module "djangodblog" and its "DBLogMiddleware" class

2012-12-17 Thread dariyoosh
> > *Yes, I suspect so. Try the following: > > python manage.py shell > import djangodblog > djangodblog.__file__ > > (That's two underscores on each side of the word file). This will print a > string that I expect will end with '.../djangodblog/__init__.pyc'* > *. Whatever is

Re: LDAP search results "disappear"

2012-12-17 Thread Bill Freeman
On Mon, Dec 17, 2012 at 1:58 PM, Kevin Cole wrote: > On Mon, Dec 17, 2012 at 1:57 PM, Kevin Cole wrote: > > > And here I'll display my ignorance about threading. I've done nothing > > specific to ask for threading. I wouldn't know how to thread even if I >

Re: LDAP search results "disappear"

2012-12-17 Thread Kevin Cole
On Mon, Dec 17, 2012 at 1:57 PM, Kevin Cole wrote: > And here I'll display my ignorance about threading. I've done nothing > specific to ask for threading. I wouldn't know how to thread even if I > had a sewing machine. ;-) I'm using apache prefork with mod-wsgi. In >

Re: LDAP search results "disappear"

2012-12-17 Thread Kevin Cole
On Mon, Dec 17, 2012 at 1:42 PM, Bill Freeman wrote: > Perhaps in the thread in which autoname is run, login has not yet been run. And here I'll display my ignorance about threading. I've done nothing specific to ask for threading. I wouldn't know how to thread even if I had

Re: Django Celery FIFO ORDER

2012-12-17 Thread Nikolas Stevenson-Molnar
No problem; best of luck! :) _Nik On 12/17/2012 10:47 AM, psychok7 wrote: > ok i see your point.. Well i am going to use my redis db already used > by celerey to do the sorting then. hope its fast enough. > > Thanks for your time to help me out ;) > > On Monday, December 10, 2012 4:20:52 PM UTC,

Re: Django Celery FIFO ORDER

2012-12-17 Thread psychok7
ok i see your point.. Well i am going to use my redis db already used by celerey to do the sorting then. hope its fast enough. Thanks for your time to help me out ;) On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API (json

Re: LDAP search results "disappear"

2012-12-17 Thread Bill Freeman
On Mon, Dec 17, 2012 at 1:03 PM, Kevin Cole wrote: > Also asked on StackOverflow > > > http://stackoverflow.com/questions/13918785/django-ldap-search-results-disappear > > Why in the code below, does the global *direktorie* return the correct > data in the *login()* debug

Re: A question about the Middleware module "djangodblog" and its "DBLogMiddleware" class

2012-12-17 Thread Bill Freeman
On Mon, Dec 17, 2012 at 12:41 PM, dariyoosh wrote: > Hello there, > > > Thank you very much for your time and your attention to my question. > Your solution solved the problem ! > > It works pretty well now. :) > > Just one question, initially I had written >

Re: Django Celery FIFO ORDER

2012-12-17 Thread Nikolas Stevenson-Molnar
If you're processing 10k requests serially, then the database won't be your bottleneck. Since you'd be sorting by primary key, and that gets automatically indexed, your database won't even flinch at selecting the top row from 10k records. The real bottleneck is going to be the fact that you're

LDAP search results "disappear"

2012-12-17 Thread Kevin Cole
Also asked on StackOverflow http://stackoverflow.com/questions/13918785/django-ldap-search-results-disappear Why in the code below, does the global *direktorie* return the correct data in the *login()* debug template, yet when I try to access the same variable from *autoname()* it says the

Re: A question about the Middleware module "djangodblog" and its "DBLogMiddleware" class

2012-12-17 Thread dariyoosh
Hello there, Thank you very much for your time and your attention to my question. Your solution solved the problem ! It works pretty well now. :) Just one question, initially I had written *'djangodblog.DBLogMiddleware'* simply because this was what author has suggested in the book. But now

Re: A question about the Middleware module "djangodblog" and its "DBLogMiddleware" class

2012-12-17 Thread Bill Freeman
I don't have djangodblog handy, but, at a guess try changing settings to use: *'djangodblog.middleware.DBLogMiddleware'* instead of: *'djangodblog.DBLogMiddleware'* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

A question about the Middleware module "djangodblog" and its "DBLogMiddleware" class

2012-12-17 Thread dariyoosh
Hello everybody Currently I'm learning python Web development by Django and I'm reading James McGaw' book: "Beginning Django E-Commerce" (Apress Edition). So far, I've followed step by step the instructions given in the book and everything worked pretty well: - installation of Django, MySQL,

Re: django doesn't send me error mails

2012-12-17 Thread Ali Vakilzade
ok, after this answer a said I sghoulf test django internal server I simply started server with runserver (didn't change email backend) and the mail sending worked! so now I think It's a uwsgi related problem but I couldn't fine anything about that (there was a page on stackoverflow saying run

Re: deprecation of DotExpandedDict announced?

2012-12-17 Thread Roman Klesel
2012/12/17 donarb > > > https://github.com/django/django/commit/c57abd3c29cedcca00821d2a0d5708f10977f3c6 > > ahh the commit, thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: deprecation of DotExpandedDict announced?

2012-12-17 Thread donarb
On Monday, December 17, 2012 7:37:59 AM UTC-8, roman wrote: > > Hello everyone, > > just trying 1.5 beta ... > > django.utils.datastructures.DotExpandedDict seems to be no longer there. > Can't find where this has been announced. > Did I miss something? > > Regards > Roman >

deprecation of DotExpandedDict announced?

2012-12-17 Thread roman
Hello everyone, just trying 1.5 beta ... django.utils.datastructures.DotExpandedDict seems to be no longer there. Can't find where this has been announced. Did I miss something? Regards Roman -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: getting "DateTimeField received a naive datetime" error but have no DateTimeFields

2012-12-17 Thread Tom Evans
On Fri, Dec 14, 2012 at 5:46 PM, bobhaugen wrote: > RuntimeWarning: DateTimeField received a naive datetime (2012-12-14 > 17:39:38.878379) while time zone support is active. > > This is happening in my tests, but not in normal code. > > From dropping a trace in, it looks

Re: Django back button issue after log-out

2012-12-17 Thread Ashish Sable
yup... Got the solution just the bower cache needs to be cleared. from django.views.decorators.cache import cache_control @cache_control(no_cache=True, must_revalidate=True, no_store=True) def view(): After logout it will render to login page. On Monday, 17 December 2012 18:39:25 UTC+5:30,

Re: Django back button issue after log-out

2012-12-17 Thread Bill Freeman
On Mon, Dec 17, 2012 at 5:14 AM, Ashish Sable wrote: > > I have written simple registration(login,logout) Django apps. > when i click on logout and then back button from browser > it shows me previous page. it should redirect me to login page. please help > > The back

Django back button issue after log-out

2012-12-17 Thread Ashish Sable
I have written simple registration(login,logout) Django apps. when i click on logout and then back button from browser it shows me previous page. it should redirect me to login page. please help -- You received this message because you are subscribed to the Google Groups "Django users"

Re: problem with timeout

2012-12-17 Thread Avraham Serour
you could optimize the database (creating indexes, putting in memory, using a ssd etc) you can run the process in backgorund On Mon, Dec 17, 2012 at 1:34 PM, Szabo, Patrick (LNG-VIE) < patrick.sz...@lexisnexis.at> wrote: > Hi, > > I have an operation that takes about 10 minutes to befinished.

problem with timeout

2012-12-17 Thread Szabo, Patrick (LNG-VIE)
Hi, I have an operation that takes about 10 minutes to befinished. It takes that long because our DB is pretty big. This produces a timeout. I have tried so set the timeout in apache higher but it seems that apache is not taking this directivejust keeps timing out after 300 seconds. Is

Re: Implementing a monitoring system with django.

2012-12-17 Thread Sergiy Khohlov
"Pro python system administration" by Rytis Sileika published by Apress covers this area. Jinja2 is used for generating templates. You also can use django for this task. Many thanks, Serge +380 636150445 skype: skhohlov 2012/12/17 Ryan Nowakowski : > Checkout