Re: Reverse Lookup Failure on password change/reset views

2013-07-27 Thread Peter
Yep, that fixed it.  Thanks.

I still think it's wrong of django not to find it by view name though...


> Probably because you've included it under a namespace, so Django would 
> need to look for it as "registration:whatever". There's no need to use the 
> namespace in the include call.
> --
> DR. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




How to Create an Auto Incrementing Integer Field

2013-07-27 Thread Gabriel - Iulian Dumbrava
I ended up using a stored procedure for something similar, triggered on after 
insert.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: .filter() and .exclude() don't add up

2013-07-27 Thread Daniele Procida
On Fri, Jul 26, 2013, Bill Freeman  wrote:

>You really should figure out which record isn't showing up in either sub
>case and look at it in detail to see if NULLs are involved before you spend
>time trying to fix a problem that you don't have.
>
>You could, for example collect all the ids from the several queries into
>python sets, union the sub queries, and take the difference of that from
>the total query.

Thanks, after a bit I got hold of the field=Null items, which were appearing 
unexpectedly in an earlier queryset.

Danie

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: error

2013-07-27 Thread Dobry Dobrev
If it is on windows you may need to do python.exe manage.py or even 
c:\Python27\python.exe manage.py

-Dd

"Mike Dewhirst"  wrote in message news:51f31f30.60...@dewhirst.com.au...

On 27/07/2013 5:10am, veda av wrote:

manage.py not recognized as an internal or external command
why do we get this error


manage.py isn't there. Or if it is there it isn't on the path. Did you
cut any corners during installation?



--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to django-users+unsubscr...@googlegroups.com.

To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django.contrib.auth and username's field size

2013-07-27 Thread Ivan Voras
Thanks, everyone!

While I'm here: is there a way to create additional db objects in the
syncdb phase? Specifically, I'd like to create some database VIEWs as
a means of avoding using raw queries in my code. Ideally, I would like
a way of specifying my own SQL which creates a Model's database object
(so I can do a CREATE VIEW instead of CREATE TABLE), or something like
that.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




script folder

2013-07-27 Thread Oliver
I'm running Windows 8.1 and following this tutorial 
http://www.youtube.com/watch?v=NqNNuXwi0eI

I'm missing the script folder in Python33 folder so I can't find 
django-admin.py.  However, I can start project and it build a project.  I'm 
using djangostack-1.5.1-0.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Error.

2013-07-27 Thread Nigel Legg
I've just set up a new view / url etc, which has quite a bit of processing
behind it.  When I click on the link for it, I get the "Connecting" message
for a few minutes, and then just "A server error has occurred. Please
contact the administrator." appears.  Is this a time out message?
Regards,
Nigel Legg
07914 740972
http://www.trevanianlegg.co.uk
http://twitter.com/nigellegg
http://uk.linkedin.com/in/nigellegg

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error.

2013-07-27 Thread Roberto López López

Could be. But if you don't provide more information (i.e. detailed
information about how you get that error, error stacktrace, logs), you
won't get an answer.


On 07/27/2013 01:21 PM, Nigel Legg wrote:
> I've just set up a new view / url etc, which has quite a bit of
> processing behind it.  When I click on the link for it, I get the
> "Connecting" message for a few minutes, and then just "A server error
> has occurred. Please contact the administrator." appears.  Is this a
> time out message?
> Regards,
> Nigel Legg
> 07914 740972
> http://www.trevanianlegg.co.uk
> http://twitter.com/nigellegg
> http://uk.linkedin.com/in/nigellegg
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  


-- 

Roberto López López
System Developer
Parallab, Uni Computing
+47 55584091

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error.

2013-07-27 Thread Nigel Legg
I have provided all the information I have. That's all there is on the
screen in the browser. There is no trace.
On 27 Jul 2013 12:26, "Roberto López López"  wrote:

>
> Could be. But if you don't provide more information (i.e. detailed
> information about how you get that error, error stacktrace, logs), you
> won't get an answer.
>
>
> On 07/27/2013 01:21 PM, Nigel Legg wrote:
> > I've just set up a new view / url etc, which has quite a bit of
> > processing behind it.  When I click on the link for it, I get the
> > "Connecting" message for a few minutes, and then just "A server error
> > has occurred. Please contact the administrator." appears.  Is this a
> > time out message?
> > Regards,
> > Nigel Legg
> > 07914 740972
> > http://www.trevanianlegg.co.uk
> > http://twitter.com/nigellegg
> > http://uk.linkedin.com/in/nigellegg
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Django users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to django-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
> --
>
> Roberto López López
> System Developer
> Parallab, Uni Computing
> +47 55584091
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error.

