Character Diff Utility

2012-03-07 Thread siva
 Hi,

Is there any utility to get file difference with character diff

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django hgwebdir

2012-03-07 Thread siva

Hi ,

As of now we are looking hg repository via cgi

Can we see hg repository using django instead of cgi ?

Thanks,
S.Sivakumar


On Mar 7, 5:58 pm, Denis Darii  wrote:
> using django? hmmm...
>
> you can browse your current repo via http on port 8000 by launching:
>
> $ hg se
>
> or:
>
> $ hg se -n "Your repo"
>
> On Wed, Mar 7, 2012 at 1:39 PM, siva <85s...@gmail.com> wrote:
>
> > Is it possible can we see hg repository using 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
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> This e-mail and any file transmitted with it is intended only for the
> person or entity to which is addressed and may contain information that is
> privileged, confidential or otherwise protected from disclosure. Copying,
> dissemination or use of this e-mail or the information herein by anyone
> other than the intended recipient is prohibited. If you are not the
> intended recipient, please notify the sender immediately by return e-mail,
> delete this communication and destroy all copies.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems creating django project in Windows 7

2012-03-07 Thread Mika
Thanks Jason. Putting python in front of 'django-admin' did work. I
appreciate your help with this.  I'm relatively new to Python and
programming in general. All I've ever used is Windows and I don't know
much about Linux-related operating systems. I'll probably go with
Ubuntu because it seems everyone who knows what they're doing is using
Linux(and Paul Graham mentions that just about all of Y Combinator's
startups use either Mac OSX or Linux). But I'm just curious about the
objective advantages of Ubuntu over Windows vis a vis django?Why would
Windows cause headaches down the road? Also, is VMWare or Virtualbox
necessary? How would it benefit my development environment?

thnx

On Mar 7, 12:35 pm, Jason  wrote:
> Use python before all your commands. Even if you setup windows to
> automatically work without this, it's still a really good habit to get
> into.
>
> python django-admin.py
>
> My guess is that either will work or you have a problem with your
> python environment.
>
> Eventually you'll stop using Windows for Django development (I was
> like you once!). I suggest installing VirtualBox or VMWare (or
> whatever else) and do all this stuff from Ubuntu. It will save you
> many, many headaches.
>
> On Mar 6, 8:56 pm, Mika  wrote:
>
>
>
>
>
>
>
> > Hi,
> > I uninstalled and reinstalled django to see if that would solve
> > things, but I still can't create a project. Here are the steps I'm
> > taking:
>
> > 1) Made sure the correct path was set so that the command prompt can
> > find the django-admin.py file. Here's the path I set to locate the
> > appropriate folder:  %SystemRoot%\system32;%SystemRoot%;%SystemRoot%
> > \System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:
> > \Python26\;C:\Python26\Scripts
>
> > 2) Went into the command prompt and typed in django-admin.py. It
> > didn't automatically show me any of the available commands as I
> > presume it should have, but it didn't generate any error message
> > either.
>
> > 3) Typed in django-admin.py startproject mysite. I assumed I would
> > then be able to go find the newly created mysite folder in my home
> > directory because that's where it was set to start the project in the
> > prompt
>
> > 4) Went into my user directory(C:\Users\Mika) to find mysite folder,
> > but it wasn't there. I'm not getting any error messages at all either
> > in the command prompt, so I'm not sure what's going on. Please advise.
>
> > thnx
>
> > Mika

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: send_mail problem

2012-03-07 Thread Scott Macri
UGH, I guess that wasn't the issue.  Its back again.  I don't know
what the deal is.

On Wed, Mar 7, 2012 at 9:29 PM, Scott Macri  wrote:
> I just figured this one out:
>
> Basically in the view I had the following just before calling the save
> method on the database:
> object.email_template = form.cleaned_data['email_message']
>
> instead of
> object.email_message = form.cleaned_data['email_message']
>
> The strange thing is that the data was actually being stored in the
> correct field in the database, and was coming out correctly, but
> something went haywire when I tried to wrap it in a message.
>
> On Wed, Mar 7, 2012 at 9:13 PM, Scott Macri  wrote:
>> This one never sends the message:
>>
>> print object.email_message
>> some test text
>>
>> mailer.sendMessage('subject3',object.email_message,user.email,[person.email])
>>
>> This one works fine:
>>
>> mailer.sendMessage('subject3','a test message 
>> here',user.email,[person.email])
>>
>> On Wed, Mar 7, 2012 at 9:05 PM, Scott Macri  wrote:
>>> It appears to be an issue with the content for the message being
>>> pulled from the database.  I tried putting the text "text" in the
>>> database, and pulling it out and for some reason it prevents the
>>> message from being sent.  The db field is configured as follows:
>>> email_message = models.CharField(max_length = 750,blank=True)
>>> I then do the following call message = object.email_message and pass
>>> it to the send_mail function.  For some reason the message never gets
>>> sent.  If I do the call without getting the data from the database it
>>> works fine.
>>>
>>> On Wed, Mar 7, 2012 at 8:51 PM, Scott Macri  wrote:
 I'm having a strange issue with send_mail.  I created a py script with
 a function to call send_mail.  If I call the method via IDLE it works
 great.  If I call the method with the exact same way with the exact
 same data via another script the message never gets sent.  The strange
 thing is that an error is never thrown.

 Anyone ever see this before?  Thanks.

 --



-- 
Scott A. Macri
www.ScottMacri.com
(571) 234-1581

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems getting started

2012-03-07 Thread Shawn Milochik

On 03/07/2012 08:58 PM, Andres Reyes wrote:

For me, the main reason to use virtualenv has nothing to do with
security or anything like that, is the convenience of having different
projects with different sets of requirements not interfering with each
other




It's really all about convenience. Not only is it easier to install (no 
root privileges needed), it's easier to deploy on more hosts (where you 
don't have many privileges), and on your development machine you're free 
to have many different stacks without interference.



