Re: Automatically assume "models." prefix in models.py

2010-11-14 Thread Steve Holden
On 11/13/2010 11:20 PM, James wrote:
> Forgive a django newbie...
> 
> Maybe I'm the laziest person in the world, but sometimes I get tired
> of typing "models.WhatEver" for every single model I have to write. Is
> there anyway a shortcut could be added that would 'assume' the
> 'models.' prefix when I am defining a model?
> 
> e.g. instead of:
> 
> class SomeModel(models.Model):
> something = models.SomeField(someoption=something)
> # some other things
> 
> Could a shortcut be added so that I can write:
> 
> class SomeModel(models.Model):
> something = SomeField(someoption=something)
> # some other things
> 
> 
> 
> I realized that not everything I will write will have the "models."
> prefix, but I think _most_ of what I write in models.py will have it.
> 
> So... I'm a being too lazy, or perhaps just stupid?
> 
You can import names individually from a module. In your examoke you
would do this:

from models import Model, Somefield, OtherField

class SomeModel(Model):
something = SomeField(someoption=something)

and so on.

regards
 Steve

-- 
DjangoCon US 2010 September 7-9 http://djangocon.us/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Unit test failing when testing post of a comment

2010-11-14 Thread Phil Gyford
Answering myself, in case this is useful to anyone in the future...

I eventually discovered the problem lay in the method which checked
submitted comments for spam (a method along these lines:
http://sciyoshi.com/blog/2008/aug/27/using-akismet-djangos-new-comments-framework/
). It expected the request object to have META['HTTP_REFERER'] and
META['HTTP_USER_AGENT']. When the comment was submitted from a unit
test, these weren't present and this was causing things to fall over.

I've no idea why that generated what looked like a template error, but
checking for the presence of these, and using empty strings if they're
not present, has got things working again.


On Thu, Nov 11, 2010 at 5:30 PM, Phil Gyford  wrote:
> Hi,
>
> I have a unit test that tests that a comment can be posted on an entry
> in a Django blog. Posting a comment myself in the browser works fine,
> but the test always fails with this error:
>
> "TemplateSyntaxError: Caught VariableDoesNotExist while rendering:
> Failed lookup for key [request] in u'[{}]'"
>
> Which suggests the use of the 'request' variable in a template isn't
> working. I guess it's a ContextProcessor problem, but I'm stuck as to
> why it fails in the test. Here's the test:
>
> 
> from django.test.client import Client
> from django.test import TestCase
> import datetime, time
> from weblog.models import Entry
> from django.contrib.comments.forms import CommentSecurityForm
>
> class WeblogBaseTestCase(TestCase):
>    fixtures = ['../../aggregator/fixtures/test_data.json', ]
>
> class CommentTestCase(WeblogBaseTestCase):
>
>    def post_comment(self, entry_id=1):
>        form = CommentSecurityForm( Entry.live.get(pk=entry_id) )
>        timestamp = int(time.time())
>        security_hash = form.initial_security_hash(timestamp)
>        c = Client()
>        response = c.post('/cmnt/post/', {
>                                'name': 'Bobby',
>                                'email': 'bo...@example.com',
>                                'url': '',
>                                'comment': 'Hello',
>                                'content_type': 'weblog.entry',
>                                'timestamp': timestamp,
>                                'object_pk': entry_id,
>                                'security_hash': security_hash,
>                            },follow=True)
>
>        self.failUnlessEqual(response.status_code, 200)
> 
>
> I'm stumped as to why this error is generated in the test, but not on
> the site, and I'm not sure how to poke around to see where it's going
> wrong. Any thoughts?
>
> Thanks.
>
> --
> http://www.gyford.com/
>



-- 
http://www.gyford.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't move down then up the directory tree for inserting of html files

2010-11-14 Thread Brian
Thanks for the help, Still can not get it to work.

I changed TEMPLATE_DIRS setting 30 ways.

I can't seem to move down the dir tree for inserting of html files
using  {% include "file" %} statement, Works just fine to any where up
the tree, i can go up 3,4 levels just fine, but can not go down even 1
{% include "../LOGO.html" %}


Sample dir structure:

root/lib/LOGO.html  (1 level down then 1 level up, not working )
root/LOGO.html  (1 level down, not working)
root/main/home.html <--tried: {% include "../LOGO.html" %} ,{% include
"root/lib/LOGO.html" %} , {% include "/root/lib/logo.html" %}
root/main/start.py
root/main/LOGO.html (works fine)
root/main/include/LOGO.html (works fine)