2013-07-27 Thread Roberto López López
Well, I suppose you are running that locally or have access to the
server. So show the logs.



On 07/27/2013 01:40 PM, Nigel Legg wrote:
>
> I have provided all the information I have. That's all there is on the
> screen in the browser. There is no trace.
>
> On 27 Jul 2013 12:26, "Roberto López López"  > wrote:
>
>
> Could be. But if you don't provide more information (i.e. detailed
> information about how you get that error, error stacktrace, logs), you
> won't get an answer.
>
>
> On 07/27/2013 01:21 PM, Nigel Legg wrote:
> > I've just set up a new view / url etc, which has quite a bit of
> > processing behind it.  When I click on the link for it, I get the
> > "Connecting" message for a few minutes, and then just "A server
> error
> > has occurred. Please contact the administrator." appears.  Is this a
> > time out message?
> > Regards,
> > Nigel Legg
> > 07914 740972 
> > http://www.trevanianlegg.co.uk
> > http://twitter.com/nigellegg
> > http://uk.linkedin.com/in/nigellegg
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Django users" group.
> > To unsubscribe from this group and stop receiving emails from
> it, send
> > an email to django-users+unsubscr...@googlegroups.com
> .
> > To post to this group, send email to
> django-users@googlegroups.com .
> > Visit this group at http://groups.google.com/group/django-users.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
> --
>
> Roberto López López
> System Developer
> Parallab, Uni Computing
> +47 55584091 
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to django-users+unsubscr...@googlegroups.com
> .
> To post to this group, send email to django-users@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 

Roberto López López
System Developer
Parallab, Uni Computing
+47 55584091

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error.

2013-07-27 Thread Nigel Legg
Running locally on windows7. Where would I find the logs?
On 27 Jul 2013 12:42, "Roberto López López"  wrote:

>  Well, I suppose you are running that locally or have access to the
> server. So show the logs.
>
>
>
> On 07/27/2013 01:40 PM, Nigel Legg wrote:
>
> I have provided all the information I have. That's all there is on the
> screen in the browser. There is no trace.
> On 27 Jul 2013 12:26, "Roberto López López"  wrote:
>
>>
>> Could be. But if you don't provide more information (i.e. detailed
>> information about how you get that error, error stacktrace, logs), you
>> won't get an answer.
>>
>>
>> On 07/27/2013 01:21 PM, Nigel Legg wrote:
>> > I've just set up a new view / url etc, which has quite a bit of
>> > processing behind it.  When I click on the link for it, I get the
>> > "Connecting" message for a few minutes, and then just "A server error
>> > has occurred. Please contact the administrator." appears.  Is this a
>> > time out message?
>> > Regards,
>> > Nigel Legg
>> > 07914 740972
>> > http://www.trevanianlegg.co.uk
>> > http://twitter.com/nigellegg
>> > http://uk.linkedin.com/in/nigellegg
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Django users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an email to django-users+unsubscr...@googlegroups.com.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/django-users.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>>
>> --
>>
>> Roberto López López
>> System Developer
>> Parallab, Uni Computing
>> +47 55584091
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
> --
>
> Roberto López López
> System Developer
> Parallab, Uni Computing+47 55584091
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Learning how to build a web site for my python games and a blog

2013-07-27 Thread Randy Baxley
Is anyone working through The Django Book that would like to form a fb page
just for that or knows of a good tutorial where questions will get answers?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: .filter() and .exclude() don't add up

2013-07-27 Thread Daniele Procida
On Fri, Jul 26, 2013, Steve McConville  wrote:

>> So, if one of the fields can be Null, then *neither*:
>>
>> queryset.filter(field=value)
>>
>> queryset.exclude(field=value)
>>
>> will match a record where it's Null?
>
>As I understand it, this is correct - it's certainly the way SQL was designed.
>
>> In that case, is there a better - more reliable - way than using
>both .filter() and .exclude() with the same terms to split a queryset
>into all those items that match a filter, and all those that don't?
>
>As well as doing the queries above, you can get the nulls by doing
>
>queryset.filter(field__isnull=True)

I meant is there a more general way of doing something like:

red_things = queryset.filter(colour="red") # get red things

non_red_things = queryset - red_things # get all other things

Maybe this simply isn't possible in SQL.

Daniele

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Error.