--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: send_mail problem

2012-03-07 Thread Scott Macri
I just figured this one out:

Basically in the view I had the following just before calling the save
method on the database:
object.email_template = form.cleaned_data['email_message']

instead of
object.email_message = form.cleaned_data['email_message']

The strange thing is that the data was actually being stored in the
correct field in the database, and was coming out correctly, but
something went haywire when I tried to wrap it in a message.

On Wed, Mar 7, 2012 at 9:13 PM, Scott Macri  wrote:
> This one never sends the message:
>
> print object.email_message
> some test text
>
> mailer.sendMessage('subject3',object.email_message,user.email,[person.email])
>
> This one works fine:
>
> mailer.sendMessage('subject3','a test message here',user.email,[person.email])
>
> On Wed, Mar 7, 2012 at 9:05 PM, Scott Macri  wrote:
>> It appears to be an issue with the content for the message being
>> pulled from the database.  I tried putting the text "text" in the
>> database, and pulling it out and for some reason it prevents the
>> message from being sent.  The db field is configured as follows:
>> email_message = models.CharField(max_length = 750,blank=True)
>> I then do the following call message = object.email_message and pass
>> it to the send_mail function.  For some reason the message never gets
>> sent.  If I do the call without getting the data from the database it
>> works fine.
>>
>> On Wed, Mar 7, 2012 at 8:51 PM, Scott Macri  wrote:
>>> I'm having a strange issue with send_mail.  I created a py script with
>>> a function to call send_mail.  If I call the method via IDLE it works
>>> great.  If I call the method with the exact same way with the exact
>>> same data via another script the message never gets sent.  The strange
>>> thing is that an error is never thrown.
>>>
>>> Anyone ever see this before?  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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: send_mail problem

2012-03-07 Thread Scott Macri
This one never sends the message:

print object.email_message
some test text

mailer.sendMessage('subject3',object.email_message,user.email,[person.email])

This one works fine:

mailer.sendMessage('subject3','a test message here',user.email,[person.email])

On Wed, Mar 7, 2012 at 9:05 PM, Scott Macri  wrote:
> It appears to be an issue with the content for the message being
> pulled from the database.  I tried putting the text "text" in the
> database, and pulling it out and for some reason it prevents the
> message from being sent.  The db field is configured as follows:
> email_message = models.CharField(max_length = 750,blank=True)
> I then do the following call message = object.email_message and pass
> it to the send_mail function.  For some reason the message never gets
> sent.  If I do the call without getting the data from the database it
> works fine.
>
> On Wed, Mar 7, 2012 at 8:51 PM, Scott Macri  wrote:
>> I'm having a strange issue with send_mail.  I created a py script with
>> a function to call send_mail.  If I call the method via IDLE it works
>> great.  If I call the method with the exact same way with the exact
>> same data via another script the message never gets sent.  The strange
>> thing is that an error is never thrown.
>>
>> Anyone ever see this before?  Thanks.
>>
>> --
>> Scott
>
>
>
> --
> Scott A. Macri
> www.ScottMacri.com
> (571) 234-1581



-- 
Scott A. Macri
www.ScottMacri.com
(571) 234-1581

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: send_mail problem

2012-03-07 Thread Scott Macri
It appears to be an issue with the content for the message being
pulled from the database.  I tried putting the text "text" in the
database, and pulling it out and for some reason it prevents the
message from being sent.  The db field is configured as follows:
email_message = models.CharField(max_length = 750,blank=True)
I then do the following call message = object.email_message and pass
it to the send_mail function.  For some reason the message never gets
sent.  If I do the call without getting the data from the database it
works fine.

On Wed, Mar 7, 2012 at 8:51 PM, Scott Macri  wrote:
> I'm having a strange issue with send_mail.  I created a py script with
> a function to call send_mail.  If I call the method via IDLE it works
> great.  If I call the method with the exact same way with the exact
> same data via another script the message never gets sent.  The strange
> thing is that an error is never thrown.
>
> Anyone ever see this before?  Thanks.
>
> --
> Scott



-- 
Scott A. Macri
www.ScottMacri.com
(571) 234-1581

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems getting started

2012-03-07 Thread Andres Reyes
For me, the main reason to use virtualenv has nothing to do with
security or anything like that, is the convenience of having different
projects with different sets of requirements not interfering with each
other

