Sitemap Index problems

2007-08-04 Thread Mackenzie Kearl

Hi I am trying to get a sitemap index generated however I only get
"Exception Type:ValueError
Exception Value:Empty module name"

I am not sure what I am doing wrong.

urls.py
sitemaps = {
'blog':BlogSitemap,
'gallery':GallerySitemap,
}


urlpatterns = patterns('',
(r'^sitemap.xml$', 'django.contrib.sitemaps.views.index',
{'sitemaps': sitemaps}),
(r'^sitemap-(?P.+).xml$',
'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
)


sitemap.py
from django.contrib.sitemaps import Sitemap
from paddlecrazy.blog.models import Post

class BlogSitemap(Sitemap):

def items(self):
return Post.objects.all()

def lastmod(self, obj):
return obj.modified


I can get the sitemap-.xml files just fine however the index
does not work

Thanks Mackenzie


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



login issue

2007-08-04 Thread [EMAIL PROTECTED]

Hi,

I just read chapter 12 in djangobook.com on authentication:
http://www.djangobook.com/en/beta/chapter12/

I am creating a new user in response to a registration form I've made,
doing something like this:
from django.contrib import auth
from django.contrib.auth.models import User
def createAccount(request):
  # extract information for PUT form request
  # ...
  newUser = User.objects.create_user(username_, email, pwd)
  newUser.save()
  auth.login(request, newUser)
  return HttpResponseRedirect('/userHome/')

But there is an exception with the login. Apparently the user doesn't
have a backend, as shown below.

Thoughts?

Thanks,
Ivan
www.kirigin.com

AttributeError at /createAccount/
'User' object has no attribute 'backend'
Request Method: POST
Request URL:http://127.0.0.1:8201/createAccount/
Exception Type: AttributeError
Exception Value:'User' object has no attribute 'backend'
Exception Location: /usr/lib/python2.5/site-packages/django/contrib/
auth/__init__.py in login, line 53

/usr/lib/python2.5/site-packages/django/contrib/auth/__init__.py in
login

  46. Persist a user id and a backend in the request. This way a user
doesn't
  47. have to reauthenticate on every request.
  48. """
  49. if user is None:
  50. user = request.user
  51. # TODO: It would be nice to support different login methods,
like signed cookies.
  52. request.session[SESSION_KEY] = user.id

# THIS LINE
  53. request.session[BACKEND_SESSION_KEY] = user.backend ...

  54.
  55. def logout(request):
  56. """
  57. Remove the authenticated user's ID from the request.
  58. """
  59. try:


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: newforms errors translation

2007-08-04 Thread James Bennett

On 8/4/07, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote:
> i'm trying to find a way to translate newforms errors but i can't find
> it in docs.
> does anybody know if this is documented somewhere?

Newforms error messages should be Unicode strings, so use the
'ugettext' or 'ugettext_lazy' functions in django.utils.translation to
mark them for translation:

http://www.djangoproject.com/documentation/i18n/#how-to-specify-translation-strings

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



newforms errors translation

2007-08-04 Thread Aljosa Mohorovic

i'm trying to find a way to translate newforms errors but i can't find
it in docs.
does anybody know if this is documented somewhere?

it's simple to display form errors just by displaying messages on
english but i don't know a good way to do it on some other language.
any tips on how to translate errors and display translations in html
form?

Aljosa


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: extending django.contrib.auth

2007-08-04 Thread James Bennett

On 8/4/07, eXt <[EMAIL PROTECTED]> wrote:
>   You shold read very good summary on extending user model here:
> http://www.amitu.com/blog/2007/july/django-extending-user-model/

This method will probably have serious problems on multi-site
installations, and -- unlike AUTH_PROFILE_MODULE -- has no official
support from Django itself, relying as it does on undocumented
internal APIs. Use with extreme caution.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Traversing Deep Model Objects in template...

2007-08-04 Thread Amirouche

On Aug 1, 11:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> >From the documentation:
>
> "A ValuesQuerySet is useful when you know you're only going to need
> values from a small number of the available fields and you won't need
> the functionality of a model instance object. It's more efficient to
> select only the fields you need to use."

Of course, but efficient means sometimes not easy code for the dev,
that's why I prefer not to use this

>
> But, I still need an answer to my original question...

does this work ?

{% for book in books %}
{{ book.title }}
// I prefer use names instead of ids in urls because it's more human
friendly
// and search engine friendly you may have to sanitize the thing with
some filter
// whatever you should use permalink:
// http://www.djangoproject.com/documentation/model-api/#the-permalink-d...

{% for author in book.authors.all %}
// author is an Model not a Field
{{ author.first_name }}
{{ author.last_name }}
etc...
{% endfor %}


{% endfor %}



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: related_name

2007-08-04 Thread Amirouche



On Aug 1, 10:07 pm, "Lic. José M. Rodriguez Bacallao"
<[EMAIL PROTECTED]> wrote:
> how can I change the "related_name" value in a ForeignKey field dynamically
> at model creation time?
>

What do you really mean I don't understand, give an example


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Windows Tips and Tricks

2007-08-04 Thread John Travolta
Speed up your system, repair registry base,  uninstall hidden windows
components and get rid of boring errors with powerful tips and tricks.

http://windowsxpsp2pro.blogspot.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?hl=en
-~--~~~~--~~--~--~---



I quit my job and now I'm making roughly 150 dollars a day! haha

2007-08-04 Thread David

About a month ago I quit my job at Hollister. I didn't quit it because
I didn't like it there I quit because I was making about 150-200
dollars a day filling out opinion surveys for Nike. I mean seriously
that's close to four times what I was making at Hollister. There are
still job openings if anyone is interested at www.newagejobs.net. It
was one of the best decisions of my life. Later guys


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Only save if changed?

2007-08-04 Thread Forest Bond
On Sat, Aug 04, 2007 at 12:09:07PM +0200, Michael Elsdoerfer wrote:
> 
> > def save(self):
> > if self.id is not None:
> > old_self = self.__class__.get(id = self.id)
> > if self.id is None or (old_self.city != self.city) or (
> >   old_self.state != self.state):
> > self.geocode = self.get_geocode()
> > super(SiteUser, self).save()
> 
> You can also monitor attribute changes via __setattr__, which will save you
> an additional query. That worked fine for me so far, although I am not 100%
> if there might not be some edge cases that could cause problems.

I can't think of any problems with that sort of approach, excluding the usual
problem of the database changing underneath you.  Didn't think of it, but it's a
good idea.

-Forest
-- 
Forest Bond
http://www.alittletooquiet.net


signature.asc
Description: Digital signature


Free Windows XP tips and tricks

2007-08-04 Thread John Travolta
Windows XP tips and tricks. Learn how to bypass very common windows
problems, to speed up your system and make it more reliable with useful tips
and tricks.

http://windowsxpsp2pro.blogspot.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?hl=en
-~--~~~~--~~--~--~---



Re: extending django.contrib.auth

2007-08-04 Thread eXt

Hi!

  You shold read very good summary on extending user model here:
http://www.amitu.com/blog/2007/july/django-extending-user-model/

Regards

--
Jakub Wisniowski



On 4 Sie, 12:54, ocgstyles <[EMAIL PROTECTED]> wrote:
> Perfect.  I google'd AUTH_PROFILE_MODULE and found a nice writeup:
>
> http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model
>
> Looks like that will suit my needs.
>
> Thanks
>
> On Aug 3, 7:56 am, daev <[EMAIL PROTECTED]> wrote:
>
> > You can create Profile model that can have all additional fields. Then
> > connect it in settings.py to User model with AUTH_PROFILE_MODULE =
> > "profiles.Profile". And you can get per user profile like this:
> > user = User.objects.get( username = "foobar" )
> > profile = user.get_profile()


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: extending django.contrib.auth

2007-08-04 Thread ocgstyles

Perfect.  I google'd AUTH_PROFILE_MODULE and found a nice writeup:

http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model

Looks like that will suit my needs.

Thanks

On Aug 3, 7:56 am, daev <[EMAIL PROTECTED]> wrote:
> You can create Profile model that can have all additional fields. Then
> connect it in settings.py to User model with AUTH_PROFILE_MODULE =
> "profiles.Profile". And you can get per user profile like this:
> user = User.objects.get( username = "foobar" )
> profile = user.get_profile()


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: mod_python/django problems

2007-08-04 Thread Graham Dumpleton

On Aug 4, 8:05 pm, David Reynolds <[EMAIL PROTECTED]> wrote:
> On 4 Aug 2007, at 6:00 am, Kenneth Gonsalves wrote:
>
> > could you mention what exactly the problems you are facing - as i
> > mentioned, on one site i have faced the problem of the initial screen
> > in admin loading with the fields of the admin screen of the previous
> > site accessed in another browser tab. As mentioned I felt that this
> > is a browser cache problem as the two sites are practically identical
> > and username and password are the same for the two sites. But the
> > problem goes away after any action is performed.
>
> I've seen sites appearing in place of another site, mostly. In most
> cases it's
> only gone away after a restart of apache.

In your Apache configuration, do you have multiple VirtualHost
definitions for sites under the same parent domain and have a
ServerAlias directive in any which contains a wildcard which would
match a different VirtualHost containers ServerName directive? For
example:

  
  ServerName www.site.com
  ...
  

  
  ServerName site.com
  ServerAlias *.site.com
  ...
  

Do the mixing up of pages always relate to the virtual hosts which
contain the ServerAlias and the alternate virtual host the ServerAlias
matches, or are they totally unrelated sites with totally different
domain names?

Graham


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Something like a mini Crystal Reports with Django

2007-08-04 Thread Chris Hoeppner

Need another tester? Count me in.

2007/8/4, Mir Nazim <[EMAIL PROTECTED]>:
>
> Me too me too.
>
> Ben, Let us know if you need help with testing or some thing else.
> I will more interested in Models and View than template.
>
>
>
> On Aug 3, 11:51 am, "Matt Davies" <[EMAIL PROTECTED]> wrote:
> > Ben, I'd be interested in looking at that application.
> >
> > Need someone to help with testing?
> >
> > On 03/08/07, Ben Ford <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I'm working on a django app at the moment that allows you to define and
> > > save reports. It has a method similar to templatetags for loading user
> > > defined functions to add to the reports too. As it stands you can build 
> > > and
> > > save these reports with a web front end, and download the results in CSV. 
> > > I
> > > just need to write a front end for creating filters and it'll be good to 
> > > go.
> > > I'll be happy to release it for the benefit of others when it's done.
> > > Ben
> >
> > > On 03/08/07, Mir Nazim <[EMAIL PROTECTED]> wrote:
> >
> > > > I understand that views need to be created. I am doing that these
> > > > days.
> >
> > > > What specifically I wanted to know is whether anyone else has worked
> > > > on a similar stuff. So he might want to share his experience.
> >
> > > > BRIT is Java. I would prefer something more python based solution.
> > > > even better is there is a django based one. If there is none, its
> > > > obvious I will have to create one.
> >
> > > > On Aug 2, 8:20 pm, Lucky B < [EMAIL PROTECTED]> wrote:
> > > > > You could try Eclipse BIRT for a WYSIWYG interface. But otherwise you
> > > > > can create a view however you want to report your data doing whatever
> > > > > manipulation you wanted. I don't see what else you would need other
> > > > > than to create a view.
> >
> > > > > On Aug 2, 5:17 am, Mir Nazim <[EMAIL PROTECTED]> wrote:
> >
> > > > > > Anybody has any views on this.
> >
> > > > > > --
> > > > > > PS: posting just to keep this topic fresh
> >
> > > > > > On Jul 31, 4:28 pm, Mir Nazim <[EMAIL PROTECTED]> wrote:
> >
> > > > > > > Hello
> >
> > > > > > > I was wondering has anybody done application that was something
> > > > like a
> > > > > > > mini crystal reports. Generating a report based of model items
> > > > > > > selected in a WYSIWYG(ok this is not important) fashion.  And
> > > > > > > generating a HTML tables based report with defined calculations
> > > > etc.
> >
> > > > > > > I understand that Django Admin has some kind of similar
> > > > facilities. I
> > > > > > > am looking into them. In the mean time thought that may be some
> > > > one
> > > > > > > else might be doing similar stuff somewhere.
> >
> > > --
> > > Regards,
> > > Ben Ford
> > > [EMAIL PROTECTED]
> > > +628111880346
>
>
> >
>


-- 
Best Regards,
Chris Hoeppner - www.pixware.org // My weblog

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Job Fair F/OSS project

2007-08-04 Thread Chris Hoeppner

Trac seems a good idea. Self hosted is always better.

Well, if the project goes active, just drop me a line.

I'm pretty busy atm, but I can find time to help with this project.

Thanks for the reply, emperor.

2007/8/3, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Well, all that stuff is still up in the air. This is the very-very
> beginning of the project.
>
> I think the first thing I'd like to do is to setup a site, like google
> code or sourceforge. If anyone has a suggestion about which one is
> better, that'd be great. I know they all use SVN (I use Git), so
> that's not a factor. It's also possible for me to just setup a Trac
> site (I'm most likely gonna setup one anyhow) like I've been using
> with my previous internal projects and forego sourceforge and google
> code.
>
> On Aug 3, 5:12 am, "Chris Hoeppner" <[EMAIL PROTECTED]> wrote:
> > What kind of volunteers do are you looking for? What kind of tasks are
> > you looking to resolve?
> >
> > If I could have some more details (maybe have a look at the proposed
> > timeline) I'd be in :)
> >
> > 2007/8/3, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> >
> >
> >
> >
> >
> > > I'm looking for some volunteers for a new open source project. At the
> > > Institute of Design (http://www.id.iit.edu), our next project is a
> > > system for the management of our job fair (http://www.id.iit.edu/
> > > recruitID/ )
> >
> > > The systems goal is to allow students and employers to enter their
> > > availability for interviews and have the system designate times and
> > > rooms for each to meet for interviews. The system includes much more
> > > than just this of course, but that is the main goal. We decided that
> > > this application is generic enough that it should be made into an F/
> > > OSS project.
> >
> > > So far the system will be built on Django and uses (hopefully)
> > > Prototype.js
> >
> > > I've only really been using Django for a month now so anyone with real
> > > experience would be appreciated.
> >
> > > The project is on the ground floor and some basic wire frames and a
> > > few other preliminary designs.
> >
> > > I'm personally located in Chicago and West Virginia (about half of my
> > > time spent in each place), though you are welcome to help out from
> > > anywhere around the world!
> >
> > > If you're interested, reply to this message, or contact me at cezar AT
> > > id.iit.edu
> >
> > --
> > Best Regards,
> > Chris Hoeppner -www.pixware.org// My weblog
>
>
> >
>


-- 
Best Regards,
Chris Hoeppner - www.pixware.org // My weblog

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



RE: Only save if changed?

2007-08-04 Thread Michael Elsdoerfer

> def save(self):
> if self.id is not None:
> old_self = self.__class__.get(id = self.id)
> if self.id is None or (old_self.city != self.city) or (
>   old_self.state != self.state):
> self.geocode = self.get_geocode()
> super(SiteUser, self).save()

You can also monitor attribute changes via __setattr__, which will save you
an additional query. That worked fine for me so far, although I am not 100%
if there might not be some edge cases that could cause problems.

Michael


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: mod_python/django problems

2007-08-04 Thread David Reynolds


On 4 Aug 2007, at 6:00 am, Kenneth Gonsalves wrote:


could you mention what exactly the problems you are facing - as i
mentioned, on one site i have faced the problem of the initial screen
in admin loading with the fields of the admin screen of the previous
site accessed in another browser tab. As mentioned I felt that this
is a browser cache problem as the two sites are practically identical
and username and password are the same for the two sites. But the
problem goes away after any action is performed.


I've seen sites appearing in place of another site, mostly. In most  
cases it's

only gone away after a restart of apache.


--
David Reynolds
[EMAIL PROTECTED]




smime.p7s
Description: S/MIME cryptographic signature


Re: django app for managing sending email to users...

2007-08-04 Thread David Reynolds


On 3 Aug 2007, at 3:55 pm, James Tauber wrote:


A number of sites I'm working on will optionally notify users of
certain events via email. Think of the email you get from a social
networking site when someone wants to add you as a friend. Or forum
software that emails subscribers to a thread when there's been a new
post. I also have the occasional need to send administrative email to
all users on a site or announcements to those that have opted-in to
receive them (although my own preference in that case is for there to
be an Atom feed).

I was thinking of developing a django app for this with support for
queuing and throttling of sends, scheduled sends, and logging of mail
failures. I'm NOT interested at all in using it for unsolicited email
(although unfortunately there's nothing in the design I have in mind
that would prevent its use for that, I don't think)


I think I would find this useful a *lot* for work, so I would be very  
happy to help, if necessary.


Thanks,

Dave
--
David Reynolds
[EMAIL PROTECTED]




smime.p7s
Description: S/MIME cryptographic signature


Re: Something like a mini Crystal Reports with Django

2007-08-04 Thread Mir Nazim

Me too me too.

Ben, Let us know if you need help with testing or some thing else.
I will more interested in Models and View than template.



On Aug 3, 11:51 am, "Matt Davies" <[EMAIL PROTECTED]> wrote:
> Ben, I'd be interested in looking at that application.
>
> Need someone to help with testing?
>
> On 03/08/07, Ben Ford <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm working on a django app at the moment that allows you to define and
> > save reports. It has a method similar to templatetags for loading user
> > defined functions to add to the reports too. As it stands you can build and
> > save these reports with a web front end, and download the results in CSV. I
> > just need to write a front end for creating filters and it'll be good to go.
> > I'll be happy to release it for the benefit of others when it's done.
> > Ben
>
> > On 03/08/07, Mir Nazim <[EMAIL PROTECTED]> wrote:
>
> > > I understand that views need to be created. I am doing that these
> > > days.
>
> > > What specifically I wanted to know is whether anyone else has worked
> > > on a similar stuff. So he might want to share his experience.
>
> > > BRIT is Java. I would prefer something more python based solution.
> > > even better is there is a django based one. If there is none, its
> > > obvious I will have to create one.
>
> > > On Aug 2, 8:20 pm, Lucky B < [EMAIL PROTECTED]> wrote:
> > > > You could try Eclipse BIRT for a WYSIWYG interface. But otherwise you
> > > > can create a view however you want to report your data doing whatever
> > > > manipulation you wanted. I don't see what else you would need other
> > > > than to create a view.
>
> > > > On Aug 2, 5:17 am, Mir Nazim <[EMAIL PROTECTED]> wrote:
>
> > > > > Anybody has any views on this.
>
> > > > > --
> > > > > PS: posting just to keep this topic fresh
>
> > > > > On Jul 31, 4:28 pm, Mir Nazim <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hello
>
> > > > > > I was wondering has anybody done application that was something
> > > like a
> > > > > > mini crystal reports. Generating a report based of model items
> > > > > > selected in a WYSIWYG(ok this is not important) fashion.  And
> > > > > > generating a HTML tables based report with defined calculations
> > > etc.
>
> > > > > > I understand that Django Admin has some kind of similar
> > > facilities. I
> > > > > > am looking into them. In the mean time thought that may be some
> > > one
> > > > > > else might be doing similar stuff somewhere.
>
> > --
> > Regards,
> > Ben Ford
> > [EMAIL PROTECTED]
> > +628111880346


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_proxy

2007-08-04 Thread Michael

Hi Przemek,

Is that running by runserver:8000?
Is your django dev server serving static files?
What log file is show?

On 8/3/07, Matt Davies <[EMAIL PROTECTED]> wrote:
> Hi Przemek
>
> I do, but I hand the request from apache to Lighttpd, which in it's conf
> file handles the serving of docs.
>
> I'm not sure but I think you need something extra in apche to tell it where
> the static content is.
>
>
>
> On 03/08/07, Przemek Gawronski <[EMAIL PROTECTED]> wrote:
> >
> > Hi, I'm having some problems running Django behind an Apache with a
> > mod_proxy.
> >
> > So my router transmits all it's communication on port 80 to 192.168.0.2,
> > on which I've setup mod_proxy (with django server on 192.168.1.2, the
> > networks see each other)
> >
> > 
> > ProxyRequests On
> > ProxyPass /django/ http://192.168.1.2:8000/
> > ProxyPassReverse /django/ http://192.168.1.2:8000/
> > 
> >
> > I do hit the login screen to my django app, but then all the files
> > (static, js,...) and sub pages aren't served properly :(
> >
> > Here is a part of my urlpatterns:
> >
> > urlpatterns = patterns('',
> >(r'^/js/(?P.*)$', 'django.views.static.serve',{'document_root':
> '/home/django/work/fw/media/'}),
> >(r'^/css/(?P.*)$', 'django.views.static.serve',{'document_root':
> '/home/django/work/fw/media/'}),
> >(r'^/accounts/login/$', 'django.contrib.auth.views.login ',
> {'template_name': '/login.html'}),
> >(r'^/accounts/profile/$',
> 'django.views.generic.simple.redirect_to', {'url':
> '/zlecenia/strona1'}),
> >(r'^/$', ' django.contrib.auth.views.login', {'template_name':
> '/login.html'}),
> >(r'^/wyloguj/$',
> 'django.contrib.auth.views.logout_then_login' ),
> >(r'^/zlecenia/strona(?P[0-9]+)/$',
> limited_workorder_list, workorder_info_dict ),
> > ...
> >
> > Any one uses django behind apache with mod_proxy?
> >
> > Przemek
> > --
> > AIKIDO TANREN DOJO  -   Poland - Warsaw - Mokotow - Ursynow - Natolin
> > info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
>  >
>


-- 
--
Michael

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-04 Thread Frank Singleton

Hi,

fedora 7
django 0.96
DATABASE_ENGINE = 'sqlite3'

maybe its late but DateField is causing me some grief when trying to 
load some test data from
the command line (ie: not via admin web).

in model

test_date = models.DateField()


in another python script (run on command line ) that imports the model 
and attempts to populate an sqlite
database with lots of entries (test data from ascii file , including 
date fields in the format -mm-dd)

eg: equivalent to

obj.test_date='2007-12-04'

obj.save()

it complains about

 raceback (most recent call last):
  File "populate_database.py", line 136, in 
tr.save()
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 
223, in save
db_values = [f.get_db_prep_save(f.pre_save(self, True)) for f in 
self._meta.fields if not isinstance(f, AutoField)]
  File 
"/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py", 
line 494, in get_db_prep_save
value = value.strftime('%Y-%m-%d')
AttributeError: 'str' object has no attribute 'strftime'


SO, thought I would have to do a

time.strptime('2007-02-23', '%Y-%m-%d') thing in between but did not get 
it working.


Suggestions welcome :-)

/F

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: age in years calculation

2007-08-04 Thread Kenneth Gonsalves


On 03-Aug-07, at 10:02 PM, Nis Jørgensen wrote:

>> how about surrounding the statement with a try and work the leap year
>> to regular year case with the exception?
> That seems like overkill. There isn't really any leap-year handling
> necessary:
>
> import datetime.date as date

this should be:
from datetime import date - the import statement above gives an error

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---