2013-07-27 Thread Phil
How did you start your server? Using a command line such as "python 
manage.py runserver"? Or through your IDE (PyCharm, Eclipse, etc...)? 
Somewhere you mush have a window showing this kind of information:

Validating models...

0 errors found
July 27, 2013 - 12:33:15
Django version 1.5.1, using settings 'foo.settings.local'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Note that if will be slightly different if you are using gunicorn or 
something else. Also, make sure your settings file contains "DEBUG = True".

Regards,
Phil

On Saturday, July 27, 2013 8:45:39 AM UTC-3, Nigel Legg wrote:
>
> Running locally on windows7. Where would I find the logs?
> On 27 Jul 2013 12:42, "Roberto López López" > 
> wrote:
>
>>  Well, I suppose you are running that locally or have access to the 
>> server. So show the logs.
>>
>>
>>
>> On 07/27/2013 01:40 PM, Nigel Legg wrote:
>>  
>> I have provided all the information I have. That's all there is on the 
>> screen in the browser. There is no trace.
>> On 27 Jul 2013 12:26, "Roberto López López" > 
>> wrote:
>>
>>>
>>> Could be. But if you don't provide more information (i.e. detailed
>>> information about how you get that error, error stacktrace, logs), you
>>> won't get an answer.
>>>
>>>
>>> On 07/27/2013 01:21 PM, Nigel Legg wrote:
>>> > I've just set up a new view / url etc, which has quite a bit of
>>> > processing behind it.  When I click on the link for it, I get the
>>> > "Connecting" message for a few minutes, and then just "A server error
>>> > has occurred. Please contact the administrator." appears.  Is this a
>>> > time out message?
>>> > Regards,
>>> > Nigel Legg
>>> > 07914 740972
>>> > http://www.trevanianlegg.co.uk
>>> > http://twitter.com/nigellegg
>>> > http://uk.linkedin.com/in/nigellegg
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups "Django users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an email to django-users...@googlegroups.com .
>>> > To post to this group, send email to 
>>> > django...@googlegroups.com
>>> .
>>> > Visit this group at http://groups.google.com/group/django-users.
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>> >
>>> >
>>>
>>>
>>> --
>>>
>>> Roberto López López
>>> System Developer
>>> Parallab, Uni Computing
>>> +47 55584091
>>>
>>> --
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com .
>>> To post to this group, send email to django...@googlegroups.com
>>> .
>>> Visit this group at http://groups.google.com/group/django-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>>
>> -- 
>>
>> Roberto López López
>> System Developer
>> Parallab, Uni Computing+47 55584091
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Advanced Tutorial (how to write reusable app), last step does not work

2013-07-27 Thread Christian Erhardt
Django is using a coding "style" called covention over configuration. That 
means that you don't have to configure every bit of your application instead a 
convention is used to determine where you have to place stuff so django finds 
and uses it. For the beginner it seems like django is using some sort of magic 
to connect erlverything together.
In your case, having read the tutorial a long time ago, you surely created a 
View class that is derived from the ListView base class. The convention here is 
that you create a template called _list.html. If you have a file 
with this name, the listview will use it for rendering. It seems the creation 
of this file is missing in the tutorial. But it is pretty straight forward if 
you look at the documentation of the listview base class.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




ImportError: No module named django.core.management

2013-07-27 Thread vinoth job
i am working with someones source code .i getting errors in the initial
steps .i followed  the installation instructions .and they instructed to
create the virtual environment .After i setted the virtualenv  i installed
all requirements given in the requirements.txt  .when i running this
initial command

 python manage.py syncdb

Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

 now what can i do.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ImportError: No module named django.core.management

2013-07-27 Thread Nevio Vesic
My first guess is that django is missing.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: .filter() and .exclude() don't add up

2013-07-27 Thread Steve McConville
Perhaps I'm not sure exactly what you mean by "more general", but I
was recommending something like

red_things = queryset.filter(Q(color="red"))
non_red_things = queryset.filter(~Q(color="red") | Q(color__isnull=True)

This will produce SQL like

SELECT * FROM queryset WHERE color IS 'red';
SELECT * FROM queryset WHERE color IS NOT 'red' OR color IS NULL;

The set non_red_things will be the complement of red_things.

-- 
steve
http://stevemcconville.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Can I only have one "get_queryset" per Viewpage?

2013-07-27 Thread Pepsodent Cola
Thank you IT-India now I understand what all the programmers are talking 
about. :)
http://agiliq.com/blog/2012/06/understanding-args-and-kwargs/

*[Problem SOLVED]*


