Re: Flatpages - what am I missing to make these work (advice, please)?

2009-08-18 Thread alain31
I just had the same problem, because my site.id was not 1 but 2 as I discovered with the shell... On 18 août, 22:24, gegard <geoff.gardi...@gmail.com> wrote: > > I cannot get flatpages to work on my site > > ... which, I should have said, is in Dja

Re: Flatpages - what am I missing to make these work (advice, please)?

2009-08-18 Thread gegard
> I cannot get flatpages to work on my site ... which, I should have said, is in Django 1.1. Geoff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Flatpages - what am I missing to make these work (advice, please)?

2009-08-18 Thread gegard
I cannot get flatpages to work on my site, although I have done all that I can see in the documentation, and would like guidance. I give a 6-step short description of what I've done and what happened, in case anyone recognizes a glaring mistake or lack in what I've done. Step 6 is it just

Flatpages-like application and caching

2009-07-03 Thread Ryan K
Greetings, I am designing an application that is very simple like flatpages but I need the ability to associate a menu with the content which will be done through the URL (i.e. example.com/products/widget2009 would invoke the products menu and the widget2009 static page). I expect these pages

Re: How to use MEDIA_URL on flatpages content?

2009-06-25 Thread Panu Tangchalermkul
I think I got your concept, converting all MEDIA_URL to corresponding url before displaying. But I still curious to know where should I put this code in the project? I've been thinking and can only come up with a way, by creating a new middleware replicating FlatpageFallbackMiddleware but

Re: How to use MEDIA_URL on flatpages content?

2009-06-25 Thread Rama Vadakattu
Please ignore the last line.. On Jun 25, 2:40 pm, Rama Vadakattu wrote: > you can put {{MEDIA_URL}} > > but while displaying instead of displaying it directly  just do the > below > > from django.template.loader import render_to_string > from django.template

Re: How to use MEDIA_URL on flatpages content?

2009-06-25 Thread Rama Vadakattu
you can put {{MEDIA_URL}} but while displaying instead of displaying it directly just do the below from django.template.loader import render_to_string from django.template import Context, Template t = Template("flat page content goes here") newflatpage =

How to use MEDIA_URL on flatpages content?

2009-06-25 Thread Panu Tangchalermkul
In the content of my flatpage, there's a picture to be displayed that it was stored in django media folder. I want to link to this file without having to specify its url directly. Instead, I want to use something like {{MEDIA_URL}} when editing the content via django- admin. I know I can use it

Re: Flatpages only works when settings.DEBUG = True

2009-06-24 Thread Fred Chevitarese
e problem still there.Thanks > > > On Tue, May 5, 2009 at 12:06 AM, Brian Neal <bgn...@gmail.com> wrote: > > >> On May 4, 10:28 am, Ronghui Yu <stone...@gmail.com> wrote: > >> > Hi,All, > > >> > I am going to use Flatpages app for thos

Re: simple of flatpages with custom ordering

2009-06-04 Thread josebrwn
thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to

Re: simple of flatpages with custom ordering

2009-06-04 Thread Alex Gaynor
On Thu, Jun 4, 2009 at 12:52 PM, josebrwn <joseb...@gmail.com> wrote: > > Hi, > > I would like to have a list of recent flatpages. I'm doing something > like: > > class LatestCmsNode(template.Node): >def render(self, context): >context['la

simple of flatpages with custom ordering

2009-06-04 Thread josebrwn
Hi, I would like to have a list of recent flatpages. I'm doing something like: class LatestCmsNode(template.Node): def render(self, context): context['latest_cms'] = FlatPage.objects.all()[:2] return '' but this orders the results by url (title

Apache, 404'ing FlatPages, and SITE_ID's

2009-05-26 Thread Joseph Brown
Hi, I'm looking for some help getting Apache running correctly with FlatPages, as well running with multiple sites on the same server. First the FlatPages problem. Everything's fine on my dev box (WinXP), but on my production box (Debian) the Flatpages only work when running the django testing