To test I put just directory text inside the html file so I know what
is displaying



Thanks.






On Nov 10, 4:51 pm, Shawn Milochik  wrote:
> On Wed, Nov 10, 2010 at 4:42 PM, Brian  wrote:
> > Dan, Thanks for the reply.
>
> > I just can not get it to work. Works just fine in same or any
> > directory under the dir that the .py file is in.
>
> > I played with TEMPLATE_DIRS setting without any luck, tested to the
> > root dir and still does not work even with "../Top.html" in the dir
> > under it.
>
> Have you tried using the full path to the template? The paths you use
> in the templates are based on the TEMPLATE_DIRS value in settings.py.
>
> So if you have:
>
> TEMPLATE_DIRS = (
>         '/home/me/abc',
>         '/home/other/def',
> )
>
> Where abc contains a folder named app01 and def contains a folder
> named 'app02,' then in a template in app01 you should be able to do
> this: {% include "app02/template.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't move down then up the directory tree for inserting of html files

2010-11-14 Thread Daniel Roseman
On Nov 14, 1:28 pm, Brian  wrote:
> Thanks for the help, Still can not get it to work.
>
> I changed TEMPLATE_DIRS setting 30 ways.
>
> I can't seem to move down the dir tree for inserting of html files
> using  {% include "file" %} statement, Works just fine to any where up
> the tree, i can go up 3,4 levels just fine, but can not go down even 1
> {% include "../LOGO.html" %}
>
> Sample dir structure:
>
> root/lib/LOGO.html  (1 level down then 1 level up, not working )
> root/LOGO.html      (1 level down, not working)
> root/main/home.html <--tried: {% include "../LOGO.html" %} ,{% include
> "root/lib/LOGO.html" %} , {% include "/root/lib/logo.html" %}
> root/main/start.py
> root/main/LOGO.html (works fine)
> root/main/include/LOGO.html (works fine)
>
> To test I put just directory text inside the html file so I know what
> is displaying

You do not seem to have taken my or Shawn's advice at all. What does
your TEMPLATE_DIRS setting look like now? As I said above, you can't
reference templates that don't fall under a directory within that
setting. Additionally, there are no relative paths when referencing
from one template to another. You always need to reference the full
path from the base template dir to the actual template path.

So, assuming your TEMPLATE_DIRS setting is:
TEMPLATE_DIRS = (
'root',
)
you render your 'home.html' as 'main/home.html'. Then you can do {%
include "lib/logo.html" %}.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



OT: getting strange attempted gets

2010-11-14 Thread John Fabiani
Hi,
I'm a newbie to not only django but web programming in general.

I have noticed that when I run my "python mange.py runserver" command I see 
strange entries that have nothing to do with my programming efforts.

GET some URL  (not mine)  returns 404
or
CONNECTION some IP address (not on my network)   returns 404 

Does the above type entries reveal someone is attacking my server?

Johnf

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Set Language in the Admin

2010-11-14 Thread Federico Capoano
Hi guys,

i'm developing an app in 3 languages, en, es and it.

My browser accepts all of them with priority to italian.

Since I've done that the admin started to show up in italian. How can
I force it back to english?

In the setting I put

LANGUAGE_CODE = 'en-gb'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Nested Categories in Admin

2010-11-14 Thread Federico Capoano
Hi all,

I would like to find a way to get categories and subcategories
displayed in the admin, in the form of a multiple select.

Like:

parent
child1
child2
parent2
child3

Do I have to make a custom field or is there already a solution
around?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OT: getting strange attempted gets

2010-11-14 Thread Shawn Milochik
It's definitely possible. I've seen that myself before. 

Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Need some information about the site washingtonpost.com developed using Django..

2010-11-14 Thread Santosh Gupta
Hi Adrian,

This is Santosh Gupta working in Accenture, India as project lead and
J2EE architect.
I got your reference from Django mailing list.
I need some information about washingtonpost.com. This information I
need to tell my management & team about the usage of Django in
washingtonpost.com and influence their decision of using Django in our
next project.

Can you please let me know (if it’s not breaching any Non Disclosure
Agreement) that:
•   Approx how many lines of code (of phython/Django) was written
initially to bring up the site?
•   Approx how many users access the site (per day or month)?
•   What is the execution Architecture? [ OS, DB, Appserver etc]
•   How many developers worked to build the site initially and how many
developers work now?
•   How many months/weeks it took initially to build the site?

Or if you can direct me to appropriate post in mailing list where this
information is available, it would be of great help.
Hoping for a positive and quick response.

Thanks & Regards,
Santosh Gupta
Office: +91 20 66253049

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Form Functionality

2010-11-14 Thread werefr0g

Hi Matt,

I think your form should use GET method, not POST method: there is no 
modification implied when submitting it.


Now, I'm perfectly fine using parameters in the url as it is meaningful: 
your accessing the search ressource and passing it a parameter. It's 
different for a ressource that should be tight to some content, like a 
post on a blog where the url is set "dynamically": the ressource exists 
or not.


Another case where I asked me the question of "clean url" was 
pagination. Here again, I'm confortable with "unclean" url (you can pass 
a number of occurences per page and the page number you want to access). 
Well you must handle "unranged" pages...