On Monday, July 22, 2013 11:51:48 AM UTC+2, Pepsodent Cola wrote:
>
> Hi,
>
> Can I only have one "get_queryset" for each Viewpage?
> If I wanted to add another database list on the same Viewpage how would 
> that code look like for my Django *views.py* file?
>
> Example:
> https://docs.djangoproject.com/en/1.5/intro/tutorial04/#amend-views
>
> from polls.models import Choice, Poll
>
> class IndexView(generic.ListView):
> template_name = 'polls/index.html'
> *context_object_name = 'latest_poll_list'*
>
> *def get_queryset(self):*
> """Return the last five published polls."""
> return Poll.objects.order_by('-pub_date')[:5]
>
>
>
> I mean will "context_object_name" be able to separate between several 
> "get_queryset(self)"?
> Because I want to have several different poll_lists on the same Viewpage.
>
> context_object_name = 'latest_poll_list'
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django.contrib.auth and username's field size

2013-07-27 Thread Russell Keith-Magee
On Sat, Jul 27, 2013 at 5:56 PM, Ivan Voras  wrote:

> Thanks, everyone!
>
> While I'm here: is there a way to create additional db objects in the
> syncdb phase? Specifically, I'd like to create some database VIEWs as
> a means of avoding using raw queries in my code. Ideally, I would like
> a way of specifying my own SQL which creates a Model's database object
> (so I can do a CREATE VIEW instead of CREATE TABLE), or something like
> that.
>
> You have two options.

Firstly, you can use Django's ability to invoke raw SQL as part of the
syncdb process:

https://docs.djangoproject.com/en/1.5/howto/initial-data/#providing-initial-sql-data

Although the examples in that documentation describe using INSERT
statements, you can issue any SQL statement you want.

Secondly, you could use South.

http://south.aeracode.org

South is a migration framework for Django -- it allows you to manage
changes in database schema, but you can also include creation of additional
views, indexes, etc as part of that process.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ImportError: No module named django.core.management

2013-07-27 Thread René Fleschenberg
Hi,

vinoth job:
>  python manage.py syncdb
> 
> Traceback (most recent call last):
>   File "manage.py", line 8, in 
> from django.core.management import execute_from_command_line
> ImportError: No module named django.core.management

This error can also occur if the virtualenv is not actviated. Did you run 
``source bin/activate`` (or the appropriate ``workon`` command, in case you're 
using virtualenv-wrapper)? Does your shell prompt show the name of the 
virtualenv?

If the virtualenv is activated: is Django really installed in the virtualenv? 
What's the output of ``pip freeze|grep -i django`` (with the virtualenv being 
active)?


-- 
René Fleschenberg

Am Stadtgarten 28, 45276 Essen, Germany
Phone: +49 1577 170 7363
E-Mail: r...@fleschenberg.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




tinymce

2013-07-27 Thread Karl Arunachal
Hello,
I am not able to use the tinymce editor in my flat pages.
My tinymce is in this dir:
C:\Users\Kakar\Downloads\Compressed\tinymce\js\tinymce\tinymce.min.js

And in my template dir i have another admin folder for 'change_form.html',
just below this line:



i have added this line for tiymce:



tinyMCE.init({
mode: "textareas",
theme: "simple"
});


In my urls.py, i have added:

(r'^tiny_mce/(?P.*)$', 'django.views.static.serve',
{'document_root':'C:/Users/Kakar/Downloads/Compressed/tinymce/js/tinymce'}),

Please, point me out, where am doing wrong. I am learning from a book
'Practical Django Projects'.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




How the authentication takes place at the backend in django?

2013-07-27 Thread Viji Venkatesan
Hi,


If we are giving credentials in login form as username and password,how the 
process takes place to check with database at the backend ,whether the user 
is authenticated or not.?
just make clear of itplease give detail explanation for it.

Thank you.!!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




flatpages-tinymce

2013-07-27 Thread Karl Arunachal
Hello,
I am trying to use tinymce in the flat pages. But i just can't show it up
in my admin. Please help me out where am going wrong.

The javascript file is in:

C:\Users\Kakar\web\cms\static\js\tinymce\tinymce.min.js

urls.py:

(r'^tiny_mce/(?P.*)$', 'django.views.static.serve', { 'document_root':
'C:/Users/Kakar/web/cms/static/js/tinymce' }),

In my templates dir i have another admin folder, which have the
change_form.html, and right after {{ media }}:



tinyMCE.init({
mode: "textareas",
theme: "simple"
});


Please help me out. Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.