Re: Something like a mini Crystal Reports with Django

2007-08-05 Thread Mir Nazim

Cool cool cool

We will be waiting.

One request, I am unable to access the svn with http protocol due my
ISP not ready to configure its Firewall to allow all http methods. So
could you please set it up under https or svn+ssh

Thanks

On Aug 6, 6:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote:
> Hi guys,
> Thanks for the interest! I'll split it up from my main app and put it into
> SVN on my server. I'd really like comments on some of the design decisions
> I've made, I was thinking about it last night and I think I may have got a
> bit too clever! I'll post on here when I've got everything figured. :-)
> Ben
>
> On 05/08/07, Mir Nazim <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Ho ho,
>
> > Its generating a lot of interest.
>
> > On Aug 4, 3:18 pm, "Chris Hoeppner" <[EMAIL PROTECTED]> wrote:
> > > 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
>
> --
> 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: startproject errors with Ubuntu

2007-08-05 Thread James Bennett

On 8/5/07, john <[EMAIL PROTECTED]> wrote:
> thks - the tutorial shows the .py extension and that was giving the
> error.

The file's name is 'django-admin.py', not 'django-admin', and the
tutorial is correct; the problem was that you did not have the
executable bit set on django-admin.py, and so you did not have
permission to execute that file from the command line.

-- 
"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: startproject errors with Ubuntu

2007-08-05 Thread john

On Aug 5, 8:24 pm, ocgstyles <[EMAIL PROTECTED]> wrote:
> django-admin.py is a python script that should be ran at the command
> line:
>
> $ django-admin startproject myproject
>
> ..should work fine.
>

thks - the tutorial shows the .py extension and that was giving the
error.

So, can we get the tutorial changed to reflect this ?   Also it would
be helpful for the tutorial to have a paragraph with the steps of
changing the database settings and running the startapp

Also I still think something might be wrong with the ubuntu packaging
- I don't understand why the same django files (under /django/bin)
should be in 3 locations:  /usr/lib/python-django/,  /usr/lib/
python2.5/site-packages/, and /usr/share/python-support/python-
django/


--~--~-~--~~~---~--~~
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: [OT] pydev

2007-08-05 Thread Derek Anderson

haha.  yeah, i know, it was a rhetorical question...

i do appreciate the detailed description tho!  even if it does make me 
sound like a moron being schooled by a guy named nimrod.  :-P


Nimrod A. Abing wrote:
> On 8/6/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> i was using the ubuntu packages for eclipse and pydev...(why are they so
>> far behind?)
> 
> That's because they take whatever is the latest version of software
> available at a particular point in time during the 6 month development
> cycle. Months prior to a release, the freeze everything to whatever
> version was included in the current cycle. If one piece of software
> releases a new version past this freeze date, the old version will
> *still* be part of the release. The new version *may* be "backported"
> into the current release but not unless it's a vital piece of the
> system or if there is significant user demand for it. Don't hold your
> breath for backports though, case in point is Pidgin.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Django tutorial with SVN trunk: descriptor 'upper' requires a 'str' object but received a 'unicode'

2007-08-05 Thread Brian Duff

I'm trying to follow the django tutorial with the latest SVN trunk (I
had to upgrade from 0.96 because there appears to be an issue with
0.96 and Oracle databases). At the point in 
http://www.djangoproject.com/documentation/tutorial01/
that it instructs you to "python manage.py sql polls", I see:

Traceback (most recent call last):
  File "manage.py", line 11, in 
execute_manager(settings)
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 1725, in execute_manager
execute_from_command_line(action_mapping, argv)
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 1684, in execute_from_command_line
output = action_mapping[action](mod)
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 117, in get_sql_create
known_models = set([model for model in
_get_installed_models(_get_table_list()) if model not in app_models])
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 71, in _get_installed_models
return set([m for m in all_models if converter(m._meta.db_table)
in map(converter, table_list)])
TypeError: descriptor 'upper' requires a 'str' object but received a
'unicode'

A quick scan through management.py seems to suggest that, true enough,
converter is often str.upper. Any ideas how I can resolve this?

Thanks,
Brian


--~--~-~--~~~---~--~~
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: an application with print on dot matrix printer

2007-08-05 Thread Tim Chase

> what is the nice way to provide a print function on a dot matrix
> printer for django apps aside from generating a printer friendly page?


My understanding is that there isn't any "nice way...aside from
generating a printer friendly page".

The web browser can render to a printer context.  This might be a
regular printer, a PDF, a text-file, or a generic text-only printer.

Dot-matrix printers do support graphics, but each has its own PCL
for creating them.  I've written my share of dot-matrix printer
drivers back in the DOS days (and thermal "dot-matrix" printers
by the likes of companies like Zebra, Epson, and Brother).  Each
has its own peculiarities and none of them were as easy/simple as
just drawing on a canvas.

The printer driver(s) will sit between your browser's print
functionality and the printer.  If you have a true printer driver
designed to print graphics (like most win32 dot-matrix printer
drivers are set up to do), it's painfully slow, loud, and
low-resolution.  You can set up a generic text printer driver in
Win32 (and usually a similar "lp" setting on *nix).  With this
driver, only text gets sent to the printer (perhaps with a few
scant formatting options for bold or underline).  This is much
faster for printing, but does text only (possibly including a few
"graphical" glyph characters).

Thus, you need to make a text-only "printer-friendly page" and
then print to a "generic text only printer" driver for
best/fastest results.

A freak alternative would be if the dot-matrix printer was hooked
up to your *server* (rather than your browsing machine).
Django/Python could send text to the printer device directly, but
this removes some of the benefits of the web such as non-locality.

