Re: Read-only connection to database. How to?

2008-02-05 Thread koenb

You could take a look at the multidb branch (specifically check out
ticket #4747). It is a bit behind on trunk, but the basics should
work. It allows you to define multiple connections, so you should be
able to connect to the same db using different users.

Koen

On 5 feb, 23:47, Julien <[EMAIL PROTECTED]> wrote:
> Thanks guys for the suggestions.
> However, what I'd like to have is that the site runs as per usual with
> a root user (with all priviledges), and that only one particular apps
> runs with a read-only user. Do I have to create a new connection
> object within my app code to override Django's, is it possible to
> ovveride the parameter via a setting file?
>
> In PHP, since you create a connection object yourself, you can select
> which user (and also, which database, host, etc.) to execute a
> particular request. It would be great to make it easy in Django to
> allow that sort of flexibility, at least for custom made hard-coded
> SQL queries.
>
> On Feb 4, 8:15 pm, David Reynolds <[EMAIL PROTECTED]> wrote:
>
> > On 4 Feb 2008, at 1:59 am, Julien wrote:
>
> > > I totally understand what you suggest, having a RO user at the
> > > database (in this case MySQL) level.
> > > But I am fairly new to Django and Python, and I am unsure how to
> > > implement that dual-setting option.
>
> > In the devlopment server you can do
>
> > ./manage.py runserver --settings=yoursite.readonlysettings # for the
> > display side of the site
>
> > and
>
> > ./manage.py runserver # for the admin side of the site
>
> > When you deploy the site you can set up which settings file is used too.
>
> > --
> > David Reynolds
> > [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



User login form

2008-02-05 Thread eraoul

I'd like a simple, clean way to log users in to my django app. I've
read the book and all the docs I can find, but I still don't
understand what the right way to do this is.

Sure, I can create a form like the simple one in the django book, but
the example doesn't handle bad usernames and passwords, because it
doesn't use the results of the forms system/validators/etc.

It would seem that I could make my own form class, somehow using this
class in django.contrib.auth.forms:

class AuthenticationForm(oldforms.Manipulator):
"""
Base class for authenticating users. Extend this to get a form
that accepts
username/password logins.


Any suggestions on how to "extend this"?


A related problem may be the following: I currently have several
different pages on my site that include this "login" form. I want to
make sure I can reuse the login HTML from any location; i.e. I just
include some template code that sticks the login form in the right
spot.  My form starts like this:

...

And from there I'd like the template to automatically put in error
messages for unknown users, etc. Is there an easy way to do this?

thanks in advance! I've spent far too long just trying to get user
logins working...
--~--~-~--~~~---~--~~
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 version for production?

2008-02-05 Thread Christian W. Koch

i'm no django expert, yet, but i use trunk. now, for production
purposes i still use trunk because before i "svn up" on production i
make sure that the site runs on my development box on the latest
trunk.

you do have a development environment, right? ;)

On Feb 5, 6:57 am, Aljosa Mohorovic <[EMAIL PROTECTED]>
wrote:
> please post your opinions on using 0.96 or trunk version in production
> environment.
> which would you choose and why?
--~--~-~--~~~---~--~~
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: Markup Filters (restructuredtext)

2008-02-05 Thread Christian W. Koch

Craig,

I went your way, and works just great! thanks a lot. I guess I was
making things more complicated than they should.

THANKS! =)

On Feb 4, 10:52 pm, "Craig Ogg" <[EMAIL PROTECTED]> wrote:
> On Feb 4, 2008 4:41 PM, Christian W. Koch <[EMAIL PROTECTED]> wrote:
>
> > I've been looking for this like crazy, I started using the markup
> > filters with great succes (love at first sight) but there's a little
> > problem. I use special carachters, like  and things like that
> > to support different languages. So, if I store it just like that in
> > the DB then the filter just spits it out literally instead of the
> > actual carachter "ã"
>
> This may not be the answer you are looking for, but generally I find
> it is better to just store the actual characters in the database.
> Allowing data to go from the db into HTML without escaping is
> generally considered a security hole.  If you are unable to do this
> (for database encoding reasons, for example), you could translate the
> character entities back to characters before sending them on your
> template.
>
> If you want to take that route, there is an example of doing this at
> the top of html2text.py[1].
>
> Craig
>
> [1]http://www.aaronsw.com/2002/html2text/
--~--~-~--~~~---~--~~
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: OneToOne Relationships

2008-02-05 Thread Malcolm Tredinnick


On Tue, 2008-02-05 at 17:51 -0800, Vance Dubberly wrote:
> The Documentation has said for as long as I can remember (a year+)
> that the semantics of a the OneToOne relationship is going to change
> soon.  Any clue as to when this is going to change 

Soon.

> and/or what it's
> going to look like?

It will look behave like ForeignKey(unique=True), except that a reverse
lookup will return the object on the reverse of the relation, not a list
containing one object (reverse lookups on ForeignKeys always return a
list, since it's one-to-many and we shouldn't change the return type
just because of the unique flag there).

Also, the restriction that OneToOneFields are implicitly primary keys
will be removed, since there are cases where multiple one-to-one
relations in a model are required.

Malcolm

-- 
I don't have a solution, but I admire your problem. 
http://www.pointy-stick.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: Extending Django's admin application

2008-02-05 Thread Brandon Taylor

Excellent, I already have that library installed from working through
the book samples.

Rails has several plugin websites, like www.agilewebdevelopment.com.
Is there something similar for Django? My Google searches haven't come
up with a lot in that regard.

Thank you,
Brandon

On Feb 5, 7:58 pm, "Vance Dubberly" <[EMAIL PROTECTED]> wrote:
> Using the FileField or ImageField will get your files uploaded.  Image
> field is also nice enough to check that it's an image.
>
> http://www.djangoproject.com/documentation/model-api/#filefieldhttp://www.djangoproject.com/documentation/model-api/#imagefield
>
> Image Field also requires PIL which is what you'll use in-place of RMagick
>
> http://www.pythonware.com/products/pil/
>
> peace.
>
> Vance
>
> On Feb 5, 2008 5:47 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello everyone,
>
> > I'm a complete n00b with Django, but would like to take advantage of
> > the built-in admin module for small freelance websites. Out-of-the-
> > box, it's pretty freakin' awesome. But, of course, I'd like to extend
> > it.
>
> > In Rails, there are plugins, plugins and more plugins. One of those is
> > attachment_fu, which when coupled with ImageMagik, can auto-thumbnail,
> > crop, scale, etc.
>
> > Does Django have similar capabilities in the hundreds of Python
> > modules that are out there, and if so, can someone please point me in
> > the right direction on getting some code samples?
>
> > I have the Definitive Guide to Django book from Apress, and am
> > experienced developer...just not with Python :) I'm very anxious to
> > learn and get started really building something with this great
> > framework.
>
> > Many TIA for your advice,
> > Brandon Taylor
>
> >www.btaylordesign.com
>
> --
> To pretend, I actually do the thing: I have therefore only pretended to 
> pretend.
>   - Jacques Derrida
--~--~-~--~~~---~--~~
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's admin application

2008-02-05 Thread Vance Dubberly

Using the FileField or ImageField will get your files uploaded.  Image
field is also nice enough to check that it's an image.

http://www.djangoproject.com/documentation/model-api/#filefield
http://www.djangoproject.com/documentation/model-api/#imagefield

Image Field also requires PIL which is what you'll use in-place of RMagick

http://www.pythonware.com/products/pil/


peace.

Vance


On Feb 5, 2008 5:47 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> Hello everyone,
>
> I'm a complete n00b with Django, but would like to take advantage of
> the built-in admin module for small freelance websites. Out-of-the-
> box, it's pretty freakin' awesome. But, of course, I'd like to extend
> it.
>
> In Rails, there are plugins, plugins and more plugins. One of those is
> attachment_fu, which when coupled with ImageMagik, can auto-thumbnail,
> crop, scale, etc.
>
> Does Django have similar capabilities in the hundreds of Python
> modules that are out there, and if so, can someone please point me in
> the right direction on getting some code samples?
>
> I have the Definitive Guide to Django book from Apress, and am
> experienced developer...just not with Python :) I'm very anxious to
> learn and get started really building something with this great
> framework.
>
> Many TIA for your advice,
> Brandon Taylor
>
> www.btaylordesign.com
> >
>



-- 
To pretend, I actually do the thing: I have therefore only pretended to pretend.
  - Jacques Derrida

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



OneToOne Relationships

2008-02-05 Thread Vance Dubberly

The Documentation has said for as long as I can remember (a year+)
that the semantics of a the OneToOne relationship is going to change
soon.  Any clue as to when this is going to change and/or what it's
going to look like?

-- 
To pretend, I actually do the thing: I have therefore only pretended to pretend.
  - Jacques Derrida

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



Extending Django's admin application

2008-02-05 Thread Brandon Taylor

Hello everyone,

I'm a complete n00b with Django, but would like to take advantage of
the built-in admin module for small freelance websites. Out-of-the-
box, it's pretty freakin' awesome. But, of course, I'd like to extend
it.

In Rails, there are plugins, plugins and more plugins. One of those is
attachment_fu, which when coupled with ImageMagik, can auto-thumbnail,
crop, scale, etc.

Does Django have similar capabilities in the hundreds of Python
modules that are out there, and if so, can someone please point me in
the right direction on getting some code samples?

I have the Definitive Guide to Django book from Apress, and am
experienced developer...just not with Python :) I'm very anxious to
learn and get started really building something with this great
framework.

Many TIA for your advice,
Brandon Taylor

www.btaylordesign.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: problem with own tags in templates

2008-02-05 Thread lis2

You have right.
That was in my main folder so i forgett about it.
Thank you very much

On 5 Lut, 23:24, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> > I read that many people have problem with tags in template, but nobody
> > can help.
>
> I am not sure where you read that :)
>
> >  Example error:
> > "'test' is not a valid tag library: Could not load template library
> > from django.templatetags.test, No module named test"
>
> What's the name of the Django application under which you have this
> templatetags directory and have you made sure that this Django app is
> in your settings.INSTALLED_APPS?
>
> -Rajesh D
--~--~-~--~~~---~--~~
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 version for production?

2008-02-05 Thread Kenneth Gonsalves


On 05-Feb-08, at 7:15 PM, Jarek Zgoda wrote:

> some day it would not be feasible to port any application to "1.0". I
> know personally many people still having their apps running on 0.91
> because of too large amount of work needed to port to any later  
> version.

I have 5 old sites running on .91 - too much work to do the MR, let  
alone the rest.

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.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
-~--~~~~--~~--~--~---



Template tag parameter

2008-02-05 Thread [EMAIL PROTECTED]

Hello,

I've made a tag with I want to call with a function name and parameter
like this:

 {% tag "delete_wiki_entry" "Delete" "Are you sure you want to delete
this wikiboard entry?" "delete_wikientry({{entry.name}})" %

{{entry.name}} doesn't get replaced by the correct value, how can I do
this? Is it possible?

Best regards,

Luis
--~--~-~--~~~---~--~~
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: Tool recommendations

2008-02-05 Thread Roman Zechner

There are a lot of webframeworks out there from a lot of languages.
It's a question in what area you want to use it.

Coming from the Java side, I appreciate the simplicity of Django and I
am currently using it for a few websites. It has some cool features, a
great documentation and is really straight forward.

But if you want to develop so called RIAs (Rich Internet Application),
an application which aims to give it's users the feeling of a desktop
application (and thus will use AJAX in most cases), I think it would
be a lot easier doing it with GWT (Google Web Toolkit) or Wicket,
because you will spend most of the time caring for your templates (the
"view" in MVC) - a tedious task. Despite there are also a lot of very
good JavaScript frameworks, I would try to avoid programming
JavaScript. If you really want to, check out the Dojo framework. It is
very powerful.


I would take a look at Wicket, GWT, Grails (the Django equivalent on
the Java side, ships with a GWT plugin) and Django of course :-)

But combining GWT and Django? Hm ...

Cheers, Roman

http://en.wikipedia.org/wiki/List_of_web_application_frameworks
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
--~--~-~--~~~---~--~~
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: Read-only connection to database. How to?

2008-02-05 Thread Julien

Thanks guys for the suggestions.
However, what I'd like to have is that the site runs as per usual with
a root user (with all priviledges), and that only one particular apps
runs with a read-only user. Do I have to create a new connection
object within my app code to override Django's, is it possible to
ovveride the parameter via a setting file?

In PHP, since you create a connection object yourself, you can select
which user (and also, which database, host, etc.) to execute a
particular request. It would be great to make it easy in Django to
allow that sort of flexibility, at least for custom made hard-coded
SQL queries.

On Feb 4, 8:15 pm, David Reynolds <[EMAIL PROTECTED]> wrote:
> On 4 Feb 2008, at 1:59 am, Julien wrote:
>
> > I totally understand what you suggest, having a RO user at the
> > database (in this case MySQL) level.
> > But I am fairly new to Django and Python, and I am unsure how to
> > implement that dual-setting option.
>
> In the devlopment server you can do
>
> ./manage.py runserver --settings=yoursite.readonlysettings # for the
> display side of the site
>
> and
>
> ./manage.py runserver # for the admin side of the site
>
> When you deploy the site you can set up which settings file is used too.
>
> --
> David Reynolds
> [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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: problem with own tags in templates

2008-02-05 Thread Rajesh Dhawan

> I read that many people have problem with tags in template, but nobody
> can help.

I am not sure where you read that :)

>  Example error:
> "'test' is not a valid tag library: Could not load template library
> from django.templatetags.test, No module named test"


What's the name of the Django application under which you have this
templatetags directory and have you made sure that this Django app is
in your settings.INSTALLED_APPS?

-Rajesh D
--~--~-~--~~~---~--~~
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: Questions related to testing Django application using Sqlite

2008-02-05 Thread Jacob Kaplan-Moss

On 2/5/08, Manoj Govindan <[EMAIL PROTECTED]> wrote:
> Recently I tried using Sqlite instead of Postgres as the database
> engine for testing one of my django applications.
> My observations follow:
>
> 1) Tests ran significantly faster[1].

Under Sqlite tests run in an in-memory database, so this is perfectly
normal. Like you, I see about a 10x speedup running tests against
Sqlite.

> 4) I don't have any explanation for why some tests failed only in
> Windows.

That's... bad :( Can you please open a ticket
(http://code.djangoproject.com/simpleticket) with your trimmed-down
app and test case? That's the best way to ensure it gets looked at and
fixed.

> Also, is there a way to examine the data in an Sqlite test
> database[2] while running tests?

Set TEST_DATABASE_NAME to the path to the sqlite database you'd like
to create, then hit the breakpoint like you're doing with Postgres.
Setting TEST_DATABASE_NAME will force the test harness to create a
real database instead of running the tests in-memory.

You also might want to look at the "testserver" management comment:
http://www.djangoproject.com/documentation/django-admin/#testserver-fixture-fixture

Jacob

--~--~-~--~~~---~--~~
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: Improperly configured exception

2008-02-05 Thread Jacob Kaplan-Moss

On 2/5/08, Schmoopie <[EMAIL PROTECTED]> wrote:
> Improperly configured
> Error while importing URLconf 'mysite.urls'
>
> but there is no explanation here as to what is wrong with the
> configuration. What could be causing this?

It probably means that your ROOT_URLCONF, `mysite.urls`, is missing or
has a syntax error. Try importing it from the shell:

$ ./manage.py shell
>>> import mysite.urls

And see what happens. That should show you the error.

Jacob

--~--~-~--~~~---~--~~
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: templatetags and import path

2008-02-05 Thread Brian Luft

If I'm correct in my diagnosis, what's happening is that the
django.templatetags package is altering the import path:

#from django.templatetags.__init__.py
for a in settings.INSTALLED_APPS:
try:
__path__.extend(__import__(a + '.templatetags', {}, {},
['']).__path__)
except ImportError:
pass

We have:

/coltrane
   /templatetags
  coltrane.py
   models.py
   ...
/myapp
  /templatetags
  my_tags.py

Now when my_tags does an "from coltrane.models import Link", I believe
this is occurring within the scope of django.templatetags and hence
our import path looks like:

(Pdb) import sys
(Pdb) sys.modules['django.templatetags'].__path__
['C:\\Python25\\lib\\site-packages\\django-svn\\django\\templatetags',
'C:\\Pyth
on25\\lib\\site-packages\\django-svn\\django\\contrib\\admin\
\templatetags', 'c:
\\documents and settings\\brian\\workspace\\tagging\\templatetags', 'c:
\\documen
ts and settings\\brian\\workspace\\lunnova\\apps\\utils\
\templatetags', 'c:\\doc
uments and settings\\brian\\workspace\\coltrane\\templatetags']

The result is that "from coltrane" is winding up in the coltrane
\templatetags directory, seeing the coltrane module and leading to the
undesired behavior of executing there.  I have not seen any
documentation that states that naming templatetag files the same as an
app but it clearly has undesired behavior if a templatetag file tries
to import modules from another app that happens to have a templatetag
file named the same as the app.  I will report this as a bug.  The
workaround is to rename templatetag files so that they don't clash
with the project name, however it seems like django should perhaps
check for this case and warn the developer or else the documentation
should have a clear warning.


On Feb 4, 6:13 pm, Julien <[EMAIL PROTECTED]> wrote:
> Hi Brian,
>
> I'm facing a similar issue, which is being discussed 
> here:http://groups.google.com/group/django-users/browse_thread/thread/0ce2...
>
> I am as surprised as you are by this behaviour...
>
> On Feb 5, 11:52 am, Brian Luft <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I'm setting up James Bennett's Coltrane app (yes I'm aware that it is
> > released as is, with no guarantees).  I wrote a templatetag that
> > intends to pull all the Links instances and make them available to the
> > render context.  However, in the tag file, something funny seems to
> > happen with the import path.  I have:
>
> > from coltrane.models import Link
>
> > I get:
> > TemplateSyntaxError at /blog/
> > 'coltrane_utils' is not a valid tag library: Could not load template
> > library from django.templatetags.coltrane_utils, No module named
> > models.  I've seen reports that templatetag errors sometimes bubble up
> > as something different than what the actual problem is so I dug a
> > little deeper.
>
> > When I did a set_trace, code execution goes from my tag file to:
> > /path/to/coltrane/templatetags/coltrane.py.
>
> > Execution dies when it gets to:
> > from coltrane import Entry, Link inside that templatetag file.
>
> > The question is why is my import statement directing execution to the
> > templatetag file in the coltrane app?  The expected behavior is that
> > execution would go to coltrane/models.py - as verified by testing my
> > import statement from the shell. It seems that the templatetag import
> > machinery is altering the import path.  I tried doing a test using a
> > model from an app of my own and did not encounter the same problem.
> > Furthermore, if I rename the templatetag file in coltrane (/coltrane/
> > templatetags/coltrane.py) to something else eg. coltrane_tags.py then
> > my templatetag works fine.   Is it bad practice to name a templatetag
> > file the same as the app?  Have I discovered a bug?  Suggestions,
> > workarounds tremendously appreciated.
>
> > -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
-~--~~~~--~~--~--~---



problem with own tags in templates

2008-02-05 Thread lis2

Hello.
I read that many people have problem with tags in template, but nobody
can help. Example error:
"'test' is not a valid tag library: Could not load template library
from django.templatetags.test, No module named test"

test.py in templatetags:
from django import template

register = template.Library()
@register.filter
def wordscountgt(text, number):
 if len(text.split()) > number:
 return True

My __init__ file is empty.

I tried on widows and linux(0.96, svn) and always i have the same
problem.
How can i solve this problem ?
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
-~--~~~~--~~--~--~---



Improperly configured exception

2008-02-05 Thread Schmoopie

Trying to get manage.py runsever going, I get an exception raised of
the following type

Improperly configured
Error while importing URLconf 'mysite.urls'



but there is no explanation here as to what is wrong with the
configuration. What could be causing this?


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



Insert relational record

2008-02-05 Thread Aaron Fay

Hi List,

First off, Django is wonderful :)

Okay, I'm overriding a save method on a model, and need to jack into 
another model to add an entry into the db.  Now if it was as simple as 
User, I could just create a new user, right?  But the problem is I need 
to create an entry in a table that is a relational table for the User 
model (Table: auth_user_groups).  Can I do that without custom sql?

Thanks :)
Aaron


--~--~-~--~~~---~--~~
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: Unicode error

2008-02-05 Thread Kristian Øllegaard
Hi again

Ok - my bad.

Thanks a lot

Regards
Kristian

On Feb 5, 2008 9:29 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]>
wrote:

>
> On 2/5/08, Kristian Øllegaard <[EMAIL PROTECTED]> wrote:
> > Is there an obvious thing i did wrong? Have you heard about this error
> > before?
>
> This is because of the changes in Unicode handling after 0.96; read
> more here:
> http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist
>
> In general, if you've upgraded from 0.96 you *need* to read the
> backwards-incompatible changes list:
> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges. When
> we release new versions, that list becomes the release notes, but if
> you're running off a trunk checkout you need to be aware of the
> changes.
>
> Jacob
>
> >
>

--~--~-~--~~~---~--~~
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: Unicode error

2008-02-05 Thread Jacob Kaplan-Moss

On 2/5/08, Kristian Øllegaard <[EMAIL PROTECTED]> wrote:
> Is there an obvious thing i did wrong? Have you heard about this error
> before?

This is because of the changes in Unicode handling after 0.96; read
more here: 
http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist

In general, if you've upgraded from 0.96 you *need* to read the
backwards-incompatible changes list:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges. When
we release new versions, that list becomes the release notes, but if
you're running off a trunk checkout you need to be aware of the
changes.

Jacob

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



Unicode error

2008-02-05 Thread Kristian Øllegaard

Hi there

I just upgraded from version 0.96, where i without any problems were
running my project. After upgrading, i get an error whenever i
interact with the database (tried to read, add or edit).

'ascii' codec can't encode character u'\xd8' in position 0: ordinal
not in range(128)


Is there an obvious thing i did wrong? Have you heard about this error
before?

Regards
Kristian
--~--~-~--~~~---~--~~
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: Code upgrade

2008-02-05 Thread Chris

so does anyone have such a script on hand.  I have partially written
one that uses regular expressions to evaluate everything but I think
that it is still quite a ways off from getting it to a working point.

On Feb 5, 1:52 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Feb 5, 2008 12:33 PM, David Marquis <[EMAIL PROTECTED]> wrote:
>
> > If you didn't make any change to the Django source base, you can
> > simply download the latest release and install the new version.
> > If needed, you could also download the latest development version
> > through the Subversion repository.
>
> No, he can't. Between Django 0.91 and Django 0.95 there were huge
> numbers of massive backwards-incompatible changes; code that ran on
> 0.91 and earlier has to be fairly thoroughly rewritten in order to run
> on 0.95 or higher.
>
> The full list of necessary changes is preserved here:
>
> http://code.djangoproject.com/wiki/RemovingTheMagic
>
> --
> "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: Code upgrade

2008-02-05 Thread James Bennett

On Feb 5, 2008 12:33 PM, David Marquis <[EMAIL PROTECTED]> wrote:
> If you didn't make any change to the Django source base, you can
> simply download the latest release and install the new version.
> If needed, you could also download the latest development version
> through the Subversion repository.

No, he can't. Between Django 0.91 and Django 0.95 there were huge
numbers of massive backwards-incompatible changes; code that ran on
0.91 and earlier has to be fairly thoroughly rewritten in order to run
on 0.95 or higher.

The full list of necessary changes is preserved here:

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


-- 
"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: Code upgrade

2008-02-05 Thread David Marquis
If you didn't make any change to the Django source base, you can  
simply download the latest release and install the new version.
If needed, you could also download the latest development version  
through the Subversion repository.




On 5-Feb-08, at 12:51 PM, Chris wrote:



Hello, does anyone have a script that will upgrade django code from .
91 to .96.  I know that there are upgrade scripts out there just not
sure where I can obtain them. Would very much like to upgrade code
repository to 96.

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





smime.p7s
Description: S/MIME cryptographic signature


Re: Django and Caching Pages

2008-02-05 Thread boralyl

Jonathan,

Thanks I'll check them out.

On Feb 5, 12:12 pm, [EMAIL PROTECTED] wrote:
> boralyl wrote:
> > Jonathan,
>
> > Thanks for your response.  I first tested the site in firefox and
> > konqueror and had no problems.  When using opera though I noticed it
> > wasn't requesting the page, as you had mentioned.  The browser cache
> > was set to check every 5 hours on document requests.  I changed it to
> > always and now I see the expected results.
>
> Instead of changing the browser preferences, you might also look at pages
> headers sent by your "webserver" from your views.
> Take a look at HTTP/1.1 headers : Expires-* headers and Etags too, for
> instance. They are here to handle this kind of problems.
>
>  - Jonathan
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Operate with privileges

2008-02-05 Thread mike

Perhaps this is a stupid question, but i was thinking of creating a
django app that did a few Server administration tasks, add users, edit
config files etc.  Can anyone point me in the right direction as to
how I would be able to execute django views with root permissions?
Thx in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Code upgrade

2008-02-05 Thread Chris

Hello, does anyone have a script that will upgrade django code from .
91 to .96.  I know that there are upgrade scripts out there just not
sure where I can obtain them. Would very much like to upgrade code
repository to 96.

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: generic views

2008-02-05 Thread LMZ

do it like this:
return object_list( request, **CATEGORY_DETAIL )

read about this: 
http://docs.python.org/tut/node6.html#SECTION00672

concrete for this example:

>>> def parrot(voltage, state='a stiff', action='voom'):
... print "-- This parrot wouldn't", action,
... print "if you put", voltage, "volts through it.",
... print "E's", state, "!"
...
>>> d = {"voltage": "four million", "state": "bleedin' demised", "action": 
>>> "VOOM"}
>>> parrot(**d)
-- This parrot wouldn't VOOM if you put four million volts through it.
E's bleedin' demised !


On Jan 15, 7:55 am, Chris <[EMAIL PROTECTED]> wrote:
> Thanks so much for your help.  Can I pass in the whole dictionary as
> you do in your example?  When I attempt to do that I get this error.
> dict' object has no attribute '_clone'. Alternatively I can simpley
> pass in the individual variables suchas queryset and it works. I would
> like to pass it in as a dictionary if at all possible.
>
> Thanks again.
>
> On Jan 14, 5:13 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > If you want to apply additional filtering for query set with parameter
> > that has catched from url so you have to "inherit" generic view with
> > your own. Example for your case:
>
> > #views.py
> > from django.views.generic.list_detail import object_list
>
> > def my_view( request, tag_category ):
> > CATEGORY_DETAIL = {
> >  'queryset':
> > Article.objects.filter(tag__tag_name__iexact=tag_category),
> >  'paginate_by':15,
> > }
> > return object_list( request, CATEGORY_DETAIL )
>
> > #urls.py
> > urlpatterns = patterns('',
> > (r'^category/(?P[-\w]+)/$',
> > 'my_app.views.my_view' ), )
>
> > With proper names of course
>
> > On 14 янв, 22:44, Chris <[EMAIL PROTECTED]> wrote:
>
> > > I still get that error. Just forgot to add in the details variable
> > > when I dpasted.http://dpaste.com/31049/butIstill get the same
> > > error that I was talking about.  Should I put the details dictionary
> > > definition below the urlpattern so that maybe the variable is defined
> > > before I get to that point in my code?  I don't have 'request' to work
> > > with as I do when defining my own view so for some reason I can't seem
> > > to call directly and can't seem to find the proper accessor to grab
> > > the tag_catagory value from the expression.
>
> > > Any other suggestions as to why it is not working?
>
> > > On Jan 14, 12:30 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > > > You must specify details in pattern 
> > > > definitianhttp://www.djangoproject.com/documentation/generic_views/
>
> > > > On 14 янв, 20:08, Chris <[EMAIL PROTECTED]> wrote:
>
> > > > > Hello I am working with a generic view and I am trying to grab the url
> > >  > > expression variable and pass it to a dictionary for the generic view
> > > > > to use but I keep getting an error that the variable is not defined.
> > > > > Its obvious that the variable is not defined yet but is there a way
> > >  > > that I can make this work? Here is an example that I have. Worst case
> > > > > scenario is that I create my own view which I already have but I like
> > > > > to use what is already provided. Anyone have a work around to my
> > > > > generic views problem?
>
> > > > > Here is the code:http://dpaste.com/31029/
>
> > > > > Thanks ahead of time.
--~--~-~--~~~---~--~~
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 Caching Pages

2008-02-05 Thread jon

boralyl wrote:
> Jonathan,
>
> Thanks for your response.  I first tested the site in firefox and
> konqueror and had no problems.  When using opera though I noticed it
> wasn't requesting the page, as you had mentioned.  The browser cache
> was set to check every 5 hours on document requests.  I changed it to
> always and now I see the expected results.

Instead of changing the browser preferences, you might also look at pages
headers sent by your "webserver" from your views.
Take a look at HTTP/1.1 headers : Expires-* headers and Etags too, for
instance. They are here to handle this kind of problems.

 - Jonathan


--~--~-~--~~~---~--~~
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: Looking for a security/encryption programmer for small contract

2008-02-05 Thread Francis

Lets say I use pycrypto with AES, like this.

obj = AES.new('mykey', AES.MODE_CFB)
mytext = "Big secret"
cipher = obj.encrypt(mytext)

Can I use the same key or I have to change it everytime?
Would this be sufficiently secure?

Francis


On 23 jan, 11:25, Francis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm building a web application for one of my clients with django. But
> I need to do something that I have never did before and I am somehow
> really short on time to learn it.
>
> So I am looking for someone who has experience withencryption/
> security in python. It is to be incorporated into my django app.
>
> What's need to be done :
> - Take a message, encrypt it using a secure method (should be better
> or equal than OTP), return the encrypted message.
>
> What should be considered:
> - The user who receives the encrypted message, should be able to
> uncrypt it into his Windows workstation. I'm looking for a existing
> software that can do the job.
>
> If you're are up to the task and want to make extra money just let me
> know.
> What I want from you is :
> Your experience in the matter at hand
> If you want to make a package (fixe price) just let me know when you
> can finish it and your price.
> If you want to be paid per hour, give me a time estimate and your
> hourly rate. Plus when you can finish it.
>
> Thank you
>
> Francis
--~--~-~--~~~---~--~~
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 version for production?

2008-02-05 Thread Massimiliano Ravelli

On 5 Feb, 14:45, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> If anyone can afford running on trunk (as I do with my personal
> projects), then there's no reason to run on 0.96.

I agree: I'm running a very recent version of newforms-admin branch in
my *production* site with no problem at all.
Please note that upgrading from an older version, despite all the
operations are well documented, can be quite demanding
(especially if you don't proceed  step by step).

Regards
Massimiliano

--~--~-~--~~~---~--~~
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: how to speed up objects saving

2008-02-05 Thread Alex M.


Thanks everybody for your answers

well, I've tried the solutions you've proposed and I've tested them on a
part of my import procedure on my dev machine
previously, this part was taking about 12 minute to complete

-Justin & Rajesh
my tables are MyIsam. I've read Django documentation on transaction
commitment, even though this topic is not 100% clear for me, I've tried to
do as you suggested, using commit_on_success and commit_manually (I don't
know if it works on MyIsam tables) but there was either no improvement,
either a loss of speed
-Ivan
I've tried commenting dispatcher.send() calls in both save and __init__
original methods. Well, I was expecting some kind of improvement, but
somehow it takes almost exactly the same time to complete the job. I think
that the problem stands on the 'database side' of Django
- Matt
I can tell that my CPU works quite a lot during the execution of these
procedures, and mysql engine uses about 70%; maybe you have a lot of disk
access?
So far,
as Ivan and Johan were suggesting, I've tried to transfer data from the
original DB to my Django DB using raw SQL instructions and there was a
considerable increase in speed. I've tested it only on some transactions but
it saved about 40-60% of time, I'd say.

Well, I didn't want to come to that ;) but obviously bypassing the Django
machinery and letting MySQL do the job is the fastest solution.
Thanks again,

Alex
-- 
View this message in context: 
http://www.nabble.com/how-to-speed-up-objects-saving-tp1555p15288461.html
Sent from the django-users mailing list archive at Nabble.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 and Caching Pages

2008-02-05 Thread boralyl

Jonathan,

Thanks for your response.  I first tested the site in firefox and
konqueror and had no problems.  When using opera though I noticed it
wasn't requesting the page, as you had mentioned.  The browser cache
was set to check every 5 hours on document requests.  I changed it to
always and now I see the expected results.

Thanks

On Feb 5, 9:58 am, Jonathan Ballet <[EMAIL PROTECTED]> wrote:
> boralyl wrote:
> > So when I initially visit the page, it doesn't allow me to rate the
> > product.  So I login and it redirects me to the home page(/).  The
> > home page prints out my user name, so I know I am logged in.  However
> > if I visit that product page again it still won't let me rate the
> > procduct, unless I refresh the page.  After refreshing the page my
> > username shows up, and I am allowed to rate the product.
>
> Isn't your browser that is caching the product page on which you are not 
> logged ?
>
> Take a look at the Django's server output, to ensure that your browser is 
> _really_ requesting the page.
>
>   - Jonathan
--~--~-~--~~~---~--~~
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 Caching Pages

2008-02-05 Thread Jonathan Ballet

boralyl wrote:
> So when I initially visit the page, it doesn't allow me to rate the
> product.  So I login and it redirects me to the home page(/).  The
> home page prints out my user name, so I know I am logged in.  However
> if I visit that product page again it still won't let me rate the
> procduct, unless I refresh the page.  After refreshing the page my
> username shows up, and I am allowed to rate the product.

Isn't your browser that is caching the product page on which you are not logged 
?

Take a look at the Django's server output, to ensure that your browser is 
_really_ requesting the page.

  - Jonathan

--~--~-~--~~~---~--~~
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: Model Blues - A Newbie's question

2008-02-05 Thread Rajesh Dhawan


>
> When someone is creating a new Article in the admin app I want the new
> Article's author field to be the user's id.
>
> Is that possible ?

See: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser

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



permissions

2008-02-05 Thread super

I'm building an application without the django admin. I wan't to run
my own permmissions system. The docs say:

"Note that if your model doesn't have class Admin set when you run
syncdb, the permissions won't be created. If you initialize your
database and add class Admin to models after the fact, you'll need to
run manage.py syncdb again. It will create any missing permissions for
all of your installed apps."
http://www.djangoproject.com/documentation/authentication/#permissions

So I don't add class Admin to my models.

yet when I run syncdb these default permissions are stil created. How
come?

--~--~-~--~~~---~--~~
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 and Caching Pages

2008-02-05 Thread boralyl

I'm working on a django project on a development box.  I have for the
most part the default settings, and I noticed it seems as though every
visited page is cached, and if there isn't a redirect to the "cached"
page I don't get updated results.  For example If I look at a page
that has information pulled from the database but has some features
that require login I use
{% if user.is_authenticated %}
   
{% else %}
   
{% endif %}

So when I initially visit the page, it doesn't allow me to rate the
product.  So I login and it redirects me to the home page(/).  The
home page prints out my user name, so I know I am logged in.  However
if I visit that product page again it still won't let me rate the
procduct, unless I refresh the page.  After refreshing the page my
username shows up, and I am allowed to rate the product.

So my question is does django cache all pages by default?  It seems
that unless there is a redirect somewhere I will not see the updated
page w/o manually refreshing.  Is there a setting I need to change,
and if not, is there something else I should be doing to prevent this
caching?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Big ASS for You WebCam Online & Free

2008-02-05 Thread king sexy

Big  ASS for You WebCam Online & Free

www.big-asses.c.la
www.4film.c.la
--~--~-~--~~~---~--~~
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 version for production?

2008-02-05 Thread Jarek Zgoda

Kenneth Gonsalves napisał(a):

>>> please post your opinions on using 0.96 or trunk version in  
>>> production
>>> environment.
>>> which would you choose and why?
>> I'm using svn version from newforms-admin branch with some additional
>> patches.
>> As Kenneth already said, svn version has a lot of usefull (and even
>> necessary for me) goodies.
> 
> oh, and I forgot to add - moving from trunk to 1.0 will be much less  
> painful than moving from .96 to 1.0

It would be much less painful if we got, say, 0.97 with unicode, 0.98
with something and so on. This was discussed many times here and I
understand the case is closed (iow there would be no intermediary
releases before 1.0). With every commit, the hole just widens and at
some day it would not be feasible to port any application to "1.0". I
know personally many people still having their apps running on 0.91
because of too large amount of work needed to port to any later version.

If anyone can afford running on trunk (as I do with my personal
projects), then there's no reason to run on 0.96.

-- 
Jarek Zgoda
Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)

--~--~-~--~~~---~--~~
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 version for production?

2008-02-05 Thread Kenneth Gonsalves


On 05-Feb-08, at 6:58 PM, Pigletto wrote:

>> please post your opinions on using 0.96 or trunk version in  
>> production
>> environment.
>> which would you choose and why?
> I'm using svn version from newforms-admin branch with some additional
> patches.
> As Kenneth already said, svn version has a lot of usefull (and even
> necessary for me) goodies.

oh, and I forgot to add - moving from trunk to 1.0 will be much less  
painful than moving from .96 to 1.0

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.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: django version for production?

2008-02-05 Thread Pigletto

On 5 Lut, 12:57, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote:
> please post your opinions on using 0.96 or trunk version in production
> environment.
> which would you choose and why?
I'm using svn version from newforms-admin branch with some additional
patches.
As Kenneth already said, svn version has a lot of usefull (and even
necessary for me) goodies.

--
Maciej Wisniowski
--~--~-~--~~~---~--~~
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: Markup Filters (restructuredtext)

2008-02-05 Thread Christian W. Koch

Thanks Craig, will try it when I get home and report on success. =)

On Feb 4, 10:52 pm, "Craig Ogg" <[EMAIL PROTECTED]> wrote:
> On Feb 4, 2008 4:41 PM, Christian W. Koch <[EMAIL PROTECTED]> wrote:
>
> > I've been looking for this like crazy, I started using the markup
> > filters with great succes (love at first sight) but there's a little
> > problem. I use special carachters, like  and things like that
> > to support different languages. So, if I store it just like that in
> > the DB then the filter just spits it out literally instead of the
> > actual carachter "ã"
>
> This may not be the answer you are looking for, but generally I find
> it is better to just store the actual characters in the database.
> Allowing data to go from the db into HTML without escaping is
> generally considered a security hole.  If you are unable to do this
> (for database encoding reasons, for example), you could translate the
> character entities back to characters before sending them on your
> template.
>
> If you want to take that route, there is an example of doing this at
> the top of html2text.py[1].
>
> Craig
>
> [1]http://www.aaronsw.com/2002/html2text/
--~--~-~--~~~---~--~~
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 version for production?

2008-02-05 Thread Kenneth Gonsalves


On 05-Feb-08, at 5:27 PM, Aljosa Mohorovic wrote:

> please post your opinions on using 0.96 or trunk version in production
> environment.
> which would you choose and why?

trunk - because it has a lot of goodies that .96 doesnt have - 96 is  
really old

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.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
-~--~~~~--~~--~--~---



Çılgın Dershane Kampta - SoundTrack *Full Albüm*

2008-02-05 Thread www . Bitmezbusevda . com
*WwW.BitmezBusevda.CoM* 



*Çılgın Dershane Kampta - SoundTrack *Full Albüm**



01. Çılgın Dershane Kampta Nerde Kaldık - Fuchs & Jehan Barbur
02. Çılgın Dershane Kampta sexy Mustafa - Mustafa Topaloğlu
03. Çılgın Dershane Kampta Cebini Söyle - Berna Keser
04. Çılgın Dershane Kampta Gözyaşındayım - Berksan & Sibel Tüzün
05. Çılgın Dershane Kampta Elleri Kaldır - Fuchs
06. Çılgın Dershane Kampta Yıldızlar Geçidi
07. Çılgın Dershane Kampta Kıvır - Berksan
08. Çılgın Dershane Kampta Aşk Şelalesi
09. Çılgın Dershane Kampta Cilveli Kurdela
10. Çılgın Dershane Kampta Şahin Planı
11. Çılgın Dershane Kampta Güz Yelleri
12. Çılgın Dershane Kampta Şişe Çevirmece
13. Çılgın Dershane Kampta Biraderler
14. Çılgın Dershane Kampta Çardak Altı
15. Çılgın Dershane Kampta Action Reaction
16. Çılgın Dershane Kampta Sakar
17. Çılgın Dershane Kampta Fuchs & Berna Keser










*WwW.BitmezBusevda.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 version for production?

2008-02-05 Thread Jarek Zgoda

Aljosa Mohorovic napisał(a):

> please post your opinions on using 0.96 or trunk version in production
> environment.
> which would you choose and why?

My company uses 0.96 and, save some quirks and not-really-usable
newforms, it is acceptable. For my personal projects I use svn trunk.

-- 
Jarek Zgoda
Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)

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



Jacko - Aşk Yasak & Haydi Şimdi (2oo8) FuLL

2008-02-05 Thread www . Bitmezbusevda . com
*WwW.BitmezBusevda.CoM* 

*Jacko - Aşk Yasak & Haydi Şimdi (2oo8) FuLL*





*01 - Ask Yasak
02 - Haydi Simdi
03 - Jacko Geliyor
04 - Simdi Bombos Hersey
05 - Yak Beni
06 - Jacko Geliyor (Ragga Rap)
07 - Suc Bende
08 - Rüyalarim Gercek Olsa
09 - Sevsende Sevmesende
10 - Cilli Bom
11 - Suc Sende (House Mix)*










*WwW.BitmezBusevda.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
-~--~~~~--~~--~--~---



django version for production?

2008-02-05 Thread Aljosa Mohorovic

please post your opinions on using 0.96 or trunk version in production
environment.
which would you choose and why?
--~--~-~--~~~---~--~~
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: ForeignKey displaying related values

2008-02-05 Thread Eamon

Hi Rajesh,

Yes that worked, thanks for your help.

Regards,
Eamon

On Feb 1, 7:04 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > I am new to django, please excuse any naivity.
>
> Welcome to Django :)
>
>
>
>
>
> > I would like to list
> > child and related parent records from the scenario below. Although
> > quite happily displaying ChildFile records, I can't seem to display
> > any ParentFile records.
>
> > models.py
> > class ParentFile(models.Model):
> >     recnum = models.AutoField(primary_key=True)
> >     number = models.FloatField(max_digits=12, decimal_places=0)
> >     date = models.DateField()
> >     time = models.CharField(maxlength=5)
> >     city = models.CharField(maxlength=40)
> >     country = models.CharField(maxlength=40)
> >     ...
>
> > class ChildFile(models.Model):
> >     docket = models.ForeignKey(ParentFile, related_name = 'number',
> > unique=True)
> >     recnum = models.TextField(unique=True) # This field type is a
> > guess.
> >     docket = models.FloatField(max_digits=12, decimal_places=0,
> > primary_key=True)
>
> You've two fields called docket in this model. That's not allowed.
> Rename one of them and regenerate your model.
>
>
>
>
>
> >     name = models.CharField(maxlength=40)
> >     date = models.DateField()
> >     ...
>
> > views.py
> > def Outstanding(request):
> >     fLatestRecs = ChildFile.objects.filter(name =
> > 'DAN').select_related().order_by('-date')
> >     return render_to_response('/report.html', {'fLatestRecs':
> > fLatestRecs })
>
> > report.html
> > ...
> > {% if fLatestRecs %}
> >          > width="100%">
> >                     
> >                         Date
> >                         Time
> >                         Name
> >                         City
> >                         Country
> >                     
> >             {% for ChildFile in fLatestRecs %}
> >                     
> >                         {{ ChildFile.date }}
> >                         {{ ChildFile.time }}
> >                         {{ ChildFile.name }}
> >                         {{ ParentFile.city }}
> >                         {{ ParentFile.country }}
>
> Change those two lines like this (assuming docket is your ForeignKey
> field to ParentFile):
>
> {{ ChildFile.docket.city }}
> {{ ChildFile.docket.country }}
>
> Basically, you can get to a parent object by traversing the relevant
> ForeignKey field of the child object instance. You might want to read
> up on the DB API documentation for more details on this.
>
> Also, it's a common convention to use titlecasing in class names and
> not in instance names. So, in your template, I would suggest renaming
> ChildFile to childfile or child_file.
>
> -Rajesh- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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: Optimistic Locking

2008-02-05 Thread Tim Sawyer

On Monday 04 Feb 2008, Michael Hipp wrote:
> Tim Sawyer wrote:
> > If you're going to do that, then couldn't we change the framework to add
> > a new VersionField.  If there is a VersionField defined on the object,
> > then the code on save could automatically be added.  This VersionField
> > would simply hold a version number for the record, that is incremented at
> > save.  This is a similar idea to the date thing, but slightly more robust
> > - in a high traffic environment there is a theoretical (albeit small)
> > possibility of two objects picking up the same time.
> >
> > This is how hibernate recommends that you do it.  I saw someone
> > suggesting this method on this mailing list (found it with a web search I
> > did when I first started looking at django), this sounds like the optimum
> > solution for optimistic locking to me, and it would open up more use
> > cases for django, at least for me.
> >
> > Would this be straightforward to add?
>
> I'd love to see something like this added.
>
> Can it be done entirely in SQL or does it require some stored triggers
> or rules in the database?

I believe it can be done entirely in SQL.

* Select Object (for example ID, Version, Surname, Forename) - version column 
defaults to 0 for new inserts

* When object is updated, do an UPDATE blah WHERE id = :id and version 
= :version.  If your update updated no rows, raise a locking error

There would also have to be code added into the admin front end to deal with 
locking errors.

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: Changing expat library...is it easy?

2008-02-05 Thread Giovanni Giorgi

Thank you very much.
I will be happy to switch to Python 2.5, abeit this would cause some
recompilation and so on.
By the way I have fond  a fast way to fix the problem.
This way is not 100% safe, but works well for me.

I downloaded and recompiled expat version 1.95.8, then I installed it
replacing the old
1.95.7.
Apache was happy with it, and so was python 2.4.

I am not sure is safe because I think expat could be used by other
part of the system so... you should be very carefully on a production
environment.
Anyway, the replaced library is very closed to the original


On Feb 4, 11:39 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> The only other option is to upgrade to Python 2.5. In Python 2.5 it
> correctly namespaces the copy of expat it contains thereby avoiding
> the problem.
>
> Graham
>
> On Feb 5, 8:51 am, Giovanni Giorgi <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> >  I have a problem.
> > I have discovered my dear python 2.4 has a libexpat incompatibility
> > when I usemod_python.
> > As seen 
> > inhttp://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash
> > I have expat_1.95.7 library inside /usr/lib/libexpat.so.0
>
> > Python 2.4 do not like it very much:
>
> >         [EMAIL PROTECTED] tests]# ldd /usr/sbin/httpd | grep expat
> >                 libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7ea2000)
> >         [EMAIL PROTECTED] tests]# LD_PRELOAD=/usr/lib/libexpat.so.0 python
> >         Python 2.4.3 (#1, Oct 20 2006, 13:13:29)
> >         [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
> >         Type "help", "copyright", "credits" or "license" for more
> > information.
> >         >>> import pyexpat
> >         Segmentation fault
>
> > I have read the suggestions down to
> >  http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash
> > but I cannot fix the problem.
>
> > What do you suggest to do?
> > There is a way to recompile the python 2.4 using my expat library?
> > Python code seems using its own version stored inside
> >  Python-2.4.3/Modules/expat
>
> > The difference is tiny...but I'd like to avoid to upgrade my apache
> > installation... can you give me some hints?
> > Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Override admin filters

2008-02-05 Thread Jarek Zgoda

Aaron Fay napisał(a):

> I'm wondering if there is a way to override the filters and and 
> list_display on the built-in users view/model in the django admin.  I 
> would like to be able to filter/sort by group if possible.

I asked for that few weeks ago and the answer was "no". There is a
ticket for this feature in Django Trac (cann't find it now, though) and
I think this feature is being worked on.

-- 
Jarek Zgoda
Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)

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



Make Money $1500.00

2008-02-05 Thread Dee More
At Bux.to, you get paid to click on ads and visit websites. The process is
easy! You simply click a link and view a website for *30* seconds to earn
money. You can earn even more by referring friends. You'll get paid $0.01
for each website you personally view and $0.01 for each website your
referrals view. Payment requests can be made every day and are processed
through AlertPay The minimum payout is $10.00.

 http://bux.to/?r=skgroup

*Earnings Example*
? You click 10 ads per day = $0.10
? 20 referrals click 10 ads per day = $2.00
? Your daily earnings = $2.10
? Your weekly earnings = $14.70
? Your monthly earnings = *$63.00*

The above example is based only on 20 referrals and 10 daily clicks. Some
days you will have more clicks available, some days you will have less. What
if you had more referrals? What if there were more ads available? Join now
and receive a $0.05 Sign-up Bonus 

Simple Pay money
http://www.skupload.com/page3.html

And
sigup at http://bux.to/?r=skgroup



 

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