Re: django-cms and flatpages with tiny_mce path problem

2009-05-07 Thread Jesse
Hello, The thread link didn't go through. On May 7, 12:25 pm, branesks <brane...@gmail.com> wrote: > Follow this thread. > > Sent from my iPhone > > On May 7, 2009, at 12:09, Jesse <adles...@gmail.com> wrote: > > > > > Hello, > > > I've impleme

Re: django-cms and flatpages with tiny_mce path problem

2009-05-07 Thread branesks
Follow this thread. Sent from my iPhone On May 7, 2009, at 12:09, Jesse <adles...@gmail.com> wrote: > > Hello, > > I've implemented both django-cms and flatpages, but can not get > tiny_mce to display in either. My > > URLs.py file: >(r'^tinymce/', incl

django-cms and flatpages with tiny_mce path problem

2009-05-07 Thread Jesse
Hello, I've implemented both django-cms and flatpages, but can not get tiny_mce to display in either. My URLs.py file: (r'^tinymce/', include('tinymce.urls')), from django.conf import settings if settings.DEBUG: urlpatterns += patterns('', (r'^site_media/(?P

Re: Flatpages only works when settings.DEBUG = True

2009-05-05 Thread Ronghui Yu
variables. I will change them to a simple one and > see if the problem still there.Thanks > > > On Tue, May 5, 2009 at 12:06 AM, Brian Neal <bgn...@gmail.com> wrote: > >> >> On May 4, 10:28 am, Ronghui Yu <stone...@gmail.com> wrote: >> > Hi,All, >

Re: Flatpages only works when settings.DEBUG = True

2009-05-04 Thread Ronghui Yu
, Ronghui Yu <stone...@gmail.com> wrote: > > Hi,All, > > > > I am going to use Flatpages app for those simple pages. And everything > > works fine when settings.DEBUG is True, but when it is turned to False, > > a URL not configured in urlpatterns will trigger 500, no

Re: Flatpages only works when settings.DEBUG = True

2009-05-04 Thread Ronghui Yu
That's something I didn't try. It is a good idea to figure out what the problem is.Thanks On Tue, May 5, 2009 at 12:01 AM, Masklinn wrote: > > On 4 May 2009, at 17:28 , Ronghui Yu wrote: > > I don't quite understand why this happens, and how to solve it. > > Has anybody

Re: Flatpages only works when settings.DEBUG = True

2009-05-04 Thread Brian Neal
On May 4, 10:28 am, Ronghui Yu <stone...@gmail.com> wrote: > Hi,All, > > I am going to use Flatpages app for those simple pages. And everything > works fine when settings.DEBUG is True, but when it is turned to False, > a URL not configured in urlpatterns will trigger 500,

Re: Flatpages only works when settings.DEBUG = True

2009-05-04 Thread Masklinn
On 4 May 2009, at 17:28 , Ronghui Yu wrote: > I don't quite understand why this happens, and how to solve it. > Has anybody ever met this problem? And any suggestions? > > Thanks in advance. > Setup a local smtp sink and activate the "mail on 500" thing, to see why it's erroring out?

Flatpages only works when settings.DEBUG = True

2009-05-04 Thread Ronghui Yu
Hi,All, I am going to use Flatpages app for those simple pages. And everything works fine when settings.DEBUG is True, but when it is turned to False, a URL not configured in urlpatterns will trigger 500, not 404. This happens on both Apache2 and the Django native testing server. Here is some

Re: Flatpages and additional context

2009-04-21 Thread Simon
Looks good. Thanks :) On 21 Apr, 14:31, Tom Evans <tevans...@googlemail.com> wrote: > On Tue, 2009-04-21 at 06:02 -0700, Simon wrote: > > I'm using Django flatpages for all the "one-off" pages on my website, > > but I'd like to create a "lite&q

Re: Flatpages and additional context

2009-04-21 Thread Tom Evans
On Tue, 2009-04-21 at 06:02 -0700, Simon wrote: > I'm using Django flatpages for all the "one-off" pages on my website, > but I'd like to create a "lite" version of the site for iPhone users > (for example) which would use a different style sheet and shorten th

