Re: Flatpages problem

2006-08-03 Thread Edmund


Adrian Holovaty wrote:

> Are you sure you added
> 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' to
> your MIDDLEWARE_CLASSES setting? That's the part that actually
> *serves* the flatpages.

Thanks for the reply Adrian. Yes, I did add this. I was using
mod_python and Apache2. I've gone back to using the dev server, and
things seem to be working now. Must have set up something incorrectly
in the Apache config. I'll have to take a closer look at this to see
what the problem was.


...Edmund.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Flatpages problem

2006-08-03 Thread Adrian Holovaty

On 8/2/06, Edmund <[EMAIL PROTECTED]> wrote:
> Newbie question here... I installed Flatpages as per the docs. Then, I
> created a flatpage via the admin interface, and also checked that the
> SITE_IDs shown matched that in my settings.py.
>
> But, I get a 404. On tracing through the 404, I see that it is being
> raised in ~/django_src/django/shortcuts/__init__.py as a result of a
> klass.DoesNotExist exception in the get_object_or_404 method.
>
> What does this mean? What have I not done?

Hi Edmund,

Are you sure you added
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' to
your MIDDLEWARE_CLASSES setting? That's the part that actually
*serves* the flatpages.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Flatpages problem

2006-08-02 Thread Edmund

Newbie question here... I installed Flatpages as per the docs. Then, I
created a flatpage via the admin interface, and also checked that the
SITE_IDs shown matched that in my settings.py.

But, I get a 404. On tracing through the 404, I see that it is being
raised in ~/django_src/django/shortcuts/__init__.py as a result of a
klass.DoesNotExist exception in the get_object_or_404 method.

What does this mean? What have I not done?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Flatpages shows "FlatPage object" instead of friendly name

2006-05-11 Thread tomass

Great, glad to help out!!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Flatpages shows "FlatPage object" instead of friendly name

2006-05-11 Thread Adrian Holovaty

On 5/11/06, tomass <[EMAIL PROTECTED]> wrote:
> In the Flatpages list in the admin interface by default I see "FlatPage
> object" instead of, for instance, the title or URL field.
>
> Ditto with Sites.
>
> Is this supposed to be this way? I realize I could create a wrapper
> around the object and use a def __repr__(self) to take care of this,
> but just wondering...

I've fixed this for both the FlatPage and Site models. Thanks for
bringing it up!

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Flatpages shows "FlatPage object" instead of friendly name

2006-05-11 Thread tomass

In the Flatpages list in the admin interface by default I see "FlatPage
object" instead of, for instance, the title or URL field.

Ditto with Sites.

Is this supposed to be this way? I realize I could create a wrapper
around the object and use a def __repr__(self) to take care of this,
but just wondering...

Thanks, Tom


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



flatpages & DEBUG=False

2006-05-06 Thread JKR

I encountered problem that similar to ticket#1296 with the latest dev
revision?
my flatpages is only working when DEBUG=True. Currently, I'm using
revision 2864.

I try to look at the flatpages middleware, but cant find anything
suspicious :)
Anyone have the same problem or resolution?

Thanks,



Traceback (most recent call last):

  File
"/usr/lib/python2.3/site-packages/django/core/servers/basehttp.py",
line 272, in run
self.result = application(self.environ, self.start_response)

  File
"/usr/lib/python2.3/site-packages/django/core/servers/basehttp.py",
line 615, in __call__
return self.application(environ, start_response)

  File "/usr/lib/python2.3/site-packages/django/core/handlers/wsgi.py",
line 145, in __call__
response = self.get_response(request.path, request)

  File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py",
line 95, in get_response
return callback(request, **param_dict)

  File "/usr/lib/python2.3/site-packages/django/views/defaults.py",
line 78, in page_not_found
t = loader.get_template(template_name)

  File "/usr/lib/python2.3/site-packages/django/template/loader.py",
line 79, in get_template
return
get_template_from_string(*find_template_source(template_name))

  File "/usr/lib/python2.3/site-packages/django/template/loader.py",
line 72, in find_template_source
raise TemplateDoesNotExist, name

TemplateDoesNotExist: 404.html


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Flatpages and comments - question

2006-03-29 Thread ak

Ok found the answer myself. I added at the bottom of content block:
{% if flatpage.enable_comments %}
 {% load comments %}
{% free_comment_form for  flatpages.flatpages flatpage.id %}

etc ...


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-03-23 Thread Mary Adel

Thanks Adrain for your support
i am wondering is that means that i have to create another folder for
flatpages
in /usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/contrib/

and call it in my application

NB.all my change is just in this
file 
/usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/contrib/flatpages/views.py
 

Thanks  :)
Mary 
On Wed, 2006-03-22 at 10:03 -0600, Adrian Holovaty wrote:
> On 3/22/06, Mary Adel <[EMAIL PROTECTED]> wrote:
> > I am working with flatpages and they are amazing for me and i customized
> > them for my first needs then i am developing another site now that has
> > another needs and i need to customize flatpages but in different way so
> > how this could be done
> 
> Hi Mary,
> 
> This should be as simple as using your custom code in one place, and
> other custom code in another place. If the two usages are different
> enough, there's no point in sharing code -- just make them separate
> applications.
> 
> Adrian
> 
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com
> 
> 
> 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-03-22 Thread Adrian Holovaty