My $0.02 (adjusted for inflation, minus taxes and
social-security, that ain't worth much)

-tim





--~--~-~--~~~---~--~~
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: [OT] pydev

2007-08-05 Thread Nimrod A. Abing

On 8/6/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>
> i was using the ubuntu packages for eclipse and pydev...(why are they so
> far behind?)

That's because they take whatever is the latest version of software
available at a particular point in time during the 6 month development
cycle. Months prior to a release, the freeze everything to whatever
version was included in the current cycle. If one piece of software
releases a new version past this freeze date, the old version will
*still* be part of the release. The new version *may* be "backported"
into the current release but not unless it's a vital piece of the
system or if there is significant user demand for it. Don't hold your
breath for backports though, case in point is Pidgin.
-- 
_nimrod_a_abing_

http://abing.gotdns.com/
http://www.preownedcar.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: Django tutorial with Oracle Database

2007-08-05 Thread Brian Duff

Ah... I guess it was maybe a bug that got fixed. I upgraded from 0.96
to the SVN trunk, and the problem went away.

Thanks,
Brian

On Aug 5, 7:34 pm, Brian Duff <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm following the Django tutorial 
> athttp://www.djangoproject.com/documentation/tutorial01/
> with an Oracle XE 10.2 database. cx_Oracle is installed and seems to
> be working fine.
>
> At the point where the tutorial instructs me to "python manage.py
> syncdb", I see:
>
> Creating table auth_message
> Traceback (most recent call last):
>   File "manage.py", line 11, in 
> execute_manager(settings)
>   File "/usr/local/lib/python2.5/site-packages/django/core/
> management.py", line 1672, in execute_manager
> execute_from_command_line(action_mapping, argv)
>   File "/usr/local/lib/python2.5/site-packages/django/core/
> management.py", line 1571, in execute_from_command_line
> action_mapping[action](int(options.verbosity),
> options.interactive)
>   File "/usr/local/lib/python2.5/site-packages/django/core/
> management.py", line 534, in syncdb
> cursor.execute(statement)
>   File "/usr/local/lib/python2.5/site-packages/django/db/backends/
> oracle/base.py", line 72, in execute
> return Database.Cursor.execute(self, query, params)
> cx_Oracle.DatabaseError: ORA-00911: invalid character
>
> The tutorial said to post to this group if I run into problems, so
> here I am :) Am I doing something stupid, or is this a bug?
>
> Thanks,
> Brian


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Django tutorial with Oracle Database

2007-08-05 Thread Brian Duff

Hi,

I'm following the Django tutorial at 
http://www.djangoproject.com/documentation/tutorial01/
with an Oracle XE 10.2 database. cx_Oracle is installed and seems to
be working fine.

At the point where the tutorial instructs me to "python manage.py
syncdb", I see:

Creating table auth_message
Traceback (most recent call last):
  File "manage.py", line 11, in 
execute_manager(settings)
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 1672, in execute_manager
execute_from_command_line(action_mapping, argv)
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 1571, in execute_from_command_line
action_mapping[action](int(options.verbosity),
options.interactive)
  File "/usr/local/lib/python2.5/site-packages/django/core/
management.py", line 534, in syncdb
cursor.execute(statement)
  File "/usr/local/lib/python2.5/site-packages/django/db/backends/
oracle/base.py", line 72, in execute
return Database.Cursor.execute(self, query, params)
cx_Oracle.DatabaseError: ORA-00911: invalid character

The tutorial said to post to this group if I run into problems, so
here I am :) Am I doing something stupid, or is this a bug?

Thanks,
Brian


--~--~-~--~~~---~--~~
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: startproject errors with Ubuntu

2007-08-05 Thread ocgstyles

django-admin.py is a python script that should be ran at the command
line:

$ django-admin startproject myproject

..should work fine.

On Aug 5, 12:43 pm, john <[EMAIL PROTECTED]> wrote:
> On Aug 5, 6:43 am, "Jason Ribeiro" <[EMAIL PROTECTED]> wrote:
>
>
>
> > The 'python-django' package in ubuntu's universe "just works" for me
> > and 0.96 is in the feisty-backports repository.  Why not try that?
>
> > Jason
>
> > On 8/5/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> > > On 8/5/07, john <[EMAIL PROTECTED]> wrote:
> > > > I created a symlink at /usr/local/bin to the django django-admin.py
> > > > file under python2.5.  If I go to my home directory and try to create
> > > > a new project I get a syntax error pointing at the end of
> > > > startproject.  If I try " >>> /usr/lib/... django-admin.py
> > > > startproject myproject"  I get a permission denied error.  Something
> > > > seems wrong here.  Any ideas ?
>
> > > Go to the directory where django-admin.py is located, and do the 
> > > following:
>
> > > sudo chmod +x django-admin.py
>
> > > Then try it again. Or, alternatively, use
>
> > > python /path/to/django/bin/django-admin.py startproject someprojectname
>
> > > to bypass the need for the executable bit.
>
> Okay, I attached the backports repository and reinstalled both
> python2.5 and django - again running version it shows okay.  But it
> appears the Ubuntu packaging is messed up - first there is a /usr/lib/
> python-django/bin folder that links to /usr/lib/python2.5/site-
> packages/django/bin  okay but there are duplicate  files listed under
> in each /bin folder and there are no execute permissions for the /bin
> programs in the python2.5 path.  Duplicate files with differing
> permissions ?
>
> So I still get a syntax error trying to run startproject, pointing
> either at the end of startproject or the end of the project name
> (depending whether I run it at command line or under python).
>
> I have seen other messages with the similar problem on google search
> without answers - something is apparently wrong and needs to be
> fixed.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



an application with print on dot matrix printer

2007-08-05 Thread james_027

hi,

what is the nice way to provide a print function on a dot matrix
printer for django apps aside from generating a printer friendly page?

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-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: '_QuerySet' problem