2012/3/7 backdoc :
> I've never set up virtualenv, so I can't speak to that.  But, how is
> installing Django the same way that I install any other application
> more of a risk?  If an installer tries to write to /usr/local/bin/,
> then it needs elevated permissions to do so.  I would assume from that
> point on, the remainder of the time, the program runs within the
> context of the user who executed it, just like any other shell
> commands like tar, ls, mv, rm, python, and so on.
>
> While the web server is running, wouldn't it execute any Django
> commands within the context of the web user, like www-data?  When I
> installed WSGI, I used Synaptic.  To use Synaptic, if you start it as
> a regular user, you have to give root password.  How would is that
> different?
>
> You may have very good answers.  I'm not saying I'm right and you're
> wrong.  But, I don't see the problem.
>
> On Mar 7, 4:21 pm, Andre Terra  wrote:
>> Again, don't install as root, use virtualenv. This will save you headaches
>> in the future, and unless you have an inexcusable reason to have Django run
>> as root, you shouldn't.
>>
>> Sincerely,
>> AT
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Mar 7, 2012 at 6:28 PM, backdoc  wrote:
>> > I think you might need to install as root or sudo.
>>
>> > From memory.
>>
>> > sudo python setup.py install
>>
>> > Also, try executing "which django-admin.py" at the terminal.  That
>> > will tell you the location of the executable.  Basically, I'm curious
>> > if it will even find it, as I'm thinking it didn't install at all.  I
>> > just installed the 1.4 rc last night on Debian.  I didn't have any
>> > issues.
>>
>> > On Mar 7, 8:36 am, Clark  wrote:
>> > > After installing Django I am attempting to start a new project.  After
>> > > creating a directory for this, I tried using the command: "django-
>> > > admin.py startproject mysite".
>>
>> > > but I'm getting the message "-bash: django-admin.py: command not found
>> > > ".
>>
>> > > So, I've tried running this:
>>
>> > > "sudo ln -s library/python/2.6/site-packages/django/bin/django-
>> > > admin.py /usr/local/bin/django-admin.py" in which i get "file exists"
>> > > and I still get the same problem when running the startproject.
>>
>> > > Only other piece of info is that during installation I had a "error: /
>> > > usr/local/bin/django-admin.py: No such file or directory".  But I can
>> > > cd into that directory and see the django-admin.py file.
>>
>> > > 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
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Andrés Reyes Monge
armo...@gmail.com
+(505)-8873-7217

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



send_mail problem

2012-03-07 Thread Scott Macri
I'm having a strange issue with send_mail.  I created a py script with
a function to call send_mail.  If I call the method via IDLE it works
great.  If I call the method with the exact same way with the exact
same data via another script the message never gets sent.  The strange
thing is that an error is never thrown.

Anyone ever see this before?  Thanks.

-- 
Scott

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems getting started

2012-03-07 Thread backdoc
I've never set up virtualenv, so I can't speak to that.  But, how is
installing Django the same way that I install any other application
more of a risk?  If an installer tries to write to /usr/local/bin/,
then it needs elevated permissions to do so.  I would assume from that
point on, the remainder of the time, the program runs within the
context of the user who executed it, just like any other shell
commands like tar, ls, mv, rm, python, and so on.

While the web server is running, wouldn't it execute any Django
commands within the context of the web user, like www-data?  When I
installed WSGI, I used Synaptic.  To use Synaptic, if you start it as
a regular user, you have to give root password.  How would is that
different?

You may have very good answers.  I'm not saying I'm right and you're
wrong.  But, I don't see the problem.

On Mar 7, 4:21 pm, Andre Terra  wrote:
> Again, don't install as root, use virtualenv. This will save you headaches
> in the future, and unless you have an inexcusable reason to have Django run
> as root, you shouldn't.
>
> Sincerely,
> AT
>
>
>
>
>
>
>
> On Wed, Mar 7, 2012 at 6:28 PM, backdoc  wrote:
> > I think you might need to install as root or sudo.
>
> > From memory.
>
> > sudo python setup.py install
>
> > Also, try executing "which django-admin.py" at the terminal.  That
> > will tell you the location of the executable.  Basically, I'm curious
> > if it will even find it, as I'm thinking it didn't install at all.  I
> > just installed the 1.4 rc last night on Debian.  I didn't have any
> > issues.
>
> > On Mar 7, 8:36 am, Clark  wrote:
> > > After installing Django I am attempting to start a new project.  After
> > > creating a directory for this, I tried using the command: "django-
> > > admin.py startproject mysite".
>
> > > but I'm getting the message "-bash: django-admin.py: command not found
> > > ".
>
> > > So, I've tried running this:
>
> > > "sudo ln -s library/python/2.6/site-packages/django/bin/django-
> > > admin.py /usr/local/bin/django-admin.py" in which i get "file exists"
> > > and I still get the same problem when running the startproject.
>
> > > Only other piece of info is that during installation I had a "error: /
> > > usr/local/bin/django-admin.py: No such file or directory".  But I can
> > > cd into that directory and see the django-admin.py file.
>
> > > 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
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

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



Re: Why on_delete attribute is not available on GenericForeignKey?

2012-03-07 Thread akaariai
On Mar 7, 11:40 pm, Marc Aymerich  wrote:
> On Wed, Mar 7, 2012 at 9:13 PM, akaariai  wrote:
> > I believe the reason is efficiency. If there were an on_delete
> > argument for GFKs every object deletion of any class would need to do
> > a query to check if there happens to be any GFK related objects. In
> > addition, Django can't guarantee foreign key consistency. In case of
> > concurrent transactions it is possible an insert could be made which
> > is not visible to the deletion code.
>
> Hi Anssi, thanks for your answer! :)
> Maybe I've missunderstood your email, but I don't see why a
> customization of the on_delete behaviour could lead to performance or
> concistency issues. Actually the default behaviour of GFK (with a
> declared GenericRelation) is performing a delete on cascade, so Django
> is currently performing this hard work looking for related objects to
> delete.
>
> My problem is just this, avoiding the cascade deletion. More
> precisely, I want to have a GenericRelation declared in order to get
> their extra API features, but at the same time i want to keep my
> related objects when a related delete is performed, so it would be
> nice if I can define on_delete=DO_NOTHING. It doesn't sound too much
> complicated to implement on django trunk, so I want to know if I'm
> missing something.

