Re: Django Development environment

2011-08-27 Thread Sam Walters
Ok lets see. At the moment:

Editor:
vim + http://code.google.com/p/trespams-vim/
sometimes gedit or kate

Editor console *this has been really useful:
yakuake

Debug client-side:
firebug, yslow, a windows computer with ie7

Version system:
git

OS:
develop on apto-sid (debian unstable), deploy on debian or some sort
of redhat style os.

DB (depends on project):
mysql, postgres+spatial, sql-lite

Webserver:
apache 1.3, apache 2.2, nginx

Method of deployment:
Fcgi or wsgi

VIrtualisation:
vserver guests

Its not perfect but iv'e got used it.
Also lots of different extras i put into projects like south or
reverse-select, jinja but that depends on the project.

Interestingly on the three GUI systems i use kde, xfce and gnome as
most of my stuff is done in yakuake.

cheers
sam_w



On Sun, Aug 28, 2011 at 4:33 AM, Steven Elliott Jr
 wrote:
>
> On Aug 27, 2011, at 11:17 AM, Simon Connah  wrote:
>
>>
>> On 27 Aug 2011, at 04:44, Steven Elliott Jr wrote:
>>
 On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote:
> Mercurial or Git (depends on whether the project is open source or not)
>>>
>>> Kenneth,
>>>
>>> I think he means whether or not the repository will be public or private. 
>>> Github (git) does not offer private repos unless you pay whereas bitbucket 
>>> (mercurial) gives you 5 private ones for free as well as the option for 
>>> creating public ones. I personally am a big BitBucket fan as I find it much 
>>> much easier to manage and also a bit faster.
>>>
>>> Best,
>>> Steve
>>
>> Correct. Although Bitbucket offers unlimited private repos. It just limits 
>> you to 5 users...
>
> Right, sorry that's what I was going for but I brain spasm'd on the iPhone. 
> Bitbucket has gotten a lot better since Atlassian took it over.
>
> --
> 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: Error was: No module named io

2011-08-27 Thread sreekanth
Hi,

Please check the path , as you changed to a new server and also check the
permissions.

On Sun, Aug 28, 2011 at 6:29 AM, CrabbyPete  wrote:

> I developed my code with python 2.6 and django 1.3. Now that I am
> deploying it on a dreamhost server the python is version 2.5 and I get
> the error above. Is there a work around. Do I need to upgrade python?
>
> --
> 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: Django 1.3 logging not working as I'd expect

2011-08-27 Thread Gelonida N
On 08/28/2011 03:43 AM, Scott Danzig wrote:
> 
> Okay.. update.. it does seem to work right, even without forcing the
> initialization as you suggested.. which is a relief.. Was losing my mind
> (maybe Django 1.3 doesn't require the settings.LOGGING?)  While testing with
> prints, I realized the view function I thought should be called wasn't
> called until AFTER login..  Oops :)
> 
> Thanks all.

Just for your info.

Forcing the import of 'settings.py' with the two lines, that I suggested
might be required in case, that your module might be
THE module using as very first module settings.py.

This is probaly NEVER the case when running in a 'normal' environment.

However for debugging I import  some of my modules from a command line
script, which just sets
sys.path and
os.environ['DJANGO_SETTINGS_MODULE']

In this case you had to force the evaluation of settings.py before
creating a logger.



> 
> 
> Gelonida N wrote:
>>
>> On 08/28/2011 12:00 AM, Scott Danzig wrote:
>>>
>>>
>>> Gelonida N wrote:
 So before your three lines:
> import logging
> logger = logging.getLogger('otherlogger')
> logger.warn('hello')
 you had to be sure, that the django settings and thus the logging
 configuration has really been completed.

 You could for example add following two lines before:
> from django.conf import settings
> LOGGING = settings.LOGGING # force import

 The second line is needed, as the first line is a 'lazy import' and will
 only read the settings and configure logging  when you access the first
 time a element of settings.
 I just used settings.LOGGING, as it should always exist, when you try to
 log.