Flatpages and additional context

2009-04-21 Thread Simon
I'm using Django flatpages for all the "one-off" pages on my website, but I'd like to create a "lite" version of the site for iPhone users (for example) which would use a different style sheet and shorten the site menu (by missing off several of the least used menu options).

Re: Flatpages variables

2009-04-02 Thread Wiiboy
Oh. Ok, I just read the docs. I'm going to use process_request. Thanks a bunch! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Flatpages variables

2009-04-01 Thread Oli Warner
Same principal stands; you'll need to use middleware to check the current user has what they need on their session and interrupt the request if they don't. If that doesn't make sense, read up on what middleware can do for you. On Wed, Apr 1, 2009 at 4:47 PM, Wiiboy wrote:

Re: Flatpages variables

2009-04-01 Thread Wiiboy
Sorry, should've pointed out: I'm not using Django's user system, because I've got a PHP forum that I have to integrate with. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Flatpages variables

2009-04-01 Thread Rajesh D
lable for other users.  I'd like make them available on flatpages, > but I have to be able to check whether the user is logged in. > > Can I do that? http://www.djangosnippets.org/snippets/136/ --~--~-~--~~~---~--~~ You received this message because you are s

Flatpages variables

2009-04-01 Thread Wiiboy
Hi, I've got a site where users must be logged in to view any pages. Logged in users may write articles for the newsletter, and upload them. I then convert the article to HTML (manually), and make it available for other users. I'd like make them available on flatpages, but I have to be able

Re: Port Number for Flatpages Sites

2009-03-05 Thread Kyle Hayes
Never mind. Things are working fine. There was something wrong with my default.html template. On Mar 5, 8:10 am, Kyle Hayes <mrkyleha...@gmail.com> wrote: > Does it matter if I specify a port number for the site domain in Sites > from the Admin panel for my flatpages to work? I'm r

Port Number for Flatpages Sites

2009-03-05 Thread Kyle Hayes
Does it matter if I specify a port number for the site domain in Sites from the Admin panel for my flatpages to work? I'm really having a tough time getting these flatpages to display. Thanks, Kyle --~--~-~--~~~---~--~~ You received this message because you

Re: Django Flatpages nd set_language

2009-03-04 Thread Rajesh D
Hi Trevor, > I am building a bilingual cms type web site using Flatpages and django > admin to obviously input the content. I am using django-multilingual. > I need to be able to swap languages from one to another remembering > the page the user is on, I am aware of set_language a

Django Flatpages nd set_language

2009-03-04 Thread tdelam
Hi everyone, I am building a bilingual cms type web site using Flatpages and django admin to obviously input the content. I am using django-multilingual. I need to be able to swap languages from one to another remembering the page the user is on, I am aware of set_language and I created

Re: Inclusion Tags in Flatpages

2009-03-01 Thread Daniel Roseman
age code to make ti work so has > anyone got a nice method for doing this? > > Cheers. > > Doug Don't understand the question. There are no templates included with flatpages, you supply them yourself. So just put the tag into the template you write. -- DR. --~--~-~--~-

Inclusion Tags in Flatpages

2009-03-01 Thread d...@tintophat.com
I'm just starting to get my head around inclusion tags and have hit a roadblock. How on earth do I include them into a Flatpage base template? I don't want to have to dig into the flatpage code to make ti work so has anyone got a nice method for doing this? Cheers. Doug

Re: site.title does not show in child flatpages templates

2009-02-16 Thread Malcolm Tredinnick
site':current_site}) This has nothing to do with the problem at hand, since flatpages don't call your own views. [...] > and at the moment of viewing a flatpage, the title doesn't show, i > think taht the reason is because i've passed de current_site object > like a parameter in my view code, an

site.title does not show in child flatpages templates