Seems like I was mistaken. I thought there was no on_delete action at
all. If there already is one I don't see any other reason for not
allowing customization of the action than that nobody has implemented
that yet. I don't use GFKs myself, so that was the reason for the
confusion. Sorry for misinformation...

 - Anssi

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems getting started

2012-03-07 Thread Shawn Milochik

On 03/07/2012 05:21 PM, Andre Terra wrote:

Again, don't install as root, use virtualenv. This will save you
headaches in the future, and unless you have an inexcusable reason to
have Django run as root, you shouldn't.


Sincerely,
AT


+1. Also, there is no excusable reason to need to do it as root, and 
many good reasons not to.



--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems getting started

2012-03-07 Thread Andre Terra
Again, don't install as root, use virtualenv. This will save you headaches
in the future, and unless you have an inexcusable reason to have Django run
as root, you shouldn't.


Sincerely,
AT

On Wed, Mar 7, 2012 at 6:28 PM, backdoc  wrote:

> I think you might need to install as root or sudo.
>
> From memory.
>
> sudo python setup.py install
>
> Also, try executing "which django-admin.py" at the terminal.  That
> will tell you the location of the executable.  Basically, I'm curious
> if it will even find it, as I'm thinking it didn't install at all.  I
> just installed the 1.4 rc last night on Debian.  I didn't have any
> issues.
>
> On Mar 7, 8:36 am, Clark  wrote:
> > After installing Django I am attempting to start a new project.  After
> > creating a directory for this, I tried using the command: "django-
> > admin.py startproject mysite".
> >
> > but I'm getting the message "-bash: django-admin.py: command not found
> > ".
> >
> > So, I've tried running this:
> >
> > "sudo ln -s library/python/2.6/site-packages/django/bin/django-
> > admin.py /usr/local/bin/django-admin.py" in which i get "file exists"
> > and I still get the same problem when running the startproject.
> >
> > Only other piece of info is that during installation I had a "error: /
> > usr/local/bin/django-admin.py: No such file or directory".  But I can
> > cd into that directory and see the django-admin.py file.
> >
> > 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Why on_delete attribute is not available on GenericForeignKey?

2012-03-07 Thread Marc Aymerich
On Wed, Mar 7, 2012 at 9:13 PM, akaariai  wrote:
> I believe the reason is efficiency. If there were an on_delete
> argument for GFKs every object deletion of any class would need to do
> a query to check if there happens to be any GFK related objects. In
> addition, Django can't guarantee foreign key consistency. In case of
> concurrent transactions it is possible an insert could be made which
> is not visible to the deletion code.
>

Hi Anssi, thanks for your answer! :)
Maybe I've missunderstood your email, but I don't see why a
customization of the on_delete behaviour could lead to performance or
concistency issues. Actually the default behaviour of GFK (with a
declared GenericRelation) is performing a delete on cascade, so Django
is currently performing this hard work looking for related objects to
delete.

My problem is just this, avoiding the cascade deletion. More
precisely, I want to have a GenericRelation declared in order to get
their extra API features, but at the same time i want to keep my
related objects when a related delete is performed, so it would be
nice if I can define on_delete=DO_NOTHING. It doesn't sound too much
complicated to implement on django trunk, so I want to know if I'm
missing something.

Please let me know if I didn't understand correctly your comment.
-- 
Marc

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problems getting started

2012-03-07 Thread backdoc
I think you might need to install as root or sudo.

>From memory.

sudo python setup.py install

Also, try executing "which django-admin.py" at the terminal.  That
will tell you the location of the executable.  Basically, I'm curious
if it will even find it, as I'm thinking it didn't install at all.  I
just installed the 1.4 rc last night on Debian.  I didn't have any
issues.

On Mar 7, 8:36 am, Clark  wrote:
> After installing Django I am attempting to start a new project.  After
> creating a directory for this, I tried using the command: "django-
> admin.py startproject mysite".
>
> but I'm getting the message "-bash: django-admin.py: command not found
> ".
>
> So, I've tried running this:
>
> "sudo ln -s library/python/2.6/site-packages/django/bin/django-
> admin.py /usr/local/bin/django-admin.py" in which i get "file exists"
> and I still get the same problem when running the startproject.
>
> Only other piece of info is that during installation I had a "error: /
> usr/local/bin/django-admin.py: No such file or directory".  But I can
> cd into that directory and see the django-admin.py file.
>
> 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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



output form html

2012-03-07 Thread backdoc
I am having trouble changing the way the HTML in my form fields is
presented.  I've been reading the docs (https://docs.djangoproject.com/
en/dev/ref/forms/api/#outputting-forms-as-html).  I've done this in
previous versions.  But, it doesn't seem to work now.

No matter if I use form.as_p or form.as_table, I always get .

I am running:
 django-admin.py --version
 1.4c1

This is my form:

 {% block left %}
   {% csrf_token %}
 
 {{ searchForm.as_p }}
   
   
 {% endblock %}

TIA

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Why on_delete attribute is not available on GenericForeignKey?