2007-08-05 Thread SmileyChris

On Aug 6, 1:15 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 05-Aug-07, at 6:19 PM, Marco A. wrote:
>
> > >>> p.user
>
> p.User

Umm, this is just as wrong.

Doug's answer summed it up pretty well.


--~--~-~--~~~---~--~~
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-05 Thread Ben Ford
Hi guys,
Thanks for the interest! I'll split it up from my main app and put it into
SVN on my server. I'd really like comments on some of the design decisions
I've made, I was thinking about it last night and I think I may have got a
bit too clever! I'll post on here when I've got everything figured. :-)
Ben

On 05/08/07, Mir Nazim <[EMAIL PROTECTED]> wrote:
>
>
> Ho ho,
>
> Its generating a lot of interest.
>
> On Aug 4, 3:18 pm, "Chris Hoeppner" <[EMAIL PROTECTED]> wrote:
> > 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
>
>
> >
>


-- 
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: '_QuerySet' problem

2007-08-05 Thread Kenneth Gonsalves


On 05-Aug-07, at 6:19 PM, Marco A. wrote:

> >>> p.user

p.User
-- 

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
-~--~~~~--~~--~--~---



Re: Without Apache

2007-08-05 Thread [EMAIL PROTECTED]

I'd second the recommendation for lighttpd, and would suggest sqlite
for the backend if you want to go slim and trim. I've worked with
plenty of mssql servers and none of them ever brought to mind the word
'minimal'.

Derek Willis

On Aug 5, 3:50 pm, Parnell Springmeyer <[EMAIL PROTECTED]> wrote:
> On Sun, 2007-08-05 at 22:10 +0200, János Juhász wrote:
> > Dear Django Users!
>
> > I would like to use Django for some intranet applications, but I
> > wouldn't like to install apache, pgsql, mysql and so.
> > I would like to install the minimal ingredients for a working
> > environment.
>
> WebServer: lighttpd
>
> > I have a mssql 2000 server, so the database backend is fine.
> > I would install only python, django, and some other modules (pil,
> > reportlab, ...), but not external applications.
>
> I recommend (if you can) ditching mssql 2000, if you cannot, at the
> LEAST upgrade it. There are just too many security holes in mssql (and
> its heavy to boot) to list.


--~--~-~--~~~---~--~~
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: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-05 Thread Russell Keith-Magee

On 8/4/07, Frank Singleton <[EMAIL PROTECTED]> wrote:
>
> AttributeError: 'str' object has no attribute 'strftime'

Hi Frank,

You're the second person in recent history to report this problem -
however, I've been unable to replicate it. The last user was on
Windows, and I had mentally put it down as a configuration issue; the
fact that you're seeing it on Linux suggests that it might be a larger
problem.

The short version: The database backend (sqlite/pysqlite) should be
returning datetime objects for records containing date fields, but for
some reason, it seems to be returning strings for some users.

If you can provide a simple test case that exhibits the problem (e.g.,
minimal model, set of instructions for generating the error, complete
set of version details for OS, database, etc), I'll have another look
and see what I can see.

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-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: auth system - check if user already exists

2007-08-05 Thread Poromenos

That's what I do (well, I just check the username, since I can't think
why you'd want to check the email). I don't think there's a better
way, it's pretty straightforward...

Poromenos

On Aug 6, 12:42 am, Aljosa Mohorovic <[EMAIL PROTECTED]>
wrote:
> i'm currently looking at django.contrib.auth and wondering what is the
> correct way to check if user already exists?
> before i call User.objects.create_user() i want to know that user with
> submitted username and email doesn't exist.
> my current situation is that i call
> User.objects.get(username__exact=user) and
> User.objects.get(email__exact=email) and if i get exception
> "DoesNotExist: User matching query does not exist." and i assume that
> it's ok to create new user.
>
> i'm sure there is a better way to check if user with submitted
> username or email already exists, please share your ways...
>
> 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: Admin shows "BlaBla object" for every item in lists instead of the actual names of the objects.

2007-08-05 Thread Kai Kuehne

Hi,

On 8/6/07, TheMaTrIx <[EMAIL PROTECTED]> wrote:
>
> Thanks for the quick reply and it works perfectly.
>
> Would be good if this was added to the docs on the site, I  saw this
> was the way it was done in some old screencasts where they were still
> calling models out of django.core and after reading the official docs
> and seeing that the simplest way to call admin was class Admin: pass,
> I thought the __str__ and __unicode__ method wasn't needed anymore.

http://www.djangoproject.com/documentation/tutorial01/

Scroll to the bottom, than a bit up.


> Also, please don't confuse a printer with a movie. I've carried this
> name for over 15 years now, on BBS and the web and as you might
> imagine, the comments I've gotten since that movie came out have
> gotten rather tiresome over the years.

Sorry, must be a error in the matrix error in the matrix.

--~--~-~--~~~---~--~~
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: Admin shows "BlaBla object" for every item in lists instead of the actual names of the objects.

2007-08-05 Thread TheMaTrIx

Thanks for the quick reply and it works perfectly.

Would be good if this was added to the docs on the site, I  saw this
was the way it was done in some old screencasts where they were still
calling models out of django.core and after reading the official docs
and seeing that the simplest way to call admin was class Admin: pass,
I thought the __str__ and __unicode__ method wasn't needed anymore.

Also, please don't confuse a printer with a movie. I've carried this
name for over 15 years now, on BBS and the web and as you might
imagine, the comments I've gotten since that movie came out have
gotten rather tiresome over the years.

:p