>>>
>>> Thanks Gelonida.. tried your suggestion and added those two lines before
>>> my
>>> import logging ... unfortunately no change.  Perhaps it's not
>>> straightforward.  Sounds like it wasn't obvious to you either.
>>
>> That's weird.
>> This works fine for me.
>>
>>
>> Just some more things to test:
>>
>>
>> Is ee, that you didn't add a root logger in your
>> log config.
>>
>> you could add following two handlers.
>>
>>
>> 'loggers': {
>> # root loggers
>> '': {
>> 'handlers': ['console'],
>> 'level': 'WARNING', # or 'DEBUG'
>> 'propagate': True,
>> },
>> # not sure if this is really useful
>> 'root': {
>> 'handlers': ['console'],
>> 'level': 'WARNING', # or 'DEBUG'
>> 'propagate': True,
>> },
>>
>>
>>
>> If this doesn't help you could add some print statements to be sure,
>> that your settings file is really read.
>>
>>
>>
>> You could add a print statement after  the assignment of
>> LOGGING in settings.py
>>
>> LOGGING={ .. ..}
>> print "LOGGING VARIABLE IS SET NOW"
>>
>>
>>
>> and in your file.
>>
>> print "CHECKPOINT 1"
>> from django.conf import settings
>> print "CHECKPOINT 2"
>> LOGGING = settings.LOGGING # force import
>> print "CHECKPOINT 3"
>> import logging
>> logger = logging.getLogger('otherlogger')
>> print "CHECKPOINT 4"
>> logger.warn('hello')
>> print "CHECKPOINT 5"
>>
>> What do you get as output?
>>
>>
>>
>>
>> -- 
>> 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: Django 1.3 logging not working as I'd expect

2011-08-27 Thread Scott Danzig

Okay.. update.. it does seem to work right, even without forcing the
initialization as you suggested.. which is a relief.. Was losing my mind
(maybe Django 1.3 doesn't require the settings.LOGGING?)  While testing with
prints, I realized the view function I thought should be called wasn't
called until AFTER login..  Oops :)

Thanks all.


Gelonida N wrote:
> 
> On 08/28/2011 12:00 AM, Scott Danzig wrote:
>> 
>> 
>> Gelonida N wrote:
>>> So before your three lines:
 import logging
 logger = logging.getLogger('otherlogger')
 logger.warn('hello')
>>> you had to be sure, that the django settings and thus the logging
>>> configuration has really been completed.
>>>
>>> You could for example add following two lines before:
 from django.conf import settings
 LOGGING = settings.LOGGING # force import
>>>
>>> The second line is needed, as the first line is a 'lazy import' and will
>>> only read the settings and configure logging  when you access the first
>>> time a element of settings.
>>> I just used settings.LOGGING, as it should always exist, when you try to
>>> log.
>>>
>> 
>> Thanks Gelonida.. tried your suggestion and added those two lines before
>> my
>> import logging ... unfortunately no change.  Perhaps it's not
>> straightforward.  Sounds like it wasn't obvious to you either.
> 
> That's weird.
> This works fine for me.
> 
> 
> Just some more things to test:
> 
> 
> Is ee, that you didn't add a root logger in your
> log config.
> 
> you could add following two handlers.
> 
> 
> 'loggers': {
> # root loggers
> '': {
> 'handlers': ['console'],
> 'level': 'WARNING', # or 'DEBUG'
> 'propagate': True,
> },
> # not sure if this is really useful
> 'root': {
> 'handlers': ['console'],
> 'level': 'WARNING', # or 'DEBUG'
> 'propagate': True,
> },
> 
> 
> 
> If this doesn't help you could add some print statements to be sure,
> that your settings file is really read.
> 
> 
> 
> You could add a print statement after  the assignment of
> LOGGING in settings.py
> 
> LOGGING={ .. ..}
> print "LOGGING VARIABLE IS SET NOW"
> 
> 
> 
> and in your file.
> 
> print "CHECKPOINT 1"
> from django.conf import settings
> print "CHECKPOINT 2"
> LOGGING = settings.LOGGING # force import
> print "CHECKPOINT 3"
> import logging
> logger = logging.getLogger('otherlogger')
> print "CHECKPOINT 4"
> logger.warn('hello')
> print "CHECKPOINT 5"
> 
> What do you get as output?
> 
> 
> 
> 
> -- 
> 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.
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Django-1.3-logging-not-working-as-I%27d-expect-tp32299898p32349771.html
Sent from the django-users mailing list archive at Nabble.com.

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



Re: ipython 0.11 with django 1.3 /in virtualenv

2011-08-27 Thread Gelonida N
Hi Shawn,

On 08/28/2011 02:49 AM, Shawn Milochik wrote:
> If iPython is installed it should be used automatically in Django's
> manage.py shell.
> 
Apologies. I think I didn't express myself well enough.
ipython is being used bydjango.

What I just don't understand is why ipython does not import my
customisations if called via './manage.py shell'?

What I wanted to do is configuring ipython such, that it imports already
some of my application libraries when starting the shell.

This would accelerate my debugging activities.


With older versions of ipython Imanaged to do this via some code in
ipythonrc.

However since ipython 0.11 the way, that once customizes iptyhon has
changed.

Now I have to some python files like
~/.config/ipython/profile_default/ipython_config.py,
which seem to be loaded when running ipython,
but which don't seem to be loaded when running ./manage.py shell



> If it's not working and works when you run iPython directly, the most
> likely case is that you're running two different Python environments and
> one has iPython installed and the other doesn't.

I have two different ipython versions on my system:
an older one installed by my distro
and 0.11 in the same virtualenv in which I installed django.

I am rather sure though, that ./manage.py shell picks up the correct one.

If I type
dir()
in ipython, then I see the symbol 'get_ipython' which does not exist in
my old ipython version.


> 
> You mention virtualenv in the subject line but not in the question. Try
> running 'pip install ipython' in your virtualenv.
> 
> 
Yes I mentioned it in the title just in case.
I am rather sure though, that I pick up the correct ipython version



-- 
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 is settings.py executed twice?

2011-08-27 Thread Gelonida N
Hi,

This is also one of the things (I just started using django, so I have
still quite many questions) , that I don't really understand.

It doesn't break anything and I am not stuck.
I'd just like to understand.



$ django-admin startproject settings_twice
$ echo 'print "SOMETEXT"' >> settings.py
$ ./manage.py shell

The output, that I get is
SOMETEXT
SOMETEXT

In [1]:


So it seems settings.py is executed twice.

I would have expected, that settings.py is imported multiple times.
What I thought though is, that a module is normally only executed once
during the first import
and that subsequent imports do not execute settings.py anymore.

It seems even, that all modules imported by settings.py are executed twice.

Is ./manage.py shell starting two processes??

If yes, why wasn't settings.py imported before 'forking' ?

Thanks a lot in advance





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



Error was: No module named io

2011-08-27 Thread CrabbyPete
I developed my code with python 2.6 and django 1.3. Now that I am
deploying it on a dreamhost server the python is version 2.5 and I get
the error above. Is there a work around. Do I need to upgrade python?

-- 
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: ipython 0.11 with django 1.3 /in virtualenv

2011-08-27 Thread Shawn Milochik
If iPython is installed it should be used automatically in Django's 
manage.py shell.


If it's not working and works when you run iPython directly, the most 
likely case is that you're running two different Python environments and 
one has iPython installed and the other doesn't.


You mention virtualenv in the subject line but not in the question. Try 
running 'pip install ipython' in your virtualenv.



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



ipython 0.11 with django 1.3 /in virtualenv

2011-08-27 Thread Gelonida N
Hi,


I am having issues with ipythin when I run

./manage.py shell
then ipython_config.py doesn't seem to be executed.

On the other hand if I run ipython directly the file is imported.

Am I missing something?


My setup:

$ find ~/.config/ipython/
/home/gelonida/.config/ipython/
/home/gelonida/.config/ipython/profile_default
/home/gelonida/.config/ipython/profile_default/log
/home/gelonida/.config/ipython/profile_default/ipython_config.py
/home/gelonida/.config/ipython/profile_default/history.sqlite
/home/gelonida/.config/ipython/profile_default/security
/home/gelonida/.config/ipython/profile_default/pid
/home/gelonida/.config/ipython/profile_default/db
/home/gelonida/.config/ipython/profile_default/db/dhist
/home/gelonida/.config/ipython/README

The contents of
/home/gelonida/.config/ipython/profile_default/ipython_config.py

The first few lines are:
import time
print (("HELLO "*17)+"\n") * 20
time.sleep(2)

I added the sleep statement in case, that the print statement woudl have
been overwritten.

If I start ipython,
then I see the HELLO text and a delay of 2 seconds happens


with

./manage.py shell

I don't see the output.

I n order to be sure, that there's nothing weird in my django project I
tested this also with an unmodified django project, which I just created
with.

In order to reproduce just run once
create a
~/.config/ipython/profile_default/ipython_config.py
with a print statement

and start
ipython
# here you should see print statements of ./manage.py shell


then do:


django-admin startproject tstipython
cd tstipython
./manage.py shell
# here you do not see print statements of ./manage.py shell

Thanks in advance for any explanations.
I would really like to understand what exactly happens.






-- 
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 1.3 logging not working as I'd expect

2011-08-27 Thread Gelonida N
On 08/28/2011 12:00 AM, Scott Danzig wrote:
> 
> 
> Gelonida N wrote:
>> So before your three lines:
>>> import logging
>>> logger = logging.getLogger('otherlogger')
>>> logger.warn('hello')
>> you had to be sure, that the django settings and thus the logging
>> configuration has really been completed.
>>
>> You could for example add following two lines before:
>>> from django.conf import settings
>>> LOGGING = settings.LOGGING # force import
>>
>> The second line is needed, as the first line is a 'lazy import' and will
>> only read the settings and configure logging  when you access the first
>> time a element of settings.
>> I just used settings.LOGGING, as it should always exist, when you try to
>> log.
>>
> 
> Thanks Gelonida.. tried your suggestion and added those two lines before my
> import logging ... unfortunately no change.  Perhaps it's not
> straightforward.  Sounds like it wasn't obvious to you either.

That's weird.
This works fine for me.


Just some more things to test:


Is ee, that you didn't add a root logger in your
log config.

you could add following two handlers.


'loggers': {
# root loggers
'': {
'handlers': ['console'],
'level': 'WARNING', # or 'DEBUG'
'propagate': True,
},
# not sure if this is really useful
'root': {
'handlers': ['console'],
'level': 'WARNING', # or 'DEBUG'
'propagate': True,
},



If this doesn't help you could add some print statements to be sure,
that your settings file is really read.



You could add a print statement after  the assignment of
LOGGING in settings.py

LOGGING={ .. ..}
print "LOGGING VARIABLE IS SET NOW"



and in your file.

print "CHECKPOINT 1"
from django.conf import settings
print "CHECKPOINT 2"
LOGGING = settings.LOGGING # force import
print "CHECKPOINT 3"
import logging
logger = logging.getLogger('otherlogger')
print "CHECKPOINT 4"
logger.warn('hello')
print "CHECKPOINT 5"

What do you get as output?




-- 
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: Combining queries? A "join" in Python?

2011-08-27 Thread Matteius
Since you are combining two sets of different objects you'll want
Gelonida's response.  Additionally, Use Q to create more logically
advanced queries.  I find your language difficult to gather what query
you are looking for exactly, but here is an example of what I think
you might mean:

from django.db.models import Q

the_Ds = D.objects.all().filter(b=B)
the_Es = E.objects.all().filter(c=C)

combined = the_Ds | the_Es

# Other Example (an & requires both constraints to be met, and an Or
will include the set of all matches.
the_As = A.objects.all().filter(Q(constraint1) & Q(constraint2))
the_Bs = B.objects.all().filter(Q(constraint1) | Q(constraint2))

-Matteius

Don't overlook how powerful this is because Django has Manager classes
so you can make your constraints refer to both local properties and
foreign key constraints as well as properties within the foreign key
lookups.  You may find that you wish to edit your schema relationship,
perhaps by pointing backwards or reversing the relationship.  It is
hard to say with the categorical A, B, C, D example, but hope this
helps and Good Luck!


On Aug 27, 3:47 pm, Gelonida N  wrote:
> On 08/27/2011 11:39 AM, graeme wrote:
>
>
>
> > I have a some models related link this:
>
> > A has a foreign key on B which has a foreign key on C
>
> > I also have D with a foreign key on B, and E with a foreign key of C
>
> > If I do A.filter(**args).select_related() I will get all the As, Bs,
> > and Cs I want.
>
> > How do I get the Ds with a foreign key on a B in my queryset
> > (preferably filtered) and all Es with a foreign key on C (also
> > preferably filtered)
>
> > The best I have been able to come up with is to query for all the  the
> > Ds and Es I want, and combine them with the Bs and Cs in the view.
>
> > I have a similar problem with another site, except that there not
> > every B I want has an A with a foreignkey pointing to it, so I cannot
> > just do select_related on A.
>
> > I am not worried about doing an extra query or two per page. What I
> > want to avoid is doing an extra query for each object in a lengthy
> > list.
>
> You can 'or' two query sets with the '|' operator
>
> so do
> queryset1 = Mymodel.objects.all().filter(...)
> qyeryset2 = Mymodel.objects.all().filter(...)
>
> combined = queryset1 | queryset2

-- 
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 1.3 logging not working as I'd expect

2011-08-27 Thread Scott Danzig


Gelonida N wrote:
> 
> On 08/20/2011 06:51 AM, Scott Danzig wrote:
> You  have to be sure, that logging is configured before actually logging
> anything.
> 
> So before your three lines:
>> import logging
>> logger = logging.getLogger('otherlogger')
>> logger.warn('hello')
> you had to be sure, that the django settings and thus the logging
> configuration has really been completed.
> 
> You could for example add following two lines before:
>> from django.conf import settings
>> LOGGING = settings.LOGGING # force import
> 
> The second line is needed, as the first line is a 'lazy import' and will
> only read the settings and configure logging  when you access the first
> time a element of settings.
> I just used settings.LOGGING, as it should always exist, when you try to
> log.
> 

Thanks Gelonida.. tried your suggestion and added those two lines before my
import logging ... unfortunately no change.  Perhaps it's not
straightforward.  Sounds like it wasn't obvious to you either.
-- 
View this message in context: 
http://old.nabble.com/Django-1.3-logging-not-working-as-I%27d-expect-tp32299898p32349240.html
Sent from the django-users mailing list archive at Nabble.com.

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



Re: Django 1.3 logging not working as I'd expect

2011-08-27 Thread Scott Danzig


bruno desthuilliers-7 wrote:
> 
> On 22 août, 13:27, Reinout van Rees  wrote:
>>
>> Probably all your logging statements are executed right at file import
>> time before the logging is actually configured.
> 
> Using the DictConfig in settings.py, the logger is configured before
> the apps models / views / whatever  are imported.
> 
> @Scott: Are you running the dev server ? If yes, the settings module
> should be imported "only" twice so you may import it directly (ie:
> "import settings") from your app. If yes, replace this with "from
> django.conf import settings", which is the right way to access the
> settings from an app.
> 

@Reinout: Thanks, but yeah, already tried logging from a view function..
didn't work...

@Bruno: Yeah, I am using the dev server.  I have been using from django.conf
import settings within my app to access settings..although unless I do
something like what Gelondia suggested... with the LOGGING =
settings.LOGGING, I'm not sure how the logging normally "invokes" the
settings.  The way I see it, django magically loads the settings at some
point in the background, then when you use the logging, it accesses those
settings, and there's a certain time when these settings become accessible
so this works.  But it's not working like this, so perhaps I'm mistaken.  So
you're saying to replace all instances of "from django.conf import settings"
with just "import settings"?  Or the other way around?  Not sure about what
importing only twice does, and how importing settings more or less affects
this.

Thanks all for answering.
-- 
View this message in context: 
http://old.nabble.com/Django-1.3-logging-not-working-as-I%27d-expect-tp32299898p32349226.html
Sent from the django-users mailing list archive at Nabble.com.

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



Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-08-27 Thread Cal Leeming [Simplicity Media Ltd]
Bloody thing, had to send it directly to the list cos it doesn't have the
option of bulk inviting people. How annoying :X

Anyone who didn't receive the invite email, please let me know.

Cal

On Sat, Aug 27, 2011 at 9:50 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> Nope, we're allowed up to 100 attendees per time slot, and we are at 55 at
> the moment, so feel free to register for both.
>
> On Sat, Aug 27, 2011 at 9:46 PM, william ratcliff <
> william.ratcl...@gmail.com> wrote:
>
>> Any problem if we register for both?
>>
>>
>> On Sat, Aug 27, 2011 at 4:33 PM, Cal Leeming [Simplicity Media Ltd] <
>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>
>>> Hey guys,
>>>
>>> I'm sending out the webcast invitations now (should receive them in about
>>> 10 minutes from GoToMeeting). Last chance to jump on if you haven't already.
>>>
>>> Cal
>>>
>>>
>>> On Sat, Aug 20, 2011 at 12:32 AM, Cal Leeming [Simplicity Media Ltd] <
>>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>>
 Hi all,

 Okay, good news and bad news.

 The bad news, is that the site/project which sparked this webcast to be
 made, has had some legal complications and is being shut down - less than 1
 month after being released :L

 The good news, is that the webcast will still be going ahead.

 For those of you that want to see the site it was related to, it's
 http://www.iliketochan.com .

 The site itself was a complete 4chan archive, dating back to 2010,
 peaking at 50 million posts and 17 million images.

 Particularly sad about this because so much time and effort went into
 the site, but at the same time, it has been a great learning experience
 (both in code and business). So being able to share that on the webcast 
 will
 be of some small comfort :)

 Cal

 On Thu, Aug 11, 2011 at 6:31 PM, Cal Leeming [Simplicity Media Ltd] <
 cal.leem...@simplicitymedialtd.co.uk> wrote:

> Last call on this guys:
>
>
> https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?hl=en_US=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ#gid=0
>
> If you want to register your attendance, please do so now.
>
> Thanks
>
> On Mon, Jul 25, 2011 at 2:00 PM, nicolas HERSOG wrote:
>
>> I won t be able to follow the live session but I can't wait to watch
>> your record on YT.
>>
>> Thx!
>>
>> On Mon, Jul 25, 2011 at 2:42 PM, Cal Leeming [Simplicity Media Ltd] <
>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>
>>> Second call for register your attendance on this webcast, if you
>>> haven't already done so.
>>>
>>> Thanks
>>>
>>> Cal
>>>
>>>
>>> On Tue, Jul 12, 2011 at 2:48 PM, Cal Leeming [Simplicity Media Ltd]
>>>  wrote:
>>>
 Hi all,

 Great response to this, 45 registered votes in total.

 The webcast will take place on Monday 29th August 2011 - (Minimum
 resolution 1920x1080)

 However, because the time zone results are almost split 50/50, I'm
 going to allow users to select from two time slots, if the results are 
 still
 split 50/50, then I'll do both an afternoon and evening session.

 Please use this form to register your place.

 https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?formkey=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ

 Cal

>>>
>>>  --
>>> 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.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this 

Your Webinar Invitation: Join us for "Django site with 40mil+ rows of data"

2011-08-27 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, the damn thing refused to send invitations to all email addresses.
How annoying - so I've had to send to the list directly. Apologies.
   Django site with 40mil+ rows of data1 hour webcast showing
some of the techniques we used to handle large data sets in Django, with
minimal hardware requirements. *Register for a session now by clicking a
date below:*   Mon, Aug 29, 2011 3:00 PM - 5:00 PM
BST   Mon,
Aug 29, 2011 9:00 PM - 11:00 PM
BST  Once
registered you will receive an email confirming your registration
with information you need to join the Webinar.*System Requirements*
PC-based attendees
Required: Windows® 7, Vista, XP or 2003 Server   Macintosh®-based attendees
Required: Mac OS® X 10.5 or newer

-- 
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: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-08-27 Thread Cal Leeming [Simplicity Media Ltd]
Nope, we're allowed up to 100 attendees per time slot, and we are at 55 at
the moment, so feel free to register for both.

On Sat, Aug 27, 2011 at 9:46 PM, william ratcliff <
william.ratcl...@gmail.com> wrote:

> Any problem if we register for both?
>
>
> On Sat, Aug 27, 2011 at 4:33 PM, Cal Leeming [Simplicity Media Ltd] <
> cal.leem...@simplicitymedialtd.co.uk> wrote:
>
>> Hey guys,
>>
>> I'm sending out the webcast invitations now (should receive them in about
>> 10 minutes from GoToMeeting). Last chance to jump on if you haven't already.
>>
>> Cal
>>
>>
>> On Sat, Aug 20, 2011 at 12:32 AM, Cal Leeming [Simplicity Media Ltd] <
>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>
>>> Hi all,
>>>
>>> Okay, good news and bad news.
>>>
>>> The bad news, is that the site/project which sparked this webcast to be
>>> made, has had some legal complications and is being shut down - less than 1
>>> month after being released :L
>>>
>>> The good news, is that the webcast will still be going ahead.
>>>
>>> For those of you that want to see the site it was related to, it's
>>> http://www.iliketochan.com .
>>>
>>> The site itself was a complete 4chan archive, dating back to 2010,
>>> peaking at 50 million posts and 17 million images.
>>>
>>> Particularly sad about this because so much time and effort went into the
>>> site, but at the same time, it has been a great learning experience (both in
>>> code and business). So being able to share that on the webcast will be of
>>> some small comfort :)
>>>
>>> Cal
>>>
>>> On Thu, Aug 11, 2011 at 6:31 PM, Cal Leeming [Simplicity Media Ltd] <
>>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>>
 Last call on this guys:


 https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?hl=en_US=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ#gid=0

 If you want to register your attendance, please do so now.

 Thanks

 On Mon, Jul 25, 2011 at 2:00 PM, nicolas HERSOG wrote:

> I won t be able to follow the live session but I can't wait to watch
> your record on YT.
>
> Thx!
>
> On Mon, Jul 25, 2011 at 2:42 PM, Cal Leeming [Simplicity Media Ltd] <
> cal.leem...@simplicitymedialtd.co.uk> wrote:
>
>> Second call for register your attendance on this webcast, if you
>> haven't already done so.
>>
>> Thanks
>>
>> Cal
>>
>>
>> On Tue, Jul 12, 2011 at 2:48 PM, Cal Leeming [Simplicity Media Ltd] <
>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>
>>> Hi all,
>>>
>>> Great response to this, 45 registered votes in total.
>>>
>>> The webcast will take place on Monday 29th August 2011 - (Minimum
>>> resolution 1920x1080)
>>>
>>> However, because the time zone results are almost split 50/50, I'm
>>> going to allow users to select from two time slots, if the results are 
>>> still
>>> split 50/50, then I'll do both an afternoon and evening session.
>>>
>>> Please use this form to register your place.
>>>
>>> https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?formkey=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ
>>>
>>> Cal
>>>
>>
>>  --
>> 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.
>>
>
>  --
> 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 

Re: Combining queries? A "join" in Python?

2011-08-27 Thread Gelonida N
On 08/27/2011 11:39 AM, graeme wrote:
> I have a some models related link this:
> 
> A has a foreign key on B which has a foreign key on C
> 
> I also have D with a foreign key on B, and E with a foreign key of C
> 
> If I do A.filter(**args).select_related() I will get all the As, Bs,
> and Cs I want.
> 
> How do I get the Ds with a foreign key on a B in my queryset
> (preferably filtered) and all Es with a foreign key on C (also
> preferably filtered)
> 
> The best I have been able to come up with is to query for all the  the
> Ds and Es I want, and combine them with the Bs and Cs in the view.
> 
> I have a similar problem with another site, except that there not
> every B I want has an A with a foreignkey pointing to it, so I cannot
> just do select_related on A.
> 
> I am not worried about doing an extra query or two per page. What I
> want to avoid is doing an extra query for each object in a lengthy
> list.
> 
You can 'or' two query sets with the '|' operator