2012-03-07 Thread akaariai
I believe the reason is efficiency. If there were an on_delete
argument for GFKs every object deletion of any class would need to do
a query to check if there happens to be any GFK related objects. In
addition, Django can't guarantee foreign key consistency. In case of
concurrent transactions it is possible an insert could be made which
is not visible to the deletion code.

 - Anssi

On Mar 7, 3:50 pm, Marc Aymerich  wrote:
> The django docs says:
> Unlike ForeignKey, GenericForeignKey does not accept an on_delete
> argument to customize this behavior; if desired, you can avoid the
> cascade-deletion simply by not using GenericRelation, and alternate
> behavior can be provided via the pre_delete signal.
>
> Does anyone knows why? I mean, is it for some conceptual/technical
> reason that makes it impractical to implement or is it because nobody
> put efforts to make it happen? Or maybe GFK are not so well integrated
> with the ORM and as soon as they become integrated, then this feature
> will come for free?
>
> Thanks!
> --
> Marc

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: User permission

2012-03-07 Thread Andre Terra
What I do:

1) Control user rights in views, always, no matter what.
2) Pass user perms to template so that you only display accessible,
permitted links.


Cheers,
AT

On Wed, Mar 7, 2012 at 2:10 PM, Xavier Pegenaute wrote:

> Hi,
>
> Which one is the best option?
>
> a- Control the user rights in the views
> b- Control the user rights in the templates
> c- Control the user rights in both locations
>
> I guess is (c), but it's too much work.
>
> Thanks,
> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

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



using django with socketio

2012-03-07 Thread dobrysmak
Hi guys,
long story short, i'm using* django-socketio* with my app on nginx + uwsgi 
+ tcp_module  and i 
cant get it to work with the browser on production server.
Here's short conf  

Any ideas how to get it to work? or is there other way to use socket.io 
(besides 
Noje.js) with Django framework?
Cheers!

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



User permission

2012-03-07 Thread Xavier Pegenaute

Hi,

Which one is the best option?

a- Control the user rights in the views
b- Control the user rights in the templates
c- Control the user rights in both locations

I guess is (c), but it's too much work.

Thanks,
Regards.

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



Re: Problems getting started

2012-03-07 Thread Andre Terra
On Wed, Mar 7, 2012 at 2:53 PM, Sandro Dutra  wrote:

> I don't know how it's works on a Linux box, but on Windows we've to put
> Python/Scripts on PATH variable to use the command directly.



Or you can use virtualenv like I mentioned in the other thread.


Cheers,
AT

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Using django and virtualenv on Mac OS X. (WAS: Getting Started with Mac OS X)

2012-03-07 Thread Andre Terra
You should use pip and virtualenv to create a sane development environment.

This guide [1] is originally aimed at ubuntu/linux, but I think you can
probably follow in mac os x as well. I've also listed a few other links
with instructions that look alright, but that I haven't tested.

Basically, don't "ln -s". Use virtualenv instead.

Quote from one of the links:

*"On my systems, virtualenv, virtualenvwrapper, and Mercurial are the only
Python packages that are always available — every other package is confined
to its virtual environment."*

While you might prefer something other than mercurial, the point still
stands. Add only the bare minimum to the system-wide install and everything
else to virtualenvs instead.



Cheers,
AT

[1]
http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/


http://www.arthurkoziel.com/2008/10/22/working-virtualenv/
http://hackercodex.com/2011/08/30/python-install-django-on-mac-osx-lion-10.7/
http://www.djangoapp.com/blog/2011/07/25/django-installation-on-mac-os-x-lion/




On Wed, Mar 7, 2012 at 2:31 PM, Clark Corey  wrote:

> I am typing mine into a shell promptI posted the thread, but I don't
> know that it has posted yet...here it is:
>
> After installing Django I am attempting to start a new project.  After
> creating a directory for this, I tried using the command: "django-
> admin.py startproject mysite".
>
> but I'm getting the message "-bash: django-admin.py: command not found".
>
> So, I've tried running this:
>
> "sudo ln -s library/python/2.6/site-packages/django/bin/django-admin.py
> /usr/local/bin/django-admin.py" in which i get "file exists"
> and I still get the same problem when running the startproject.
>
> Only other piece of info is that during installation I had a "error:
> /usr/local/bin/django-admin.py: No such file or directory".  But I can
> cd into that directory and see the django-admin.py file.
>
> Thanks!
>
> -Clark
>
>
>
> On Wed, Mar 7, 2012 at 7:54 AM, Tom Evans wrote:
>
>> On Wed, Mar 7, 2012 at 2:43 PM, Clark  wrote:
>> > I am having a similar issue, so I tried the $ pip uninstall django,
>> > but I got a "IOError: [Errno 13] Permission denied"
>> >
>> > Advice?
>> >
>> > Thanks.
>> >
>>
>> You should have started a new thread for your new error. The error
>> here was that the new user was typing shell commands into a python
>> prompt - is that what you are doing?
>>
>> The error that you have shown means that pip tried to access (read or
>> delete) a file to which it did not have access. That could happen for
>> any number of reasons, but most likely you installed django as root
>> and are trying to uninstall it as a regular user.
>>
>> Of course, that is just speculation, as you have not shown what
>> happened, or what your original error was that made you think "I know,
>> a reinstall of Django will fix everything".
>>
>> Cheers
>>
>> Tom
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Problems getting started