On Aug 5, 11:53 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> Hi Neo,
>
> On 8/5/07, TheMaTrIx <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I have many tables with universal data I use across projects, alot of
> > them are tables with 1 column.
>
> > One example of this is a table named "Continents" with the names of
> > all continents and subcontinents including the less known ones (like
> > the Kerguelen continent)
>
> > When I setup the admin to display the contents of these single column
> > tables, it gives me a list of:
>
> > Continents Object
> > Continents Object
> > Continents Object
> > Continents Object
>
> > instead of
>
> > Asia
> > Europe
> > North America
> > South America
>
> > Am I doing something wrong or is this some  sort of bug?
>
> > The way I call admin for these table models is simply:
>
> > class Admin:
> > pass
>
> > I tried setting list_display to see if that helps, but it won't let me
> > do that when there is only 1 column in the table because list_display
> > needs a format of list_display = ('name1', 'name2', ...).
>
> Override your class' __str__ method, or better __unicode__:
>
> class Continent(models.Model):
> ...
> def __unicode__(self):
> return self.name # or whatever
>
> It would be also a good idea not to create a continent class, since
> they won't change in the next future. :-)
>
> HTH
> 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-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: Admin shows "BlaBla object" for every item in lists instead of the actual names of the objects.

2007-08-05 Thread Kai Kuehne

Hi Neo,

On 8/5/07, TheMaTrIx <[EMAIL PROTECTED]> wrote:
>
> I have many tables with universal data I use across projects, alot of
> them are tables with 1 column.
>
> One example of this is a table named "Continents" with the names of
> all continents and subcontinents including the less known ones (like
> the Kerguelen continent)
>
> When I setup the admin to display the contents of these single column
> tables, it gives me a list of:
>
> Continents Object
> Continents Object
> Continents Object
> Continents Object
>
> instead of
>
> Asia
> Europe
> North America
> South America
>
> Am I doing something wrong or is this some  sort of bug?
>
> The way I call admin for these table models is simply:
>
> class Admin:
> pass
>
> I tried setting list_display to see if that helps, but it won't let me
> do that when there is only 1 column in the table because list_display
> needs a format of list_display = ('name1', 'name2', ...).

Override your class' __str__ method, or better __unicode__:

class Continent(models.Model):
...
def __unicode__(self):
return self.name # or whatever

It would be also a good idea not to create a continent class, since
they won't change in the next future. :-)

HTH
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-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
-~--~~~~--~~--~--~---



Admin shows "BlaBla object" for every item in lists instead of the actual names of the objects.

2007-08-05 Thread TheMaTrIx

I have many tables with universal data I use across projects, alot of
them are tables with 1 column.

One example of this is a table named "Continents" with the names of
all continents and subcontinents including the less known ones (like
the Kerguelen continent)

When I setup the admin to display the contents of these single column
tables, it gives me a list of:

Continents Object
Continents Object
Continents Object
Continents Object

instead of

Asia
Europe
North America
South America

Am I doing something wrong or is this some  sort of bug?

The way I call admin for these table models is simply:

class Admin:
pass

I tried setting list_display to see if that helps, but it won't let me
do that when there is only 1 column in the table because list_display
needs a format of list_display = ('name1', 'name2', ...).


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



date_hierarchy simple customization

2007-08-05 Thread Picio

Hello,
Im running django .97 svn rev 5804, and I'd like to customize the
date_hierarchy drill down to show only some records in thte admin
change_list page "from a date" instead of searching the "exact date".
Example:
I need to see what i have done after 2006 march 22... So I drill this way
2006 -> mean all I have done in 2006 and 2007
2006 March -> all I have done after 2006 March
and so on

Instead of obtaining just what I have done exactly and only the day
2006 march 22.

Is it possible?
-- 
http://picio.gotdns.com ...Il mio blog su NSLU2

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



auth system - check if user already exists

2007-08-05 Thread Aljosa Mohorovic

i'm currently looking at django.contrib.auth and wondering what is the
correct way to check if user already exists?
before i call User.objects.create_user() i want to know that user with
submitted username and email doesn't exist.
my current situation is that i call
User.objects.get(username__exact=user) and
User.objects.get(email__exact=email) and if i get exception
"DoesNotExist: User matching query does not exist." and i assume that
it's ok to create new user.

i'm sure there is a better way to check if user with submitted
username or email already exists, please share your ways...

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: Repair Your (Microsoft) Operating System

2007-08-05 Thread Carl Holm

John Travolta wrote:
> Tweak your Windows and speed it up
> 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
-~--~~~~--~~--~--~---



Repair Your (Microsoft) Operating System

2007-08-05 Thread John Travolta
Tweak your Windows and speed it up
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
-~--~~~~--~~--~--~---



proba

2007-08-05 Thread fritz

test


--~--~-~--~~~---~--~~
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: Without Apache

2007-08-05 Thread Parnell Springmeyer

On Sun, 2007-08-05 at 22:10 +0200, János Juhász wrote:
> Dear Django Users!
>  
> I would like to use Django for some intranet applications, but I
> wouldn't like to install apache, pgsql, mysql and so.
> I would like to install the minimal ingredients for a working
> environment.

WebServer: lighttpd

> I have a mssql 2000 server, so the database backend is fine.
> I would install only python, django, and some other modules (pil,
> reportlab, ...), but not external applications.

I recommend (if you can) ditching mssql 2000, if you cannot, at the
LEAST upgrade it. There are just too many security holes in mssql (and
its heavy to boot) to list.



--~--~-~--~~~---~--~~
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-05 Thread Nicola Larosa

Aljosa Mohorovic wrote:
> i just replaced "hr" with "de" and error messages are in german. where
> can i find if there is any support for my language

Looking in django/conf/locale, the Croatian translation is indeed still
missing.


> and how can i submit small things like translation of error messages? 
> http://www.djangoproject.com/documentation/i18n/ has no nice and simple
> example on how to start translating things on django core level.