About redirection, I'm not sure, but this can trouble navigator's 
previous page (why redirect after a successful POST if it doesn't :).


In real world, I you search for a keyword and you get only one match, 
then you can be redirect to the only result details page, so you're 
redirection cannot be blamed, but this is done more for user experience 
than purity concern.


OK, I'll understand if that don't help you but maybe some experienced 
people can react ^^


Regards,

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OT: getting strange attempted gets

2010-11-14 Thread John Fabiani
On Sunday, November 14, 2010 09:19:01 am Shawn Milochik wrote:
> It's definitely possible. I've seen that myself before.
> 
> Shawn

While in this runserver mode is my database password exposed?

Johnf

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OT: getting strange attempted gets

2010-11-14 Thread Shawn Milochik
On Sun, Nov 14, 2010 at 1:23 PM, John Fabiani  wrote:
> On Sunday, November 14, 2010 09:19:01 am Shawn Milochik wrote:
>> It's definitely possible. I've seen that myself before.
>>
>> Shawn
>
> While in this runserver mode is my database password exposed?
>
> Johnf


I don't think there's any way they can get that. However, the
development server is not tested for security and not meant to be used
in any situation which requires any security. It wouldn't hurt to
change your database password.

What command were you running to execute the development server? By
default it only serves your app on port 8000, and to localhost only.
You'd have to explicitly serve it on a publicly-accessible port and
allow access to clients other than 127.0.0.1. Is your development
server publicly accessible? Most people do their development on a
machine behind a NAT router, which should be pretty safe unless you're
explicitly forwarding ports to your personal computer.

Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: OT: getting strange attempted gets

2010-11-14 Thread Federico Capoano
No one is attacking your server, that's just the django server telling
you what's going on in your app (when you perform any action the
server logs it).

On Nov 14, 4:50 pm, John Fabiani  wrote:
> Hi,
> I'm a newbie to not only django but web programming in general.
>
> I have noticed that when I run my "python mange.py runserver" command I see
> strange entries that have nothing to do with my programming efforts.
>
> GET some URL  (not mine)  returns 404
> or
> CONNECTION some IP address (not on my network)   returns 404
>
> Does the above type entries reveal someone is attacking my server?
>
> Johnf

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Are multiple databases supported by the testing framework?

2010-11-14 Thread churris
I'm using django 1.2, and I had to setup a second database on my
project. As soon as I setup the second connection and the router on my
project, all my test cases which aren't even referring to that second
database started to fail. Running the application works fine, syncdb
works fine, is just the testing (unit testing) that I'm having
problems.  It appears to me that the second database is never created,
and even if I create that manually as (test_mydbname)  it keeps
failing.

Is this supported?

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Are multiple databases supported by the testing framework?

2010-11-14 Thread Ramiro Morales
On Sun, Nov 14, 2010 at 6:41 PM, churris  wrote:
> I'm using django 1.2, and I had to setup a second database on my
> project. As soon as I setup the second connection and the router on my
> project, all my test cases which aren't even referring to that second
> database started to fail. Running the application works fine, syncdb
> works fine, is just the testing (unit testing) that I'm having
> problems.  It appears to me that the second database is never created,
> and even if I create that manually as (test_mydbname)  it keeps
> failing.
>
> Is this supported?

Did you find (and apply what is suggests) the relevant notes to the
multi-DB functionality in the testing docs?:

http://docs.djangoproject.com/en/1.2/topics/testing/#multi-database-support

-- 
Ramiro Morales

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Are multiple databases supported by the testing framework?

2010-11-14 Thread churris
Hi Ramiro,

I've tried that, but those notes are just to flush the second db, but
in this case, the issue is that the database is not even getting
created at all.

On Nov 15, 8:59 am, Ramiro Morales  wrote:
> On Sun, Nov 14, 2010 at 6:41 PM, churris  wrote:
> > I'm using django 1.2, and I had to setup a second database on my
> > project. As soon as I setup the second connection and the router on my
> > project, all my test cases which aren't even referring to that second
> > database started to fail. Running the application works fine, syncdb
> > works fine, is just the testing (unit testing) that I'm having
> > problems.  It appears to me that the second database is never created,
> > and even if I create that manually as (test_mydbname)  it keeps
> > failing.
>
> > Is this supported?
>
> Did you find (and apply what is suggests) the relevant notes to the
> multi-DB functionality in the testing docs?:
>
> http://docs.djangoproject.com/en/1.2/topics/testing/#multi-database-s...
>
> --
> Ramiro Morales

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Automatically assume "models." prefix in models.py

2010-11-14 Thread Michael Sprayberry
hello James,
 
I suppose you could use
from django.db.models import WhatEver
 
This would definitly work but I don't know if it is the way you want to go.

Sincerely,
Michael

--- On Sun, 11/14/10, James  wrote:


From: James 
Subject: Automatically assume "models." prefix in models.py
To: django-users@googlegroups.com
Date: Sunday, November 14, 2010, 2:20 AM


Forgive a django newbie...

Maybe I'm the laziest person in the world, but sometimes I get tired
of typing "models.WhatEver" for every single model I have to write. Is
there anyway a shortcut could be added that would 'assume' the
'models.' prefix when I am defining a model?

e.g. instead of:

class SomeModel(models.Model):
        something = models.SomeField(someoption=something)
        # some other things

Could a shortcut be added so that I can write:

class SomeModel(models.Model):
        something = SomeField(someoption=something)
        # some other things



I realized that not everything I will write will have the "models."
prefix, but I think _most_ of what I write in models.py will have it.

So... I'm a being too lazy, or perhaps just stupid?

Thanks,
-james

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Can't move down then up the directory tree for inserting of html files

2010-11-14 Thread Brian
Daniel, thanks for the help!, I really appreciate it.

Believe me, I simplified this to nothing:

1) I have LOGO.html in all directories with only the current directory
name in the html file (/lib = directory of LOGO.html file)
2) the home.html file has about 30 deferent include statements so I
can see from what directory its  included the LOGO file from. (  {%
include "LOGO.html" %},  {% include "/LOGO.html" %} {% include "lib/
LOGO.html" %}  {% include "/lib/LOGO.html" %} etc
3) I tried TEMPLATE_DIRS setting 30 ways:
Currently:
SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
TEMPLATE_DIRS = ( os.path.join(SITE_ROOT, ''),
The log file is showing the correct root path with this but I tried
coding this 20 ways, including; 'root', c:\root, /root, \\root, "../",
"lib", /lib", "/", "\\"

I hate waisting time on this as I could be more productive coding, but
I will try a new project with this on Monday, someone also said
something about Python 2.6 being better at relative paths.(I'm on 2.5
with 1.1 of templates)

FYI: I have no problem including .py code from all kinds of relative
paths down & up the tree.

Thanks again.









On Nov 14, 9:56 am, Daniel Roseman  wrote:
> On Nov 14, 1:28 pm, Brian  wrote:
>
>
>
>
>
>
>
>
>
> > Thanks for the help, Still can not get it to work.
>
> > I changed TEMPLATE_DIRS setting 30 ways.
>
> > I can't seem to move down the dir tree for inserting of html files
> > using  {% include "file" %} statement, Works just fine to any where up
> > the tree, i can go up 3,4 levels just fine, but can not go down even 1
> > {% include "../LOGO.html" %}
>
> > Sample dir structure:
>
> > root/lib/LOGO.html  (1 level down then 1 level up, not working )
> > root/LOGO.html      (1 level down, not working)
> > root/main/home.html <--tried: {% include "../LOGO.html" %} ,{% include
> > "root/lib/LOGO.html" %} , {% include "/root/lib/logo.html" %}
> > root/main/start.py
> > root/main/LOGO.html (works fine)
> > root/main/include/LOGO.html (works fine)
>
> > To test I put just directory text inside the html file so I know what
> > is displaying
>
> You do not seem to have taken my or Shawn's advice at all. What does
> your TEMPLATE_DIRS setting look like now? As I said above, you can't
> reference templates that don't fall under a directory within that
> setting. Additionally, there are no relative paths when referencing
> from one template to another. You always need to reference the full
> path from the base template dir to the actual template path.
>
> So, assuming your TEMPLATE_DIRS setting is:
>     TEMPLATE_DIRS = (
>         'root',
>     )
> you render your 'home.html' as 'main/home.html'. Then you can do {%
> include "lib/logo.html" %}.
> --
> DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



CMS for django

2010-11-14 Thread Tim Johnson
Greetings:

I would welcome comments on what CMS is compatible with django.
I have seen much on the web regarding this topic, but I would
suspect that from this ML I am much more likely to hear directly
from someone who is deploying a CMS with django.

thanks in advance
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CMS for django

2010-11-14 Thread Robbington
Depends what you want to do friend,

The admin interface is pretty extensible on its own, flatpages etc.

but if you are looking for some ready built options

Django CMS is worth a look
http://www.django-cms.org/



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CMS for django

2010-11-14 Thread Michael Sprayberry
I too like django-cms, although it has not been updated in a while it is still 
a good CMS. Plus the fact the CMS was built exclusively for Django. If you are 
a news media I would suggest using Ellington CMS but this is a costly adventure 
and sure only be used when there is a substantial amount material.
 
Sincerely,
Michael Sprayberry

--- On Sun, 11/14/10, Robbington  wrote:


From: Robbington 
Subject: Re: CMS for django
To: "Django users" 
Date: Sunday, November 14, 2010, 7:05 PM


Depends what you want to do friend,

The admin interface is pretty extensible on its own, flatpages etc.

but if you are looking for some ready built options

Django CMS is worth a look
http://www.django-cms.org/



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Are multiple databases supported by the testing framework?

2010-11-14 Thread Russell Keith-Magee
On Mon, Nov 15, 2010 at 6:16 AM, churris  wrote:
> Hi Ramiro,
>
> I've tried that, but those notes are just to flush the second db, but
> in this case, the issue is that the database is not even getting
> created at all.

Multi-db is supported under testing, and Django's own test suite validates this.

I can only presume that there is something unusual about your
configuration. If your configuration is set up correctly, then you
should see output like the following when you run ./manage.py test:

Creating test database 'default'...
Creating test database 'other'...
..
--
Ran 216 tests in 4.390s

OK
Destroying test database 'default'...
Destroying test database 'other'...

That is, the two database aliases (in this case, default and other)
should both be explicitly mentioned during test setup. If this isn't
the case, then Django isn't finding both test aliases as part of test
setup.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CMS for django

2010-11-14 Thread Tim Johnson
Thanks for the responses.

-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CMS for django

2010-11-14 Thread Kenneth Gonsalves
On Sun, 2010-11-14 at 14:37 -0900, Tim Johnson wrote:
> I would welcome comments on what CMS is compatible with django.
> I have seen much on the web regarding this topic, but I would
> suspect that from this ML I am much more likely to hear directly
> from someone who is deploying a CMS with django. 

I am - but it is focussed on multilingual sites - if you are not looking
at multilingual, mine is of no use.
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



get_object_or_404

2010-11-14 Thread Akn
Hi,
I would like to use get_object to retrieve an object form the
database, but if the object does not exist I do not want to display an
error page(404). Is there any command that does that.

ob=get_object(Table,x=y)
if not ob


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: get_object_or_404

2010-11-14 Thread Knut Ivar Nesheim
try:
obj = Model.objects.get(x = y)
except Model.DoesNotExist:


On Mon, Nov 15, 2010 at 6:23 AM, Akn  wrote:
> Hi,
> I would like to use get_object to retrieve an object form the
> database, but if the object does not exist I do not want to display an
> error page(404). Is there any command that does that.
>
> ob=get_object(Table,x=y)
> if not ob
>    
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CMS for django

2010-11-14 Thread Kai Diefenbach

Hi,

On 2010-11-15 00:37:29 +0100, Tim Johnson said:


I would welcome comments on what CMS is compatible with django.


You might look at LFC: http://www.lfcproject.com

Kai


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.