2012-03-07 Thread Sandro Dutra
I don't know how it's works on a Linux box, but on Windows we've to put
Python/Scripts on PATH variable to use the command directly.


2012/3/7 Clark 

> After installing Django I am attempting to start a new project.  After
> creating a directory for this, I tried using the command: "django-
> admin.py startproject mysite".
>
> but I'm getting the message "-bash: django-admin.py: command not found
> ".
>
> So, I've tried running this:
>
> "sudo ln -s library/python/2.6/site-packages/django/bin/django-
> admin.py /usr/local/bin/django-admin.py" in which i get "file exists"
> and I still get the same problem when running the startproject.
>
> Only other piece of info is that during installation I had a "error: /
> usr/local/bin/django-admin.py: No such file or directory".  But I can
> cd into that directory and see the django-admin.py file.
>
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Problems creating django project in Windows 7

2012-03-07 Thread Jason
Use python before all your commands. Even if you setup windows to
automatically work without this, it's still a really good habit to get
into.

python django-admin.py

My guess is that either will work or you have a problem with your
python environment.

Eventually you'll stop using Windows for Django development (I was
like you once!). I suggest installing VirtualBox or VMWare (or
whatever else) and do all this stuff from Ubuntu. It will save you
many, many headaches.

On Mar 6, 8:56 pm, Mika  wrote:
> Hi,
> I uninstalled and reinstalled django to see if that would solve
> things, but I still can't create a project. Here are the steps I'm
> taking:
>
> 1) Made sure the correct path was set so that the command prompt can
> find the django-admin.py file. Here's the path I set to locate the
> appropriate folder:  %SystemRoot%\system32;%SystemRoot%;%SystemRoot%
> \System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:
> \Python26\;C:\Python26\Scripts
>
> 2) Went into the command prompt and typed in django-admin.py. It
> didn't automatically show me any of the available commands as I
> presume it should have, but it didn't generate any error message
> either.
>
> 3) Typed in django-admin.py startproject mysite. I assumed I would
> then be able to go find the newly created mysite folder in my home
> directory because that's where it was set to start the project in the
> prompt
>
> 4) Went into my user directory(C:\Users\Mika) to find mysite folder,
> but it wasn't there. I'm not getting any error messages at all either
> in the command prompt, so I'm not sure what's going on. Please advise.
>
> thnx
>
> Mika

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Getting Started with Mac OS X

2012-03-07 Thread Clark Corey
I am typing mine into a shell promptI posted the thread, but I don't
know that it has posted yet...here it is:

After installing Django I am attempting to start a new project.  After
creating a directory for this, I tried using the command: "django-
admin.py startproject mysite".

but I'm getting the message "-bash: django-admin.py: command not found".

So, I've tried running this:

"sudo ln -s library/python/2.6/site-packages/django/bin/django-admin.py
/usr/local/bin/django-admin.py" in which i get "file exists"
and I still get the same problem when running the startproject.

Only other piece of info is that during installation I had a "error:
/usr/local/bin/django-admin.py: No such file or directory".  But I can
cd into that directory and see the django-admin.py file.

Thanks!

-Clark


On Wed, Mar 7, 2012 at 7:54 AM, Tom Evans  wrote:

> On Wed, Mar 7, 2012 at 2:43 PM, Clark  wrote:
> > I am having a similar issue, so I tried the $ pip uninstall django,
> > but I got a "IOError: [Errno 13] Permission denied"
> >
> > Advice?
> >
> > Thanks.
> >
>
> You should have started a new thread for your new error. The error
> here was that the new user was typing shell commands into a python
> prompt - is that what you are doing?
>
> The error that you have shown means that pip tried to access (read or
> delete) a file to which it did not have access. That could happen for
> any number of reasons, but most likely you installed django as root
> and are trying to uninstall it as a regular user.
>
> Of course, that is just speculation, as you have not shown what
> happened, or what your original error was that made you think "I know,
> a reinstall of Django will fix everything".
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



django-stdimage admin TemplateSyntaxError

2012-03-07 Thread Randa Hisham
i use django-stdimage package and when i display the object n the admin i
found this error

Caught TemplateDoesNotExist while rendering: stdimage/admin_widget.html


-- 
Randa Hesham
Software Developer

Twitter:@ro0oraa 
FaceBook:Randa Hisham 

ٍ

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Use GraphDB with Django

2012-03-07 Thread Stephan Gerhard
Hi,
With the Python package Bulbs/Bulbflow, I can interface graph
databases and
model my domain objects. http://bulbflow.com/quickstart/#domain-models
What I would like to do is to define my domain models in this way and
use
them to query/update the graph db through my views in Django, instead
of
going through Django's ORM to the relational database.

Has anyone tried to do this? Or do you know what implementation effort
would
be required on the Django-side to make this bridge?

In particular, I would be interested in how to keep the graph object
persistent,
in order to use it from within my views.

Thanks for any suggestions or ideas,
Stephan

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Getting Started with Mac OS X

2012-03-07 Thread Tom Evans
On Wed, Mar 7, 2012 at 2:43 PM, Clark  wrote:
> I am having a similar issue, so I tried the $ pip uninstall django,
> but I got a "IOError: [Errno 13] Permission denied"
>
> Advice?
>
> Thanks.
>

You should have started a new thread for your new error. The error
here was that the new user was typing shell commands into a python
prompt - is that what you are doing?