so do
queryset1 = Mymodel.objects.all().filter(...)
qyeryset2 = Mymodel.objects.all().filter(...)

combined = queryset1 | queryset2

-- 
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: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-08-27 Thread william ratcliff
Any problem if we register for both?

On Sat, Aug 27, 2011 at 4:33 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> Hey guys,
>
> I'm sending out the webcast invitations now (should receive them in about
> 10 minutes from GoToMeeting). Last chance to jump on if you haven't already.
>
> Cal
>
>
> On Sat, Aug 20, 2011 at 12:32 AM, Cal Leeming [Simplicity Media Ltd] <
> cal.leem...@simplicitymedialtd.co.uk> wrote:
>
>> Hi all,
>>
>> Okay, good news and bad news.
>>
>> The bad news, is that the site/project which sparked this webcast to be
>> made, has had some legal complications and is being shut down - less than 1
>> month after being released :L
>>
>> The good news, is that the webcast will still be going ahead.
>>
>> For those of you that want to see the site it was related to, it's
>> http://www.iliketochan.com .
>>
>> The site itself was a complete 4chan archive, dating back to 2010, peaking
>> at 50 million posts and 17 million images.
>>
>> Particularly sad about this because so much time and effort went into the
>> site, but at the same time, it has been a great learning experience (both in
>> code and business). So being able to share that on the webcast will be of
>> some small comfort :)
>>
>> Cal
>>
>> On Thu, Aug 11, 2011 at 6:31 PM, Cal Leeming [Simplicity Media Ltd] <
>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>
>>> Last call on this guys:
>>>
>>>
>>> https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?hl=en_US=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ#gid=0
>>>
>>> If you want to register your attendance, please do so now.
>>>
>>> Thanks
>>>
>>> On Mon, Jul 25, 2011 at 2:00 PM, nicolas HERSOG wrote:
>>>
 I won t be able to follow the live session but I can't wait to watch
 your record on YT.

 Thx!

 On Mon, Jul 25, 2011 at 2:42 PM, Cal Leeming [Simplicity Media Ltd] <
 cal.leem...@simplicitymedialtd.co.uk> wrote:

> Second call for register your attendance on this webcast, if you
> haven't already done so.
>
> Thanks
>
> Cal
>
>
> On Tue, Jul 12, 2011 at 2:48 PM, Cal Leeming [Simplicity Media Ltd] <
> cal.leem...@simplicitymedialtd.co.uk> wrote:
>
>> Hi all,
>>
>> Great response to this, 45 registered votes in total.
>>
>> The webcast will take place on Monday 29th August 2011 - (Minimum
>> resolution 1920x1080)
>>
>> However, because the time zone results are almost split 50/50, I'm
>> going to allow users to select from two time slots, if the results are 
>> still
>> split 50/50, then I'll do both an afternoon and evening session.
>>
>> Please use this form to register your place.
>>
>> https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?formkey=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ
>>
>> Cal
>>
>
>  --
> 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.
>

-- 
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: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-08-27 Thread Cal Leeming [Simplicity Media Ltd]
Hey guys,

I'm sending out the webcast invitations now (should receive them in about 10
minutes from GoToMeeting). Last chance to jump on if you haven't already.

Cal

On Sat, Aug 20, 2011 at 12:32 AM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> Hi all,
>
> Okay, good news and bad news.
>
> The bad news, is that the site/project which sparked this webcast to be
> made, has had some legal complications and is being shut down - less than 1
> month after being released :L
>
> The good news, is that the webcast will still be going ahead.
>
> For those of you that want to see the site it was related to, it's
> http://www.iliketochan.com .
>
> The site itself was a complete 4chan archive, dating back to 2010, peaking
> at 50 million posts and 17 million images.
>
> Particularly sad about this because so much time and effort went into the
> site, but at the same time, it has been a great learning experience (both in
> code and business). So being able to share that on the webcast will be of
> some small comfort :)
>
> Cal
>
> On Thu, Aug 11, 2011 at 6:31 PM, Cal Leeming [Simplicity Media Ltd] <
> cal.leem...@simplicitymedialtd.co.uk> wrote:
>
>> Last call on this guys:
>>
>>
>> https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?hl=en_US=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ#gid=0
>>
>> If you want to register your attendance, please do so now.
>>
>> Thanks
>>
>> On Mon, Jul 25, 2011 at 2:00 PM, nicolas HERSOG wrote:
>>
>>> I won t be able to follow the live session but I can't wait to watch your
>>> record on YT.
>>>
>>> Thx!
>>>
>>> On Mon, Jul 25, 2011 at 2:42 PM, Cal Leeming [Simplicity Media Ltd] <
>>> cal.leem...@simplicitymedialtd.co.uk> wrote:
>>>
 Second call for register your attendance on this webcast, if you haven't
 already done so.

 Thanks

 Cal


 On Tue, Jul 12, 2011 at 2:48 PM, Cal Leeming [Simplicity Media Ltd] <
 cal.leem...@simplicitymedialtd.co.uk> wrote:

> Hi all,
>
> Great response to this, 45 registered votes in total.
>
> The webcast will take place on Monday 29th August 2011 - (Minimum
> resolution 1920x1080)
>
> However, because the time zone results are almost split 50/50, I'm
> going to allow users to select from two time slots, if the results are 
> still
> split 50/50, then I'll do both an afternoon and evening session.
>
> Please use this form to register your place.
>
> https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?formkey=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ
>
> Cal
>

  --
 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: Django Development environment

2011-08-27 Thread Steven Elliott Jr

On Aug 27, 2011, at 11:17 AM, Simon Connah  wrote:

> 
> On 27 Aug 2011, at 04:44, Steven Elliott Jr wrote:
> 
>>> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote:
 Mercurial or Git (depends on whether the project is open source or not)
>> 
>> Kenneth,
>> 
>> I think he means whether or not the repository will be public or private. 
>> Github (git) does not offer private repos unless you pay whereas bitbucket 
>> (mercurial) gives you 5 private ones for free as well as the option for 
>> creating public ones. I personally am a big BitBucket fan as I find it much 
>> much easier to manage and also a bit faster. 
>> 
>> Best,
>> Steve
> 
> Correct. Although Bitbucket offers unlimited private repos. It just limits 
> you to 5 users...
 
Right, sorry that's what I was going for but I brain spasm'd on the iPhone. 
Bitbucket has gotten a lot better since Atlassian took it over. 

-- 
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: Installation

2011-08-27 Thread PremAnand Lakshmanan
It works now.The problem was with PYTHONPATH variable. Thanks everyone



On Sat, Aug 27, 2011 at 2:56 AM, Babatunde Akinyanmi
wrote:

> Hi Prem,
> You said your django is located in a folder named Django-1.0.4. That
> is where your PYTHONPATH should be set to not Django-1.3. Since you
> had multiple python installations, make sure that windows associates
> .py files with Python 2.7 and not Python 3.
> If it still doesn't work, you can try this though its not a very
> elegant solution. Copy the django-admin.py file from wherever your
> django installation is into the directory you call the django-admin
> command from
>
>
> On 8/26/11, PremAnand Lakshmanan  wrote:
> > Guys,
> >
> > I have corrected the following,
> >
> > *1. Uninstalled Python 3.x & Installed Python 2.7.1*
> >
> > Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit
> (Intel)]
> > on win32
> > Type "copyright", "credits" or "license()" for more information.
> >
> > *2. Created a PYTHONPATH variable
> > *
> > PYTHONPATH and value set to c:\Django-1.3
> >
> >
> > *Still, I get the same error, *
> >
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > django
> > NameError: name 'django' is not defined
> >
> > I have not installed anything other than downloading and setting the
> path..
> >
> > What else should I do to correct this problem? If anyone can give me step
> to
> > step process that would be helpful.
> >
> > Thanks,
> > Prem
> > On Fri, Aug 26, 2011 at 9:29 AM, donaldww
> > wrote:
> >
> >> Django is not compatible with version 3.x of Python. The django
> >> library was most likely installed into your 2.x lib.
> >>
> >> DW
> >>
> >> On Aug 25, 11:47 pm, prem  wrote:
> >> > Hi,
> >> >
> >> > Im trying to install Django but Im not succcessfull.
> >> >
> >> > The python has been installed properly.
> >> >
> >> > This is my python shell,
> >> >
> >> > Python 3.2.1 (default, Jul 10 2011, 21:51:15) [MSC v.1500 32 bit
> >> > (Intel)] on win32
> >> > Type "copyright", "credits" or "license()" for more information.
> >> >
> >> > When I try import django command, I get the following error,
> >> >
> >> > Traceback (most recent call last):
> >> >   File "", line 1, in 
> >> > import django
> >> > ImportError: No module named django
> >> >
> >> > Python is located & installed in C:/python32 folder
> >> > Django is located in C:/Django-1.0.4 folder
> >> >
> >> > This is how my path variable looks like, If you notice you can see
> >> > Python & Django folder at the last.
> >> >
> >> > C:\Hyperion\AnalyticServices\bin;C:\Hyperion\AnalyticServices\bin;C:
> >> > \Hyperion\AnalyticServices\bin;C:\app\PremVidya\product
> >> > \11.2.0\dbhome_1\bin;C:\Hyperion\AnalyticServices\bin;C:\Hyperion
> >> > \AnalyticServices\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%
> >> > \System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:
> >> > \Program Files\Dell\Dell Wireless WLAN Card;C:\Program Files\Common
> >> > Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Microsoft SQL
> >> > Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS
> >> > \Binn\;%HYPERION_HOME%\common\ODBC\Merant\5.2\Drivers;C:\Hyperion/
> >> > common/EssbaseRTC/9.3.1/bin;C:\Hyperion\BIPlus\bin;C:\Hyperion\BIPlus
> >> > \lib;C:\Hyperion\common\SAP\bin;C:\Hyperion\common\CLS\9.3.1\bin
> >> > \windows;C:\Program Files\QuickTime\QTSystem\;C:\Python32;c:
> >> > \Django-1.0.4
> >> >
> >> > Please help me out,
> >> >
> >> > Thanks,
> >> > Prem
> >>
> >> --
> >> 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.
> >>
> >>
> >
> >
> > --
> > Prem
> > 408-393-2545
> >
> > --
> > 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.
> >
> >
>
> --
> Sent from my mobile device
>
> --
> 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.
>
>


-- 
Prem
408-393-2545

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to 

Form for inline formset

2011-08-27 Thread Marcos Moyano
Can someone please tell me how can I specify a form to be used by every form
inside an inline formset (if possible)?

Thanks in advance!
Marcos

-- 
Some people, when confronted with a problem, think “I know, I'll use regular
expressions.” Now they have two problems.

Jamie Zawinski, in comp.emacs.xemacs

-- 
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: Media files not served automatically anymore in 1.3?

2011-08-27 Thread Karen Tracey
On Thu, Aug 25, 2011 at 7:21 AM, Reinout van Rees wrote:

> Only, with this 1.3 change django's 1.2's automatic serving of the
> media_url stuff has gone the way of the dodo.


Django 1.2 never did automatic serving of media_url, you always had to
configure that manually if you wanted it.

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.



Re: Django Development environment

2011-08-27 Thread Simon Connah

On 27 Aug 2011, at 04:44, Steven Elliott Jr wrote:

>> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote:
>>> Mercurial or Git (depends on whether the project is open source or not)
> 
> Kenneth,
> 
> I think he means whether or not the repository will be public or private. 
> Github (git) does not offer private repos unless you pay whereas bitbucket 
> (mercurial) gives you 5 private ones for free as well as the option for 
> creating public ones. I personally am a big BitBucket fan as I find it much 
> much easier to manage and also a bit faster. 
> 
> Best,
> Steve