The starting point is this wiki page:

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

It shows how to create and maintain a Django translation. Some more detail
is present in this message on the Django I18N mailing list:

http://groups.google.com/group/Django-I18N/msg/712b4f9ea35ef701


-- 
Nicola Larosa - http://www.tekNico.net/

Restricting Python's grammar to an LL(1) parser is a blessing, not a
curse. It puts us in handcuffs that prevent us from going overboard
and ending up with funky grammar rules like some other dynamic languages
that will go unnamed, like Perl. -- George Brandsl, April 2006



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Using order_by with a field from a different table

2007-08-05 Thread Greg

I'm running through some djagno API examples and I'm having a problem
with how to order by a field in a different table.  Here is what my
models:

class Blog(models.Model):
name = models.CharField(maxlength=100)
tagline = models.TextField()

def __unicode__(self):
return self.name

class Admin:
pass

class Author(models.Model):
name = models.CharField(maxlength=50)
email = models.EmailField()

def __unicode__(self):
return self.name

class Admin:
pass

class Entry(models.Model):
blog = models.ForeignKey(Blog)
headline = models.CharField(maxlength=255)
body_text = models.TextField()
pub_date = models.DateTimeField()
authors = models.ManyToManyField(Author)

def __unicode__(self):
return self.headline

class Admin:
pass

/

The documentation says that this will work:
Entry.objects.order_by('blogs_blog.name', 'headline')

However, when I run the above command I get the following error:

OperationalError: no such column: blogs_blog.name



I don't understand blogs_blog.name?  Thanks for your help


--~--~-~--~~~---~--~~
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-05 Thread Aljosa Mohorovic

i just replaced "hr" with "de" and error messages are in german.
where can i find if there is any support for my language and how can i
submit small things like translation of error messages?

http://www.djangoproject.com/documentation/i18n/ has no nice and
simple example on how to start translating things on django core
level.

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
-~--~~~~--~~--~--~---



Without Apache

2007-08-05 Thread János Juhász
Dear Django Users!

I would like to use Django for some intranet applications, but I wouldn't
like to install apache, pgsql, mysql and so.
I would like to install the minimal ingredients for a working environment.
I have a mssql 2000 server, so the database backend is fine.
I would install only python, django, and some other modules (pil, reportlab,
...), but not external applications.

The django development server isn't recommended as it can serve only on
blocking mode.
May I do it with a python module ?

--~--~-~--~~~---~--~~
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-05 Thread Aljosa Mohorovic

On Aug 5, 2:35 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> 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-trans...

my problem with this is that i don't know how many error messages are
there.
EmailField can have errors for unset value or invalid email address
and other fields something else.

i was thinking that maybe there is some solution related with
LANGUAGE_CODE in settings.py?
if i set language to something else then en-us error messages should
be translated.
i think it's bad that everybody who uses non en-us language code
should translate common messages.

can somebody comment on this and explain what part i didn't understand
or explain with more details how this should be done?

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: django app for managing sending email to users...

2007-08-05 Thread James Tauber


I've set up django-mailer at Google Code:

http://code.google.com/p/django-mailer/

and written down a bunch of notes on the home page about use cases  
and functional requirements.

If no one objects, we can continue discussion on this list, although  
I'm happy to start up django-mailer list at Google Groups if people  
prefer.

James
--
James Tauber  http://jtauber.com/
journeyman of some   http://jtauber.com/blog/


--~--~-~--~~~---~--~~
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: Textile causing UnicodeDecodeError

2007-08-05 Thread Martin Gilday

Thanks that fixes it.

On Aug 5, 6:12 pm, Lucky B <[EMAIL PROTECTED]> wrote:
> from 
> here:http://64.233.169.104/search?q=cache:bswtnEOJ33QJ:douglasjarquin.com/...
>
> try textile.textile(str(self.source))
>
> On Aug 5, 12:34 pm, Martin Gilday <[EMAIL PROTECTED]> wrote:
>
> > I have added textile.py to my project dir and can successfully import
> > it in the shell.  I have extended one of my models with a save method
> > which copies the content from one field, textiles it, then saves it
> > another column.
>
> > def save(self):
> > import textile
> > self.body = textile.textile(self.source)
> > super(Post, self).save() #call the "real" save method
>
> > When I try and add one of the posts using the admin app I get the
> > following error.
>
> > Exception Type:  UnicodeDecodeError
> > Exception Value: 'ascii' codec can't decode byte 0xb4 in position 0:
> > ordinal not in range(128)
>
> > I am using the django trunk.  Any ideas what I am doing wrong?
>
> > Thanks,
> > Martin.


--~--~-~--~~~---~--~~
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: Textile causing UnicodeDecodeError

2007-08-05 Thread Lucky B

from here:
http://64.233.169.104/search?q=cache:bswtnEOJ33QJ:douglasjarquin.com/blog/2007/07/13/unicode-django-and-textile/+textile+unicode=en=clnk=3=us=firefox-a

try textile.textile(str(self.source))

On Aug 5, 12:34 pm, Martin Gilday <[EMAIL PROTECTED]> wrote:
> I have added textile.py to my project dir and can successfully import
> it in the shell.  I have extended one of my models with a save method
> which copies the content from one field, textiles it, then saves it
> another column.
>
> def save(self):
> import textile
> self.body = textile.textile(self.source)
> super(Post, self).save() #call the "real" save method
>
> When I try and add one of the posts using the admin app I get the
> following error.
>
> Exception Type:  UnicodeDecodeError
> Exception Value: 'ascii' codec can't decode byte 0xb4 in position 0:
> ordinal not in range(128)
>
> I am using the django trunk.  Any ideas what I am doing wrong?
>
> Thanks,
> Martin.


