How can you use the @cache_page decorator with Django class based views?

2015-11-14 Thread daniels
The only method that seems to be working is adding the decorator in urls.py which is ugly. Is there any way to apply this decorator in the view? class HomeView(View): @method_decorator(cache_page(60 * 60)) def dispatch(self, *args, **kwargs): return super(HomeView,

Re: Existing database - new project

2015-03-13 Thread Robert Daniels
thanks for everyone's input. I'll run parallel implementations and see which one works best for the long haul. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Existing database - new project

2015-03-06 Thread Robert Daniels
I understand it is possible to use an existing database on a new Django project. As I see it, I have 2 choices. 1 - Use the existing database and deal with it in that fashion. or 2 - Create a new project to store the same type of data as if there were no existing database, Then write a

Re: Django dev server issue

2011-01-04 Thread daniels
Ok, so i used pdb and did a line by line pass, but i didn't get anything. All data seems to be normal. I even edited socket.py and did a print on data to see what's going on and everything seems normal.. :( so i'm left with no idea I guess i'll have to get used with this hangs. -- You received

Re: Django dev server issue

2011-01-03 Thread daniels
Just tried latest version of Django 1.2.4 and same issue I'll try that. Never used pdb before so let's see how things will go. I'll reply with updates. On Jan 3, 11:35 pm, Shawn Milochik wrote: > On Jan 3, 2011, at 4:28 PM, Brian Bouterse wrote: > > > Have you tried using pdb

Re: Django dev server issue

2011-01-03 Thread daniels
ython > (http://www.python.org/download/releases/2.6.6/) instead of ActivePython and > see if that improves things. > > - Craig - > > > > > > > > On Mon, Jan 3, 2011 at 14:09, daniels <daniels0...@gmail.com> wrote: > > Hi, > > Unfortunately i

Re: Django dev server issue

2011-01-03 Thread daniels
gt; Have you found the cause? What version of python and django are you > using? I also have this issue but it is not often enough for me to > worry too much. Killing the server and restarting it solves it for > me.. > > BR, > ---- > > On 3 Jan, 08:00, daniels <daniels

Re: Django dev server issue

2011-01-03 Thread daniels
Here are the relevant files: myproject/urls.py -- from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$',

Re: New to Django, sheet music organization site

2011-01-02 Thread daniels
SlugField ? On Jan 3, 12:56 am, Kyle wrote: > Ok I have a good start. I have run into a problem though. In my > database, I have an artist field. Most artists have a space in there > name. When creating my URLs, how can I ignore white space? > > For example, take the artist

Django dev server issue

2011-01-02 Thread daniels
Hi, I'm having a issue with Django's dev server. I did a "django-admin.py startproject" then "manage.py startapp home", then added the app in settings.py and in urls.py. The app only has a index function in views.py which is mapped to / and just renders a simple html template. What happens is

Re: Best OS - VPS environment

2010-08-16 Thread daniels
+1 for Debian or FreeBSD and Nginx Really fast/easy to setup and works withouth any problems. On Aug 16, 12:48 pm, Alex wrote: > FreeBSD > > On Mon, Aug 16, 2010 at 12:39 PM, Kenneth Gonsalves wrote: > > > On Mon, 2010-08-16 at 01:54 -0700, Dan wrote: > >

Re: Session not working as i had hoped

2010-05-26 Thread daniels
Also move : request.session['has_visited'] = True above the return statement. On May 26, 4:02 pm, Nuno Maltez wrote: > http://docs.djangoproject.com/en/dev/topics/http/sessions/#using-sess... > > >    if request.session.get('has_visited',True): > > You're passing True as

Re: temp url with time limit

2010-04-23 Thread daniels
Take a look at this Lighttpd module: http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSecDownload You could implement something based on what the module above is doing. On Apr 23, 12:26 pm, Faizan wrote: > Wondering if there is a good way to generate temporary