The error that you have shown means that pip tried to access (read or
delete) a file to which it did not have access. That could happen for
any number of reasons, but most likely you installed django as root
and are trying to uninstall it as a regular user.

Of course, that is just speculation, as you have not shown what
happened, or what your original error was that made you think "I know,
a reinstall of Django will fix everything".

Cheers

Tom

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



Re: Getting Started with Mac OS X

2012-03-07 Thread Clark
I am having a similar issue, so I tried the $ pip uninstall django,
but I got a "IOError: [Errno 13] Permission denied"

Advice?

Thanks.

On Feb 28, 2:08 am, Praveen Rachabattuni 
wrote:
> Hi,
>
> I am using on Mac OS X Lion and its working pretty well.
> Seems there is something wrong with your django installation, try
> reinstalling
>
> $ pip uninstall django
> $ pip install django
>
> Hope that helps.
>
> Regards,
> Praveen R
>
>
>
>
>
>
>
> On Tuesday, 28 February 2012 06:06:21 UTC+5:30, JChlipala wrote:
>
> > Hello,
>
> > I am a Django beginner, and am trying to get Django set up in Mac OS
> > X.  I am going through the tutorial, but getting stuck very early
> > (essentially at the beginning).  I have installed Python and Django.
> > The next instruction is to enter the command "django-admin.py
> > startproject mysite".  When I do this, I get the following error:
>
> > File "", line 1
> > django-admin.py startproject mysite
> >                                         ^
>
> > SyntaxError:  invalid syntax
>
> > Does anybody know why I am getting this error?  The tutorial has a
> > note for Mac OS X users explaining what to do if you get a "permission
> > denied" error, but that is obviously not what is happening to me.
>
> > Thank you for any 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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Problems getting started

2012-03-07 Thread Clark
After installing Django I am attempting to start a new project.  After
creating a directory for this, I tried using the command: "django-
admin.py startproject mysite".

but I'm getting the message "-bash: django-admin.py: command not found
".

So, I've tried running this:

"sudo ln -s library/python/2.6/site-packages/django/bin/django-
admin.py /usr/local/bin/django-admin.py" in which i get "file exists"
and I still get the same problem when running the startproject.

Only other piece of info is that during installation I had a "error: /
usr/local/bin/django-admin.py: No such file or directory".  But I can
cd into that directory and see the django-admin.py file.

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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Why on_delete attribute is not available on GenericForeignKey?

2012-03-07 Thread Marc Aymerich
The django docs says:
Unlike ForeignKey, GenericForeignKey does not accept an on_delete
argument to customize this behavior; if desired, you can avoid the
cascade-deletion simply by not using GenericRelation, and alternate
behavior can be provided via the pre_delete signal.

Does anyone knows why? I mean, is it for some conceptual/technical
reason that makes it impractical to implement or is it because nobody
put efforts to make it happen? Or maybe GFK are not so well integrated
with the ORM and as soon as they become integrated, then this feature
will come for free?

Thanks!
-- 
Marc

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: serialization in Django

2012-03-07 Thread Rafael Durán Castañeda

On 03/06/2012 09:52 PM, shiji bijo wrote:

ok I have removed the json.dumps() now the view is
def do_GET(self, offset):
data=get_object_or_404(NewAuction,pk=offset)
context=serializers.serialize("json",[data])
return render_to_response("index.html",{"context":context})

 and my index.html is

{% extends 'base.html' %}

{% block contentblock %}

{{ context }}

{% endblock %}

and it is printing like

[{"pk": 5, "model": "Auction.newauction", "fields": {"username": 1, 
"category": "furniture", "description": "Made of Wood", "end_date": 
"2012-05-01 11:00:00", "start_price": "100", "title": "Table", 
"start_date": "2012-03-04 11:24:11"}}]




But how I can iterate the fields in html. please help me
--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.
You are trying to display a json object as html I think this won't work 
(I'm not a django expert). If using jsonn is a must, I would put the 
context variable from your template into a hidden div or a CDATA or 
whatever not displayed, and then you can use javascript when the 
document is loaded. Retrieve the element, parse the data as json and in 
creating the DOM elements you need should be trivial, specially if you 
use jQuery or some other javascript framework.


HTH

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django hgwebdir

2012-03-07 Thread Denis Darii
using django? hmmm...

you can browse your current repo via http on port 8000 by launching:

$ hg se

or:

$ hg se -n "Your repo"

On Wed, Mar 7, 2012 at 1:39 PM, siva <85s...@gmail.com> wrote:

>
>
> Is it possible can we see hg repository using 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
This e-mail and any file transmitted with it is intended only for the
person or entity to which is addressed and may contain information that is
privileged, confidential or otherwise protected from disclosure. Copying,
dissemination or use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please notify the sender immediately by return e-mail,
delete this communication and destroy all copies.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Live search

2012-03-07 Thread Karen Tracey
On Mon, Mar 5, 2012 at 11:25 AM, larry.mart...@gmail.com
 wrote:
> I'm fairly new to django, still working on my first project.
>
> I have a page with some selection fields and a button. The user clicks
> the button, I run a query, and display the result set on the page.
> Works fine.
>
> Now I was to add a live search field to allow the user to further
> winnow down the result set. As they type in this field, the displayed
> result set will be filtered and re-displayed. But I can't figure out
> how to return control to my code as they type in that field. I assume
> I'll have to write some javascript code to get the events and collect
> the entered text, but how do I then pass that to my python code that
> would have the result set available to it? Or am I thinking about this
> wrong - do I have to do it all in javascript?
>

Further narrowing down the set you've already fetched would most
easily be done just with javascript. If you don't need any additional
data from the server then going back to the server for further
processing just complicates things.

Karen
-- 
http://tracey.org/kmt/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django hgwebdir

2012-03-07 Thread siva


Is it possible can we see hg repository using 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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



User missing after login

2012-03-07 Thread Juan Carlos
Hello everybody!

I am try to add registration in my django site., I am using
django.contrib.auth.views.login via django-registration and I have set
the next="/home_page/" param in the login form. The view asociated to /
home_page/ is excuted, its return looks like this:

return render_to_response('myapp/shop_list.html',
{'shop': entry_list,},
context_instance=RequestContext(request))

I didnt render any other template between login and this view but,
while debugging, I've realized that the User is not in the request
before this return so the template recieves an AnonymousUser and
user.is_authenticated() returns False

The user is in the DDBB and the password is correct. Cookies are
enabled for Firefox and Chrome. How can I get the logged User at this
point?

Here is some information about my app that may be helpful:

settings.py
===

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'myapp',
'registration',
'django.contrib.admin',
)