2009-02-16 Thread Manuel Ignacio
evereting at mi web site. this is the template code: {% block title %}{{current_site.name}}{% endblock %} When i have the defatul.htlm page for flatpages, i have this: {% extends "doorsFront/default_index.html" %} {% block title %}{{current_site.name}} My page{% endblock%} {% blo

site.title does not show in child flatpages templates

2009-02-16 Thread Manuel Ignacio
evereting at mi web site. this is the template code: {% block title %}{{current_site.name}}{% endblock %} When i have the defatul.htlm page for flatpages, i have this: {% extends "doorsFront/default_index.html" %} {% block title %}{{current_site.name}} My page{% endblock%} {% blo

Re: Flatpages

2009-01-21 Thread Adi Sieker
Hi, check this out. http://code.djangoproject.com/ticket/6932 adi On 21.01.2009, at 16:53, Gordon wrote: > > Hi > I've just started to use Django and have been using the flatpages > plugin for serving static pages. Does anyone know how or a plugin that > will generate a cont

Flatpages

2009-01-21 Thread Gordon
Hi I've just started to use Django and have been using the flatpages plugin for serving static pages. Does anyone know how or a plugin that will generate a content's tree from the URLs? e.g. /staff/ /staff/management/ /staff/clerical/ /staff/technical/ /projects/ /projects/ace/ /projects/django

Re: Named URLs for Flatpages?

2008-12-16 Thread Nick Sandford
On Wed, Oct 22, 2008 at 6:14 AM, erikcw <erikwickst...@gmail.com> wrote: > > Hi all, > > I'm working on a project that uses flatpages pretty heavily. I was > wondering if there was a way to use named urls with flatpages so that > I can use reverse() in m

Re: Index page using flatpages

2008-12-10 Thread Nuno Machado
> It isn't a bug. Read the docs. Create yourself an empty 404.html and > 500.html file in your templates directory and your flatpage will work > with DEBUG=False. You are so right!! :) It worked like a charm! I neglected this box: "Ensure that your 404 template works Note that the

Re: Index page using flatpages

2008-12-10 Thread Brian Neal
produce my error. I used the > instructions provided in the latest documentation to add FlatPages and > an Admin application. > > When I add a FlatPage for my site index page (URL = /) it works fine. > > Then, if I change the DEBUG flag to False in my settings.py, the index > page is

Re: Index page using flatpages

2008-12-10 Thread Nuno Machado
Hi Brian. Thank you. I've read the documents you pointed out. But the issue is not on 404/500 html templates, but in the DEBUG setting. I've started a project from scratch to reproduce my error. I used the instructions provided in the latest documentation to add FlatPages and an Admin

Re: Index page using flatpages

2008-12-10 Thread Nuno Machado
Thanks a lot, Jeff FW and Dmitry Dzhus. I'm using the most recent release version of Django (installed 5 days ago). 'django.contrib.flatpages' and 'django.contrib.sites' are listed in my INSTALLED_APPS. 'middleware.FlatpageFallbackMiddleware' is in my MIDDLEWARE_CLASSES. My urls.py WAS

Re: Index page using flatpages

2008-12-10 Thread Dmitry Dzhus
Nuno Machado wrote: > If I put / in the URL field, I need to write "mysite.com//" to get > access to my index page. This is not good for visitors! It works fine for me when URL of flatpage is just slash, I type in site.com and see my flatpage. Probably your Django installation is a bit old or

Re: Index page using flatpages

2008-12-10 Thread Jeff FW
Nuno, "Yes, I do. It's a default setting." Never hurts to check--just because it's default, doesn't mean you haven't unset it :-) I just ran a very simple test, using a project that I use for testing Django apps--which I had never used flatpages in. I added the FlatpageMiddlew

Re: Index page using flatpages

2008-12-10 Thread Nuno Machado
com/en/dev/ref/middleware/#module-django.mi... > > On Dec 9, 7:29 pm, Nuno Machado <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm using flatpages to display some static content in a site. The > > "about" page is working flawlessly (URL = mysite.com/abo

Re: Index page using flatpages

2008-12-09 Thread Jeff FW
Do you have CommonMiddleware enabled in your settings.py? http://docs.djangoproject.com/en/dev/ref/middleware/#module-django.middleware.common On Dec 9, 7:29 pm, Nuno Machado <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using flatpages to display some static content in a site. The

Index page using flatpages

2008-12-09 Thread Nuno Machado
Hi, I'm using flatpages to display some static content in a site. The "about" page is working flawlessly (URL = mysite.com/about) but now I'm trying to define the index (URL = mysite.com) using flatpages. I'm having troubles defining the URL in the administration panel: If I put /

Re: Django - processing flatpages problem.

2008-12-01 Thread Grzegorz Szymański
I used DEBUG_PROPAGATE_EXCEPTIONS variable and thanks to this found a bug in my application. On Sunday 30 of November 2008 12:22:25 Grzegorz Szymański wrote: > Thank you for the tip. It works well. > > I have problem with processing flat pages. > When debug is switched to True the error appear

Re: Django - processing flatpages problem.

2008-11-30 Thread Grzegorz Szymański
Thank you for the tip. It works well. I have problem with processing flat pages. When debug is switched to True the error appear in db with following content: Traceback (most recent call last): File "/usr/local/lib/python2.6/site-packages/django/core/handlers/base.py", line 86, in

Re: 1.02 Bug with Flatpages and Append_Slash?

2008-11-23 Thread Malcolm Tredinnick
On Sun, 2008-11-23 at 20:26 -0800, watusee wrote: > Picture a site with a flatpage at the root. This root flatpage in the > admin tool has a "/" for the URL. The root flatpage gets into a > redirect loop. All other flatpages except the root flatpage work fine. > If Append

1.02 Bug with Flatpages and Append_Slash?

2008-11-23 Thread watusee
Picture a site with a flatpage at the root. This root flatpage in the admin tool has a "/" for the URL. The root flatpage gets into a redirect loop. All other flatpages except the root flatpage work fine. If Append_Slash is set to false, this perplexing behavior no longer occurs an

Re: Named URLs for Flatpages?

2008-10-23 Thread Malcolm Tredinnick
On Tue, 2008-10-21 at 14:14 -0700, erikcw wrote: > Hi all, > > I'm working on a project that uses flatpages pretty heavily. I was > wondering if there was a way to use named urls with flatpages so that > I can use reverse() in my other views and {% url flat_privacy_policy >

Named URLs for Flatpages?

2008-10-21 Thread erikcw
Hi all, I'm working on a project that uses flatpages pretty heavily. I was wondering if there was a way to use named urls with flatpages so that I can use reverse() in my other views and {% url flat_privacy_policy %} in my templates. I haven't been able to find anything helpful in the docs so

Re: Error Pages and Flatpages

2008-10-16 Thread Håkan Waara
Try searching for 404 on http://docs.djangoproject.com -- there's both flatpages-specific information on how to deal with 404 errors and also how to handle it in general in your django apps. In general, try searching the django docs site first -- there's a lot of good info there. /Håkan

Re: Template inheritance and flatpages

2008-10-16 Thread chiggsy
> > Yeps. But use {% extends "base.html" %} instead - notice the quotes. Aie! How could I miss that? :( Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Template inheritance and flatpages

2008-10-16 Thread bruno desthuilliers
On 16 oct, 12:32, chiggsy <[EMAIL PROTECTED]> wrote: > If I am using flatpages, can i have my flatpages/default.html inherit > from my sites base.html? > > I've a template dir, with a subdirectory "flatpages" and file > "default.html" inside that subdir

Template inheritance and flatpages

2008-10-16 Thread chiggsy
If I am using flatpages, can i have my flatpages/default.html inherit from my sites base.html? I've a template dir, with a subdirectory "flatpages" and file "default.html" inside that subdir. Now, in default.html the first line is {%extends base.html%} which is in the direct

Error Pages and Flatpages

2008-10-14 Thread Hingarajiya,Ravi
Hi All, I am newer in Django Web Framework. I am very curious to know the following How to handle error pages and flat pages? Example : Error : 404 Error : Page not found. Ravi Hingarajiya --~--~-~--~~~---~--~~ You received this message

Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-06 Thread John Allen
There are a few fairly recent threads touching this issue - including one of mine - but I'd like to ask a new question. The FlatPage model requires an explicity defined - ie hard-coded - URL and get_absolute_url() is set equal to this hard-coded URL (eg "/ about/"). For my purposes I needed to

Re: installing tiny mce for flatpages

2008-10-06 Thread Brian Neal
> correctly and is serving static content. Okay. I am using TinyMCE with many textareas on my site, however I have not tried it with flatpages yet, so I can't vouch for those instructions on the wiki. Can you activate it on a "normal" model in the admin area? That might narrow it

Re: installing tiny mce for flatpages

2008-10-05 Thread Bobby Roberts
> So you did this > part?http://code.djangoproject.com/wiki/AddWYSIWYGEditor#UsingTinyMCEwithf... > > Do you have MEDIA_URL and MEDIA_ROOT setup correctly in settings.py? > Are you using the development server? Do you have that setup to server > static content? yeah see my previous post. This

Re: installing tiny mce for flatpages

2008-10-05 Thread Brian Neal
On Oct 5, 9:35 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > Did you see this: > > >http://code.djangoproject.com/wiki/AddWYSIWYGEditor > > yeah i saw that and tried to follow it.  Here's what i did: > > 1.  d/l tinymce > 2.  uploaded to /static/admin/js/tiny_mce   (i have static setup as an >

Re: installing tiny mce for flatpages

2008-10-05 Thread Bobby Roberts
> Did you see this: > > http://code.djangoproject.com/wiki/AddWYSIWYGEditor yeah i saw that and tried to follow it. Here's what i did: 1. d/l tinymce 2. uploaded to /static/admin/js/tiny_mce (i have static setup as an app to serve static files) 3. I created a textarea.js file as

Re: installing tiny mce for flatpages

2008-10-05 Thread Brian Neal
On Oct 4, 3:34 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi group.  I need some help getting tinymce installed for flatpages in > admin.  I'm serving static content from an application called /static/ > with tinymce located in /static/js/tiny_mce/.  I have read the doc

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread bruno desthuilliers
On 5 oct, 11:30, Erik Allik <[EMAIL PROTECTED]> wrote: > > what if I did the from django.core.urlresolvers import reverse part in > the function itself that gets called? > > def my_flatpage_url(o): >from django.core.urlresolvers import reverse >return '%s%s' % (reverse('my-site-index'),

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread John Allen
Small postscript to the above: On 21 August, Jannis Leidel (http://jannisleidel.com/) posted that he was using something like Erik's code: from django.core.urlresolvers import reverse ABSOLUTE_URL_OVERRIDES = { 'coltrane.entry': lambda o: reverse('coltrane_entry_detail', kwargs={

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread John Allen
Malcolm, Thanks, your explanation is clear for me and I certainly don't need to live dangerously - the conventional usage of ABSOLUTE_URL_OVERRIDES works fine for me. I was only trying to satisfy my curiosity about using reverse() because I've read a number of posts from James Bennett and others

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread Erik Allik
Malcolm, what if I did the from django.core.urlresolvers import reverse part in the function itself that gets called? def my_flatpage_url(o): from django.core.urlresolvers import reverse return '%s%s' % (reverse('my-site-index'), o.url) ABSOLUTE_URL_OVERRIDES = {

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread Malcolm Tredinnick
On Sun, 2008-10-05 at 12:30 +0300, Erik Allik wrote: > Malcolm, > > what if I did the from django.core.urlresolvers import reverse part in > the function itself that gets called? > > def my_flatpage_url(o): >from django.core.urlresolvers import reverse >return '%s%s' %

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread free won
in Js, "document.URL" has the same function as get_ab_url(). -- 真正的杰出,不是妙用规则的错层,而是极致的偏执于信念 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread Malcolm Tredinnick
On Sun, 2008-10-05 at 00:50 -0700, John Allen wrote: > Erik, Malcolm, > > Thanks for two very interesting answers - but which one is correct? > Malcolm, you are saying, in effect, that the code in Erik's post can > never work in the settings file? Even if it does work by accident, it would not

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-05 Thread John Allen
Erik, Malcolm, Thanks for two very interesting answers - but which one is correct? Malcolm, you are saying, in effect, that the code in Erik's post can never work in the settings file? John --~--~-~--~~~---~--~~ You received this message because you are

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-04 Thread Malcolm Tredinnick
On Sat, 2008-10-04 at 09:42 -0700, John Allen wrote: [...] > This works fine but I am wondering: can the function in > ABSOLUTE_URL_OVERRIDES make use of reverse(), so as to avoid hard- > coding the "/cms" into the setting? No, you can't do this. The rule is that you cannot use any pieces of

Re: Flatpages, get_absolute_url() and ABSOLUTE_URL_OVERRIDES

2008-10-04 Thread Erik Allik
from django.core.urlresolvers import reverse def get_flatpage_absolute_url(o): return '%s%s' % (reverse('site-index'), o.url) ABSOLUTE_URL_OVERRIDES = { 'flatpages.flatpage': get_flatpage_absolute_url } Actually I think this would work too: ABSOLUTE_URL_OVERRIDES = {

installing tiny mce for flatpages

2008-10-04 Thread Bobby Roberts
hi group. I need some help getting tinymce installed for flatpages in admin. I'm serving static content from an application called /static/ with tinymce located in /static/js/tiny_mce/. I have read the docs on creating an admin.py file and have done that as well but it's not showing

Re: Accessing Settings from Flatpages

2008-09-22 Thread Chris
On Sep 22, 8:59 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Chris wrote: > > I have various global values, like SITE_NAME, defined in my > > settings.py. How would you make settings available inside Flatpage > > templates? For non-flatpages, I'm currently import

Re: Accessing Settings from Flatpages

2008-09-22 Thread Steve Holden
Chris wrote: > I have various global values, like SITE_NAME, defined in my > settings.py. How would you make settings available inside Flatpage > templates? For non-flatpages, I'm currently importing settings in my > view and explicitly passing it in render_to_response(). Do Flatpages

Accessing Settings from Flatpages

2008-09-22 Thread Chris
I have various global values, like SITE_NAME, defined in my settings.py. How would you make settings available inside Flatpage templates? For non-flatpages, I'm currently importing settings in my view and explicitly passing it in render_to_response(). Do Flatpages allow you to specify what data

[SOLVED] Re: get_absolute_url with flatpages doesn't give a complete path

2008-09-17 Thread John Allen
menu for Django flatpages" described here: http://blog.foozia.com/blog/2007/jul/29/simple-menu-django-flatpages/ The complete working code now looks like this: from django.template import Library, Node from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site

get_absolute_url with flatpages doesn't give a complete path

2008-09-15 Thread allenlux
I'm a newcomer to django but so far most things seem to work nicely. One detail which has left me baffled is how to get working urls for flatpages used in my site. For example, take a flatpage for which the url field is set to "/about/" The site as a whole has URLs of the

When flatpages default.html is missing, Django server error page not showing.

2008-07-20 Thread eka
HI all, Just testing the Flatpages functionality out of django and found out that when the default.html template is missing, the error is not showing on the default django error way, but a simple stack error. Don't know if this is a bug. I'm using 0.97-pre-SVN-8012. My flat page work well when

Re: extending flatpages

2008-07-13 Thread benjaoming
I just got started with Django and not before long I was thinking the same as you. So I wrote this blog post: http://overtag.dk/wordpress/2008/07/tip-extending-django-flatpages/ It's really simple, but quite a valuable technique, I think. The main idea is: Instead of extending the original

extending flatpages

2008-07-03 Thread Carl Karsten
I need to add some fields to flatpage model. (like header image) is there a clean way to do this? I saw it come up before, and one comment was "model subclassing is not supported." So now that it is supported... I am going to learn that it wont help me with this problem? Carl K

Flatpages and base template translations

2008-07-02 Thread shadfc
the menus and such work great. However, when I do the exact same thing with a flatpage, nothing gets translated in the base template. The introduction.html and flatpages/default.html are nearly the same, except that my page_title and content blocks are actual content in introduction.html

Embedding template tags inside of Flatpages content?

2008-07-01 Thread PFL
Is there any way to type template tags into the admin form field for Flatpages content and have them interpreted as template tags (instead of text to display) ? IF this is possible, then the next question would be to define some python dictionaries inside the flatpage contentthis is all

Re: Mako templates with flatpages

2008-06-20 Thread Peter Rowell
> Is this possible? Short answer: No. (At least I can't see anyway to accomplish it.) On the other hand, the flatpages code is really quite straightforward. views.py is 46 lines and models.py is only 36 lines. Why not grab a copy, possibly rename it to avoid confusion, and hack a

Mako templates with flatpages

2008-06-20 Thread mark
to change the views. Most of the website is flatpages. Is there a way to use Mako templates with flatpages without changing the Django source (flatpage views). I want to have the Django framework untouched and all the configurations, code etc. within my project folder. Is this possible? Regards, Mark

Re: Flatpages for static HTML pages?

2008-04-25 Thread Rodney Topor
On 4/24/08, Rodney Topor <[EMAIL PROTECTED]> wrote: > > > > >  Is Flatpages required to display every static HTML page?  It seems to > >  require a fair bit of work by the programmer, and requires additional > >  tables and rows in the database.   I guess it's sim

Flatpages for static HTML pages?

2008-04-24 Thread Rodney Topor
Is Flatpages required to display every static HTML page? It seems to require a fair bit of work by the programmer, and requires additional tables and rows in the database. I guess it's simpler for the programmer than writing a new view for every static HTML page, though this would not require

Re: Flatpages

2008-03-06 Thread Michael
Te two items that might be different between the servers is that one doesn't have DEBUG set to false or doesn't have flatpages installed properly. On my development servers in order not to have to change the site name and url when I launch the site, I have my development computer under sites

Re: Flatpages

2008-03-04 Thread bfrederi
ly identical, do a diff and see what *is* the > > difference between the two? Are the two running the same django versions? > > > bfrederi wrote: > > > I am using flatpages on a production box, and whenever I don't set > > > DEBUG to True in the settings.py file, the middlewa

Re: Flatpages

2008-03-03 Thread bfrederi
ff and see what *is* the > > difference between the two? Are the two running the same django versions? > > > bfrederi wrote: > > > I am using flatpages on a production box, and whenever I don't set > > > DEBUG to True in the settings.py file, the middleware won't redirec

Re: Flatpages

2008-03-03 Thread Michael
the configs are nearly identical, do a diff and see what *is* the > difference between the two? Are the two running the same django versions? > > > bfrederi wrote: > > I am using flatpages on a production box, and whenever I don't set > > DEBUG to True in the settings.py

Re: Flatpages

2008-03-03 Thread Lewis Bergman
If the configs are nearly identical, do a diff and see what *is* the difference between the two? Are the two running the same django versions? bfrederi wrote: > I am using flatpages on a production box, and whenever I don't set > DEBUG to True in the settings.py file, the middleware

Flatpages

2008-03-03 Thread bfrederi
I am using flatpages on a production box, and whenever I don't set DEBUG to True in the settings.py file, the middleware won't redirect to my flatpages for some reason. It gives me a 'TemplateDoesNotExist: 404.html' error message. It works perfectly fine on another box, and the setup for both

Re: Serving flatpages before other urls

2008-01-29 Thread Artiom Diomin
writes: | Is there anyway to change the order that the urls are checked? For | example I have an about us page that is generated by a url conf. I | want my designer to make his own about us page with flatpages and | therefore 'overwrite' the url that is autogenerated. I know right now | flatpages

<    1   2   3   4   >