--~--~-~--~~~---~--~~
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: [OT] pydev

2007-08-05 Thread Derek Anderson

i was using the ubuntu packages for eclipse and pydev...(why are they so 
far behind?)  i've upgraded to the latest now, and haven't had a crash 
sense.  thanks all.  :)


Nimrod A. Abing wrote:
> Hello,
> 
> What OS and JRE/JDK are you using? I'm on Linux with Eclipse Europa
> running on JDK1.6.0_02. I have never experienced any hangs. I run
> 32-bit Linux on my laptop and 64-bit Linux on the desktop. On both
> systems there comes an exception from time to time complaining about
> null references and such and the editor tab does not respond but
> usually I just close the editor tab and reopen it and it goes away.
> 
> FWIW, I also have desktop bling using Compiz-Fusion enabled on the
> laptop. In spite of many reports of problems with Compiz and Java apps
> I have never had any problems with Eclipse that could be connected to
> Compiz.
> 
> One more thing, did you try updating your Eclipse install? My install
> is fully updated, though I never experienced a total lock-up while
> using Eclipse.
> 
> On 8/1/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> hey all,
>>
>> i'm having a heck of a time using pydev (the eclipse python plugin).  it
>> keeps randomly locking up eclipse (unresponsive UI + 100% CPU), usually
>> when i switch tabs.  anyone else experiencing this?
>>
>> thanks,
>> derek
>>
> 
> 


--~--~-~--~~~---~--~~
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: startproject errors with Ubuntu

2007-08-05 Thread john

On Aug 5, 6:43 am, "Jason Ribeiro" <[EMAIL PROTECTED]> wrote:
> The 'python-django' package in ubuntu's universe "just works" for me
> and 0.96 is in the feisty-backports repository.  Why not try that?
>
> Jason
>
> On 8/5/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 8/5/07, john <[EMAIL PROTECTED]> wrote:
> > > I created a symlink at /usr/local/bin to the django django-admin.py
> > > file under python2.5.  If I go to my home directory and try to create
> > > a new project I get a syntax error pointing at the end of
> > > startproject.  If I try " >>> /usr/lib/... django-admin.py
> > > startproject myproject"  I get a permission denied error.  Something
> > > seems wrong here.  Any ideas ?
>
> > Go to the directory where django-admin.py is located, and do the following:
>
> > sudo chmod +x django-admin.py
>
> > Then try it again. Or, alternatively, use
>
> > python /path/to/django/bin/django-admin.py startproject someprojectname
>
> > to bypass the need for the executable bit.
>


Okay, I attached the backports repository and reinstalled both
python2.5 and django - again running version it shows okay.  But it
appears the Ubuntu packaging is messed up - first there is a /usr/lib/
python-django/bin folder that links to /usr/lib/python2.5/site-
packages/django/bin  okay but there are duplicate  files listed under
in each /bin folder and there are no execute permissions for the /bin
programs in the python2.5 path.  Duplicate files with differing
permissions ?

So I still get a syntax error trying to run startproject, pointing
either at the end of startproject or the end of the project name
(depending whether I run it at command line or under python).

I have seen other messages with the similar problem on google search
without answers - something is apparently wrong and needs to be
fixed.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Textile causing UnicodeDecodeError

2007-08-05 Thread Martin Gilday

I have added textile.py to my project dir and can successfully import
it in the shell.  I have extended one of my models with a save method
which copies the content from one field, textiles it, then saves it
another column.

def save(self):
import textile
self.body = textile.textile(self.source)
super(Post, self).save() #call the "real" save method

When I try and add one of the posts using the admin app I get the
following error.

Exception Type:  UnicodeDecodeError
Exception Value: 'ascii' codec can't decode byte 0xb4 in position 0:
ordinal not in range(128)

I am using the django trunk.  Any ideas what I am doing wrong?

Thanks,
Martin.


--~--~-~--~~~---~--~~
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: Can a ManyToManyField only shows certain records in an admin using edit_inline?

2007-08-05 Thread Greg

We'll I created a new function called r_col.  That returns a value to
my sandp field from within the Style Class.  However, I'm not sure how
to pass it the current value of the collection field from within the
Style Class.  Below are my model files:

class Choice(models.Model):
choice = models.ForeignKey(Collection, edit_inline=models.TABULAR,
num_in_admin=5)
size = models.ForeignKey(Size, core=True)
price = models.ForeignKey(Price, core=True)

def __str__(self,):
return str((self.size, self.price))

def r_col(ob):
assert False, ob # This just returns a ForeignKey object.  Not the
value of collection which is what I need
return 2

class Style(models.Model):
name = models.CharField(maxlength=200, core=True)
color = models.CharField(maxlength=100)
color_cat = models.ForeignKey(ColorCategory)
image = models.ImageField(upload_to='site_media/')
theslug = models.SlugField(prepopulate_from=('name',))
manufacturer = models.ForeignKey(Manufacturer)
collection = models.ForeignKey(Collection,
edit_inline=models.TABULAR, num_in_admin=6)
sandp = models.ManyToManyField(Choice, limit_choices_to =
{'choice__id': r_col(collection)})

def __str__(self,):
return self.name

class Collection(models.Model):
name = models.CharField(maxlength=200)
collectionslug = models.SlugField(prepopulate_from=["name"])
description = models.TextField(maxlength=1000)
manufacturer = models.ForeignKey(Manufacturer)

def __str__(self,):
return self.name

class Admin:
list_display = ('name', 'manufacturer')
list_filter = ('manufacturer',)

/

Thanks for any help.