Correct. Although Bitbucket offers unlimited private repos. It just limits you 
to 5 users on the free account.

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



authentication in django

2011-08-27 Thread NISA BALAKRISHNAN
Hi,

I am new to django.
i am making a django app for a logged in user to add movies he
watched.

how can i block a logged in user from accessing the log in form ?
the url .../accounts/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.



Re: Problem updating data

2011-08-27 Thread Blue
My first thought is that you didn't call parent save method in you
custom save method

super(YourClass, self).save(*args, **kwargs)


On 26 Sie, 03:59, Karen McNeil  wrote:
> Thank you Malcolm, you were exactly right!
>
> I would have never thought of that, but I have a custom save method
> and when I commented it out and restarted the app, setting the active
> property worked just as expected.  Now I just have to figure out what
> the hell is wrong with my save method... :-)
>
> Thank you!
>
> ~Karen
>
> On Aug 24, 8:31 pm, Malcolm Box  wrote:
>
>
>
>
>
>
>
> > Instead of counting the inactive, try counting the active ones. If that
> > count doesn't go up by one, I'd suspect something's dodgy in your Entry
> > model's save() that means it doesn't write successfully to the db.
>
> > You could debug by doing:
>
> > from django.db import connection
> > connection.queries
> > e1.save()
> > connection.queries
>
> > to see what the SQL generated was.
>
> > Then start looking at your database to see what it's doing.
>
> > Malcolm
>
> > On 23 August 2011 23:08, Karen McNeil  wrote:
>
> > > No, that's not the problem. Even if I redo the query now, I still get
> > > the same count (see below). And, like I said, the change does not show
> > > up in the admin either -- THE VALUE HAS NOT BEEN CHANGED.
>
> > > This behavior is so unexpected I'm not sure how to even begin trouble-
> > > shooting it.
>
> > > ~Karen
>
> > > PS -- What's wrong with querying by "active=0"? I did it that way
> > > because that's what the admin interface does for filters... is there
> > > any difference?
>
> > > NEW SHELL SESSION FROM TODAY, TESTING SAME THING:
>
> > > >>> from dictionary.models import Entry
> > > >>> entries = Entry.objects.filter(active=False)
> > > >>> entries.count()
> > > 3642
> > > >>> e1 = entries[0]
> > > >>> e1
> > > 
> > > >>> e1.active
> > > False
>
> > > --
> > > 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.
>
> > --
> > Malcolm Box
> > malcolm@gmail.com

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



Re: Django Development environment

2011-08-27 Thread Dan He
Mine is:
WinXP
Eclipse+PyDev
MySQL
Selenium
Firebug
chrome+firefox


On Sat, Aug 27, 2011 at 10:11 AM, kenneth gonsalves
wrote:

> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote:
> > Mercurial or Git (depends on whether the project is open source or
> > not)
>
> Could you elaborate please.
> --
> regards
> Kenneth Gonsalves
>
> --
> 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.
>
>


-- 
Dan  :)

-- 
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 Development environment

2011-08-27 Thread Steven Elliott Jr
> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote:
>> Mercurial or Git (depends on whether the project is open source or not)

Kenneth,

I think he means whether or not the repository will be public or private. 
Github (git) does not offer private repos unless you pay whereas bitbucket 
(mercurial) gives you 5 private ones for free as well as the option for 
creating public ones. I personally am a big BitBucket fan as I find it much 
much easier to manage and also a bit faster. 

Best,
Steve

-- 
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 Development environment

2011-08-27 Thread Marc Aymerich
On Tue, Aug 23, 2011 at 12:07 AM, Stephen Jackson
 wrote:
> I am new to the world of Django. I would like to hear from other django
> developers describe their dev environment (tools, os, editors, etc.).

Ubuntu + chroot with debian squeeze installed via debootstrap
gedit
svn
ddt

-- 
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: what should be memory size memcached for Django on Ubuntu Os?

2011-08-27 Thread Simon Connah
On 27 Aug 2011, at 12:26, vikas ruhil wrote:

> A brief Description of system On i  need help for memcached size:- 
> 1)Cpu :- i7 intel , 16 Gb Ram , Internal SATA Hard-disk :640 Gb , External 
> Hardisk :-10 Tb, Os :- Ubuntu-32bit
> 2)Cpu- i2 intel core2duo , 4Gb Ram, Internal SATA Hard-disk: 320 Gb , 
> External Hard-disk :- 2 Tb , Os:-Ubuntu-32bit
> 3)Cpu- i2 intel core2duo , 4Gb Ram, Internal SATA Hard-disk: 320 Gb , 
> External Hard-disk :- 2 Tb , Os:-FreeBsd-7.0 (I am using FreeBsd with Lamson 
> for mailing system)
> 
> Using Command line  :- memcached -d -m  -l 127.0.0.1 -p 11222
> Anybody able to suggest memory size for Django, or for Dynamic python usage 
> for high Performance computing
> 
> Regards 
> Vikash Ruhil

Ooops sorry sent my other request as a reply to this so sorry if it screws up 
this thread.

As for how much memory you need for memcached that is something that is highly 
site dependant. Some sites can manage with a relatively low amount of RAM 
dedicated to memcache as they don't have a whole lot of data that needs to be 
cached at any one time. Others require huge amounts.

I would suggest you do some experimentation and see what the effect on your 
server load as you play around with memory amounts.

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



Historical Djangocon videos available for download in iTunes?

2011-08-27 Thread Simon Connah
Does anyone know of a source for previous Djangocon (both US and EU) videos 
that allow you to download them in iTunes? So far I've only seen them available 
on the schedule page of the EU Djangocon site and on Blip.tv. While I can 
certainly watch them there I prefer to have them on my hard drive for easy 
reference at a later date.

Thanks 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.



what should be memory size memcached for Django on Ubuntu Os?

2011-08-27 Thread vikas ruhil
A brief Description of system On i  need help for memcached size:-
1)Cpu :- i7 intel , 16 Gb Ram , Internal SATA Hard-disk :640 Gb , External
Hardisk :-10 Tb, Os :- Ubuntu-32bit
2)Cpu- i2 intel core2duo , 4Gb Ram, Internal SATA Hard-disk: 320 Gb ,
External Hard-disk :- 2 Tb , Os:-Ubuntu-32bit
3)Cpu- i2 intel core2duo , 4Gb Ram, Internal SATA Hard-disk: 320 Gb ,
External Hard-disk :- 2 Tb , Os:-FreeBsd-7.0 (I am using FreeBsd with Lamson
for mailing system)