On 3/22/06, Mary Adel <[EMAIL PROTECTED]> wrote:
> I am working with flatpages and they are amazing for me and i customized
> them for my first needs then i am developing another site now that has
> another needs and i need to customize flatpages but in different way so
> how this could be done

Hi Mary,

This should be as simple as using your custom code in one place, and
other custom code in another place. If the two usages are different
enough, there's no point in sharing code -- just make them separate
applications.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-03-22 Thread Adrian Holovaty

On 3/22/06, Mary Adel <[EMAIL PROTECTED]> wrote:
> I am working with flatpages and they are amazing for me and i customized
> them for my first needs then i am developing another site now that has
> another needs and i need to customize flatpages but in different way so
> how this could be done

Hi Mary,

This should be as simple as using your custom code in one place, and
other custom code in another place. If the two usages are different
enough, there's no point in sharing code -- just make them separate
applications.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-03-22 Thread lawgon

>
> Dear All ,
> I am working with flatpages and they are amazing for me and i customized
> them for my first needs then i am developing another site now that has
> another needs and i need to customize flatpages but in different way so
> how this could be done

may we ask what the other needs are and what is different?



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



flatpages

2006-03-22 Thread Mary Adel

Dear All ,
I am working with flatpages and they are amazing for me and i customized
them for my first needs then i am developing another site now that has
another needs and i need to customize flatpages but in different way so
how this could be done

Thanks,
Mary


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-02-22 Thread John Szakmeister

On Wednesday 22 February 2006 08:22, Mary Adel wrote:
> how to call in flatpage a content i have saved in the database
> ex i saved the path of the css and java script in the database and i
> need to call it in my flatpage so how i could do this

The best way is probably to create a templatetag that can be used to fetch the 
path.  The best example I saw of this was the blog application for the django 
website.  Take a look at it's templatetag directory here:
 http://code.djangoproject.com/svn/djangoproject.com/django_website/apps/blog/

-John

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-02-21 Thread Mary Adel

really this path will be constant to all flatpages and all what i need
is how i could get the path from the database and put it in the template
is their a way for that

On Tue, 2006-02-21 at 20:02 -0500, Tom Tobin wrote:
> On 2/22/06, Mary Adel <[EMAIL PROTECTED]> wrote:
> >
> > how to call in flatpage aa content i have saved in the database
> > ex i saved the path of the css and java script in the database and i
> > need to call it in my flatpage so how i could do this
> 
> If those files change on a flatpage-by-flatpage basis, you might be
> better off making your own version of Flatpages with fields for the
> CSS/JS locations; you could then pass those into the template as
> appropriate.
> 
> 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: flatpages

2006-02-21 Thread Tom Tobin
On 2/22/06, Mary Adel <[EMAIL PROTECTED]> wrote:
>
> how to call in flatpage a content i have saved in the database
> ex i saved the path of the css and java script in the database and i
> need to call it in my flatpage so how i could do this

If those files change on a flatpage-by-flatpage basis, you might be
better off making your own version of Flatpages with fields for the
CSS/JS locations; you could then pass those into the template as
appropriate.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



flatpages

2006-02-21 Thread Mary Adel

how to call in flatpage a content i have saved in the database 
ex i saved the path of the css and java script in the database and i
need to call it in my flatpage so how i could do this




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Important change: flatpages and redirects refactored into standalone/optional apps

2005-11-11 Thread Adrian Holovaty

On 11/11/05, Maniac <[EMAIL PROTECTED]> wrote:
> Looks like there are no links to these docs from the documentation index
> (http://www.djangoproject.com/documentation/).
>
> I would look for them in the 'Available subframeworks' section.

Thanks, Maniac. I've added those links.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org


Re: Important change: flatpages and redirects refactored into standalone/optional apps

2005-11-11 Thread Maniac


Adrian Holovaty wrote:


   * The flatpages app: http://www.djangoproject.com/documentation/flatpages/
   * The redirects app: http://www.djangoproject.com/documentation/redirects/
 

Looks like there are no links to these docs from the documentation index 
(http://www.djangoproject.com/documentation/).


I would look for them in the 'Available subframeworks' section.


Important change: flatpages and redirects refactored into standalone/optional apps

2005-11-10 Thread Adrian Holovaty

All,

As of a code update today, flatpages and redirects, two features that
have been installed with Django by default but had not been
documented, are now optional add-ons. This is a backwards-incompatible
change, so all Django users are advised to follow the instructions in
the "Separated flatpages and redirects into standalone, optional apps"
section of the backwards-incompatible changes page:

http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges

This change makes Django leaner and meaner: It cuts a bit of
functionality that Django did by default but not everybody wanted to
take advantage of.

If you *do* want to use flatpages and redirects, check out these two
new pieces of documentation:

* The flatpages app: http://www.djangoproject.com/documentation/flatpages/
* The redirects app: http://www.djangoproject.com/documentation/redirects/

Please respond to this thread if you have any questions!

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org


Re: flatpages and templates

2005-10-31 Thread Adrian Holovaty

On 10/31/05, Alice <[EMAIL PROTECTED]> wrote:
> Is it better to have a flatfile with no 'content' and an associated
> template with the actual content or to put the content in the 'content'
> box?
>
> Is the 'content' box just for small pages that don't deserve their own
> actual file?

It's always better to put the content in the database rather than in
the template.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org


<    1   2   3   4