On Aug 2, 4:57 am, yml <[EMAIL PROTECTED]> wrote:
> Greg,
> I am waiting for the answer to this question because I have something
> similar in my to do list.
>
> On Aug 2, 1:52 am, Greg <[EMAIL PROTECTED]> wrote:
>
> > Anybody?
>
> > On Aug 1, 2:49 pm, Greg <[EMAIL PROTECTED]> wrote:
>
> > > Ok..does anybody know what's wrong with this attempt at trying to get
> > > the 'limit-choices_to' to work?
>
> > > class Choice(models.Model):
> > > choice = models.ForeignKey(Collection, edit_inline=models.TABULAR,
> > > num_in_admin=5)
> > > size = models.ForeignKey(Size, core=True)
> > > price = models.ForeignKey(Price, core=True)
>
> > > class Style(models.Model):
> > > name = models.CharField(maxlength=200, core=True)
> > > color = models.CharField(maxlength=100)
> > > image = models.ImageField(upload_to='site_media/')
> > > theslug = models.SlugField(prepopulate_from=('name',))
> > > manufacturer = models.ForeignKey(Manufacturer)
> > > sandp = models.ManyToManyField(Choice,limit_choices_to=
> > > {'choice': get_choices(self)})
> > > collection = models.ForeignKey(Collection,
> > > edit_inline=models.TABULAR, num_in_admin=6)
>
> > > def get_choices(self, style_name):
> > > g = Choice.objects.filter(pk=style_name.collection)
> > > return g
>
> > > Thanks
>
> > > On Aug 1, 11:09 am, Greg <[EMAIL PROTECTED]> wrote:
>
> > > > We'll I kinda got it to work.  I added the following
> > > > (limit_choice_to):
> > > > sandp = models.ManyToManyField(Choice,limit_choices_to= {'choice':
> > > > 2})
>
> > > > ///
>
> > > > That works fine.  However, I obviously want to take out the '2'.  I
> > > > tried the following but it does not seem to work:
> > > > sandp = models.ManyToManyField(Choice,limit_choices_to= {'choice':
> > > > collection.id})
>
> > > > 
>
> > > > I guess I need to know how do I get the id for the current collection
> > > > that I'm adding the style to?
>
> > > > Thanks
>
> > > > On Aug 1, 2:17 am, Will McCutchen <[EMAIL PROTECTED]> wrote:
>
> > > > > > Is there anyway that I can have the 'sandp' Field only
> > > > > > show choices that are tied to that collection?
>
> > > > > Try using thelimit_choices_toargument to 
> > > > > ManyToManyField:http://www.djangoproject.com/documentation/model-api/#many-to-many-re...
>
> > > > > Hope this helps,
>
> >
> > > Will.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Discussion on django-developer-position-in-tampa

2007-08-05 Thread koom2020

PAKHostOnline.com offered Pakistan No.1 Web Hosting, DOMAIN
Registration / Transfer, 99% UP-Time, 24/7 Technical Support at
http://www.pakhostonline.com/

PAK Host Online(PHO) - Web Hosting, Free Domain Registration /
Transfer, Website Builder & Web Marketing  in Pakistan, Karachi,
Lahore, Islamabad & Rawalpindi at http://www.pakhostonline.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
-~--~~~~--~~--~--~---



PAK Host Online(PHO) - Web Hosting, Free Domain Registration /Transfer, Website Builder & Web Marketing in Pakistan, Karachi, Lahore, Islamabad & Rawalpindi at http://www.pakhostonline.com/

2007-08-05 Thread koom2020

PAKHostOnline.com offered Pakistan No.1 Web Hosting, DOMAIN
Registration / Transfer, 99% UP-Time, 24/7 Technical Support at
http://www.pakhostonline.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
-~--~~~~--~~--~--~---



PAK Host Online(PHO) - Web Hosting, Free Domain Registration /Transfer, Website Builder & Web Marketing in Pakistan, Karachi, Lahore, Islamabad & Rawalpindi at http://www.pakhostonline.com/

2007-08-05 Thread koom2020

PAKHostOnline.com offered Pakistan No.1 Web Hosting, DOMAIN
Registration / Transfer, 99% UP-Time, 24/7 Technical Support at
http://www.pakhostonline.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: Access request while cleaning fields

2007-08-05 Thread Todd O'Bryan

I'm going to answer my own question in case anyone searches in the
future. And, eventually, I'll start thinking in Python and figure out
these things before sending a message to the list. I'm afraid too much
Java has warped me forever.

I just added the request object as an attribute on the form before
calling the is_valid method. In other words:

if request.method == 'POST':
form = ChangePasswordForm(request.POST)
form.request = request
if form.is_valid():

Now all of the clean methods can access the request object as
self.request inside the form class.

Todd

On Sun, 2007-08-05 at 10:08 -0400, Todd O'Bryan wrote:
> I'm trying to translate a Change Password page I wrote using oldforms
> into newforms and have hit a snag. I need to validate that the user
> types in his/her current password correctly and it seems like writing a
> clean_current_password() method in the form class is the easiest way to
> do that, since errors and such will appear where they should, without me
> having to worry much about them.
> 
> Unfortunately, I can't figure out how to access the request object when
> I'm cleaning the form data. Is there a way to get to it, or do I have to
> do this kind of validation in the view and handle all the errors
> manually?



--~--~-~--~~~---~--~~
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: value for choices arguments for newforms.MultipleSelectField

2007-08-05 Thread Peter Melvyn

On 2 Srp, 17:35, Nathan Ostgard <[EMAIL PROTECTED]> wrote:

> You can use ModelMultipleChoiceField for this:
>
> items =
> newforms.ModelMultipleChoiceField(queryset=Items.objects.all())

Hi Nathan,

I use it this way, but I need to reduce the queryset for current user
whom ID is contained in HTTP request. I'm a beginner, hence I
implemented it by nesting form's declaration into view function:

def my_view(request):

class MyForm(forms.Form)
 emails = forms.ModelMultipleChoiceField(queryset=
  MyDBModel.objects.filter(user=request.user.id)


But I'd like to have form declaration out of this view na pass user's
ID as an argument - is there any way how to supply queryset in
runtime? I tried to assign queryset later to form's instance having no
success.

Thanks, Peter


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Maps / Variables in template system.

2007-08-05 Thread [EMAIL PROTECTED]

Hi
I'm working on a project, where I have several items in a database
with x and y coordinates. I want to plot these out in such a way that
if there is not an item for a space, it shows a blank image in the
table, and a corresponding picture if there does exist an item.

However, in the template system, due to a lack of the ability to
change variables, I'm not sure how I can do this. If theres a snippet
somewhere that I couldn't find for just an increment tag, I'd be fine.

Thanks for the help.


--~--~-~--~~~---~--~~
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: '_QuerySet' problem

2007-08-05 Thread Doug B

A queryset is kind of like a list, you can slice it, access by index,
or iterate through it.  I'm not quite sure what you are trying to do,
but to access the individual user objects you have to fetch them from
the queryset somehow:

users = User.objects.all()

by index:
print users[0].user
print users[1].user

by loop:
for user in users:
print user.user




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Access request while cleaning fields

2007-08-05 Thread Todd O'Bryan

I'm trying to translate a Change Password page I wrote using oldforms
into newforms and have hit a snag. I need to validate that the user
types in his/her current password correctly and it seems like writing a
clean_current_password() method in the form class is the easiest way to
do that, since errors and such will appear where they should, without me
having to worry much about them.

Unfortunately, I can't figure out how to access the request object when
I'm cleaning the form data. Is there a way to get to it, or do I have to
do this kind of validation in the view and handle all the errors
manually?

Thanks,
Todd


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Slug field prepopulated from more than one field?

2007-08-05 Thread Jarek Zgoda

Is it possible to get slug field prepopulated from more than one
field? The docs say that yes, but I seem to not be able to get any
prepopulation if I have prepopulated_from=('field1', 'field2') in my
model. Should I file a ticket?

I use SVN trunk (rev 5804).

Cheers
Jarek Zgoda


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



'_QuerySet' problem

2007-08-05 Thread Marco A.
Hi to all !
I doesnt undestand where is the problem whit Query set.. (or maybe what is
query_set)

If the models is :


class User(models.Model):
user = models.CharField(maxlength=12)
passw = models.CharField(maxlength=20)












I doest undestand this shell session :

>>> User.objects.all()
[, ]
>>> p.user
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: '_QuerySet' object has no attribute 'user'

(doesnt worry about two pippo user name.. for now.. I will fix now)

Where is the error ?

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-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: startproject errors with Ubuntu

2007-08-05 Thread Jason Ribeiro

The 'python-django' package in ubuntu's universe "just works" for me
and 0.96 is in the feisty-backports repository.  Why not try that?

Jason

On 8/5/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 8/5/07, john <[EMAIL PROTECTED]> wrote:
> > I created a symlink at /usr/local/bin to the django django-admin.py
> > file under python2.5.  If I go to my home directory and try to create
> > a new project I get a syntax error pointing at the end of
> > startproject.  If I try " >>> /usr/lib/... django-admin.py
> > startproject myproject"  I get a permission denied error.  Something
> > seems wrong here.  Any ideas ?
>
> Go to the directory where django-admin.py is located, and do the following:
>
> sudo chmod +x django-admin.py
>
> Then try it again. Or, alternatively, use
>
> python /path/to/django/bin/django-admin.py startproject someprojectname
>
> to bypass the need for the executable bit.
>
> --
> "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
-~--~~~~--~~--~--~---



Tune up your Windows XP

2007-08-05 Thread John Travolta
Optimize your operating system, minimize background activities,  repair
registry base, uninstall unnecessary components, get rid of boring errors
and make your operating system safer.

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: startproject errors with Ubuntu

2007-08-05 Thread James Bennett

On 8/5/07, john <[EMAIL PROTECTED]> wrote:
> I created a symlink at /usr/local/bin to the django django-admin.py
> file under python2.5.  If I go to my home directory and try to create
> a new project I get a syntax error pointing at the end of
> startproject.  If I try " >>> /usr/lib/... django-admin.py
> startproject myproject"  I get a permission denied error.  Something
> seems wrong here.  Any ideas ?

Go to the directory where django-admin.py is located, and do the following:

sudo chmod +x django-admin.py

Then try it again. Or, alternatively, use

python /path/to/django/bin/django-admin.py startproject someprojectname

to bypass the need for the executable bit.

-- 
"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
-~--~~~~--~~--~--~---



startproject errors with Ubuntu

2007-08-05 Thread john

On Ubuntu Feisty (7.04) I upgraded python2.5 via synaptic.  I download
the django 0.96 tarball, extracted into usr/local then installed with
"sudo python setup.py install"  The django files seem to be correctly
installed under python2.5/site-packages  and I can do "python" =>
python 2.5  ">>> import django  >>>django.VERSION " and I get the
correct django version (0.96).

I created a symlink at /usr/local/bin to the django django-admin.py
file under python2.5.  If I go to my home directory and try to create
a new project I get a syntax error pointing at the end of
startproject.  If I try " >>> /usr/lib/... django-admin.py
startproject myproject"  I get a permission denied error.  Something
seems wrong here.  Any ideas ?


--~--~-~--~~~---~--~~
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-05 Thread Mir Nazim

Ho ho,

Its generating a lot of interest.

On Aug 4, 3:18 pm, "Chris Hoeppner" <[EMAIL PROTECTED]> wrote:
> 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
-~--~~~~--~~--~--~---