Using Command line  :- memcached -d -m  -l 127.0.0.1 -p 11222
Anybody able to suggest memory size for Django, or for Dynamic python usage
for high Performance computing

Regards
Vikash Ruhil

-- 
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: Help with Django code.

2011-08-27 Thread GE
You haven't said which OS you use.  If you are in a unix-based
environment, I found this article very helpful.
http://www.juiceanalytics.com/writing/django_settings_module/
Good luck

On Aug 26, 5:28 am, Yaşar Arabacı  wrote:
> Try this, always worked for me,
>
> import os
> import sys
> # assuming this file resides at the same directory at settings file
>
> PROJECT_FOLDER = os.path.abspath(os.path.dirname(__file__))
> UPPER_PATH = os.path.abspath(PROJECT_FOLDER + "/../")
>
> sys.path.append(UPPER_PATH)
> os.environ['DJANGO_SETTINGS_MODULE'] = "project_name.settings"
>
> """
> At this point, you can do anything with django, as django setting module
> environment variable is set
> and your project is in pythonpath
> """
>
> 2011/8/26 akaariai 
>
>
>
>
>
>
>
>
>
> > On Aug 25, 10:26 pm, Dr00p  wrote:
> > > Hi, I need to get Django to run in my code and I am having trouble.
> > > Every time I try to import my project (this is a seperate code I
> > > created to generate polls) it gives an import error and says
> > > DJANGO_SETTINGS_MODULE is not defined.
> > > I have tried multiple things like
> > > django.core.management.call_command('syncdb',
> > > 'settings=mysite.settings')
> > > django.core.management.call_command('syncdb', "pythonpath='/home/guest/
> > > Downloads/Site/Django/mysite'")
> > > But those give me the same error!
> > > I am trying to import mysite.polls but it won't let me.
> > > I have been trying to do it with out using manage.py because I don't
> > > know how to do it with manage.py
> > > If their is a way to use manage.py in my code I would but I personally
> > > can not figure it out.
>
> > Try to start your code with:
>
> > import settings
> > from django.core.management import setup_environ
> > setup_environ(settings)
>
> > > Any way you can help is great.
> > > If I am being to vague, I need to generate thousands of polls(even if
> > > you think this is stupid just ignore it), and to do that I created a
> > > script and I need to import my project but it will not allow me.
> > > I am in dire need of 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.
>
> --http://yasar.serveblog.net/

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



Combining queries? A "join" in Python?

2011-08-27 Thread graeme
I have a some models related link this:

A has a foreign key on B which has a foreign key on C

I also have D with a foreign key on B, and E with a foreign key of C

If I do A.filter(**args).select_related() I will get all the As, Bs,
and Cs I want.

How do I get the Ds with a foreign key on a B in my queryset
(preferably filtered) and all Es with a foreign key on C (also
preferably filtered)

The best I have been able to come up with is to query for all the  the
Ds and Es I want, and combine them with the Bs and Cs in the view.

I have a similar problem with another site, except that there not
every B I want has an A with a foreignkey pointing to it, so I cannot
just do select_related on A.

I am not worried about doing an extra query or two per page. What I
want to avoid is doing an extra query for each object in a lengthy
list.

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



Re: Installation

2011-08-27 Thread Babatunde Akinyanmi
Hi Prem,
You said your django is located in a folder named Django-1.0.4. That
is where your PYTHONPATH should be set to not Django-1.3. Since you
had multiple python installations, make sure that windows associates
.py files with Python 2.7 and not Python 3.
If it still doesn't work, you can try this though its not a very
elegant solution. Copy the django-admin.py file from wherever your
django installation is into the directory you call the django-admin
command from


On 8/26/11, PremAnand Lakshmanan  wrote:
> Guys,
>
> I have corrected the following,
>
> *1. Uninstalled Python 3.x & Installed Python 2.7.1*
>
> Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
> on win32
> Type "copyright", "credits" or "license()" for more information.
>
> *2. Created a PYTHONPATH variable
> *
> PYTHONPATH and value set to c:\Django-1.3
>
>
> *Still, I get the same error, *
>
> Traceback (most recent call last):
>   File "", line 1, in 
> django
> NameError: name 'django' is not defined
>
> I have not installed anything other than downloading and setting the path..
>
> What else should I do to correct this problem? If anyone can give me step to
> step process that would be helpful.
>
> Thanks,
> Prem
> On Fri, Aug 26, 2011 at 9:29 AM, donaldww
> wrote:
>
>> Django is not compatible with version 3.x of Python. The django
>> library was most likely installed into your 2.x lib.
>>
>> DW
>>
>> On Aug 25, 11:47 pm, prem  wrote:
>> > Hi,
>> >
>> > Im trying to install Django but Im not succcessfull.
>> >
>> > The python has been installed properly.
>> >
>> > This is my python shell,
>> >
>> > Python 3.2.1 (default, Jul 10 2011, 21:51:15) [MSC v.1500 32 bit
>> > (Intel)] on win32
>> > Type "copyright", "credits" or "license()" for more information.
>> >
>> > When I try import django command, I get the following error,
>> >
>> > Traceback (most recent call last):
>> >   File "", line 1, in 
>> > import django
>> > ImportError: No module named django
>> >
>> > Python is located & installed in C:/python32 folder
>> > Django is located in C:/Django-1.0.4 folder
>> >
>> > This is how my path variable looks like, If you notice you can see
>> > Python & Django folder at the last.
>> >
>> > C:\Hyperion\AnalyticServices\bin;C:\Hyperion\AnalyticServices\bin;C:
>> > \Hyperion\AnalyticServices\bin;C:\app\PremVidya\product
>> > \11.2.0\dbhome_1\bin;C:\Hyperion\AnalyticServices\bin;C:\Hyperion
>> > \AnalyticServices\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%
>> > \System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:
>> > \Program Files\Dell\Dell Wireless WLAN Card;C:\Program Files\Common
>> > Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Microsoft SQL
>> > Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS
>> > \Binn\;%HYPERION_HOME%\common\ODBC\Merant\5.2\Drivers;C:\Hyperion/
>> > common/EssbaseRTC/9.3.1/bin;C:\Hyperion\BIPlus\bin;C:\Hyperion\BIPlus
>> > \lib;C:\Hyperion\common\SAP\bin;C:\Hyperion\common\CLS\9.3.1\bin
>> > \windows;C:\Program Files\QuickTime\QTSystem\;C:\Python32;c:
>> > \Django-1.0.4
>> >
>> > Please help me out,
>> >
>> > Thanks,
>> > Prem
>>
>> --
>> 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.
>>
>>
>
>
> --
> Prem
> 408-393-2545
>
> --
> 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.
>
>

-- 
Sent from my mobile device

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