login.html
==

{% block maincontent %}
{% csrf_token %}
{{form.as_p}}



{% endblock %}

link to login
=

Login

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Problems creating django project in Windows 7

2012-03-07 Thread Mika
Hi,
I uninstalled and reinstalled django to see if that would solve
things, but I still can't create a project. Here are the steps I'm
taking:

1) Made sure the correct path was set so that the command prompt can
find the django-admin.py file. Here's the path I set to locate the
appropriate folder:  %SystemRoot%\system32;%SystemRoot%;%SystemRoot%
\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:
\Python26\;C:\Python26\Scripts

2) Went into the command prompt and typed in django-admin.py. It
didn't automatically show me any of the available commands as I
presume it should have, but it didn't generate any error message
either.

3) Typed in django-admin.py startproject mysite. I assumed I would
then be able to go find the newly created mysite folder in my home
directory because that's where it was set to start the project in the
prompt

4) Went into my user directory(C:\Users\Mika) to find mysite folder,
but it wasn't there. I'm not getting any error messages at all either
in the command prompt, so I'm not sure what's going on. Please advise.

thnx

Mika

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template filters and translations to russian language

2012-03-07 Thread Denis Darii
Try to change also the language of your browser, this because you have
LANGUAGES = (('ru', 'Russian'), ('en_US', 'English'))

and probably in your browser is set EN.

Or force it to RU:

from django.utils.translation import activate
activate('ru')


On Wed, Mar 7, 2012 at 12:20 PM, Tom Evans  wrote:

> On Wed, Mar 7, 2012 at 9:38 AM, filias  wrote:
> > Hi,
> >
> > I am developing a website in russian and the original is in english. We
> are
> > using the po file to translate the strings.
> >
> > My problem now is that when I use template filters, for example date or
> > localnaturalday the translations do not appear. Everything appears in
> > english.
> > However, if I change the LANGUAGE_CODE from 'ru' to 'de_DE' everything
> > appears correctly in german.
> >
> > My settings are:
> >
> > LANGUAGES = (('ru', 'Russian'), ('en_US', 'English'))
> > LANGUAGE_CODE = 'ru'
> >
> > What am I missing here?
> >
> > Thanks for the help.
>
> I think you are missing this:
>
>
> https://docs.djangoproject.com/en/1.3/topics/i18n/localization/#locale-restrictions
>
> Although it looks like Django 1.3 has a ru translation, so I'm not
> convinced..
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
This e-mail and any file transmitted with it is intended only for the
person or entity to which is addressed and may contain information that is
privileged, confidential or otherwise protected from disclosure. Copying,
dissemination or use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please notify the sender immediately by return e-mail,
delete this communication and destroy all copies.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template filters and translations to russian language

2012-03-07 Thread Tom Evans
On Wed, Mar 7, 2012 at 9:38 AM, filias  wrote:
> Hi,
>
> I am developing a website in russian and the original is in english. We are
> using the po file to translate the strings.
>
> My problem now is that when I use template filters, for example date or
> localnaturalday the translations do not appear. Everything appears in
> english.
> However, if I change the LANGUAGE_CODE from 'ru' to 'de_DE' everything
> appears correctly in german.
>
> My settings are:
>
> LANGUAGES = (('ru', 'Russian'), ('en_US', 'English'))
> LANGUAGE_CODE = 'ru'
>
> What am I missing here?
>
> Thanks for the help.

I think you are missing this:

https://docs.djangoproject.com/en/1.3/topics/i18n/localization/#locale-restrictions

Although it looks like Django 1.3 has a ru translation, so I'm not convinced..

Cheers

Tom

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



Template filters and translations to russian language

2012-03-07 Thread filias
Hi,

I am developing a website in russian and the original is in english. We are 
using the po file to translate the strings.

My problem now is that when I use template filters, for example date or 
localnaturalday the translations do not appear. Everything appears in 
english.
However, if I change the LANGUAGE_CODE from 'ru' to 'de_DE' everything 
appears correctly in german.

My settings are:

LANGUAGES = (('ru', 'Russian'), ('en_US', 'English'))
LANGUAGE_CODE = 'ru'

What am I missing here?

Thanks for the help.

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