Saturday, December 31, 2011

Re: django-admin.py startproject will NOT work.

+1

On Sun, Jan 1, 2012 at 9:49 AM, Bart Nagel <bart@tremby.net> wrote:
At 2011-12-31 18:56:14 -0800, Chris Kavanagh wrote:
> Ok I've had a breakthrough (I guess,lol). I started a command prompt
> from my Python Scripts folder (C:\Python27\Scripts\), typed in "Python
> django-admin.py startproject mysite", and it worked!! I now have the
> "mysite" folder with appropriate subfolders (__init__.py,
> manage.py,settings.py,urls.py).

It still doesn't make sense that it wasn't working before. Did you try
the modified args.py script I sent you?

> Is this working correctly?? Should I have to create Projects in the
> Python Scripts Folder?? Should it work from another (any misc dir)
> dir??

If Python itself and the django-admin.py script were being found
properly (and they were when you were getting the help message), yes,
you should be able to do that from any directory.

> And, can I leave it in the Scripts Folder or should I move it?? If I
> do move it, will that cause other problems??

You should probably move it. It should work anywhere, again, as long
as it can find Python properly.

--bart

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


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

Re: Django app for IP address lookup

Thanks man. Happy new year!

On Sun, Jan 1, 2012 at 9:33 AM, Addy Yeow <ayeowch@gmail.com> wrote:
Here you go:
http://dazzlepod.com/ip/8.8.8.8.json

On Sat, Dec 31, 2011 at 10:14 PM, Timothy Makobu <makobu.mwambiriro@gmail.com> wrote:
Thanks.

Do you have an API for it yet? so we can do something like http://dazzlepod.com/ip/api/json/1x7.x37.8.xx and get the data in JSON?


On Sat, Dec 31, 2011 at 4:09 PM, yati sagade <yati.sagade@gmail.com> wrote:
Nice app :) can you share the sources? And happy new year to you, too!


On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow <ayeowch@gmail.com> wrote:
Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

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

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

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

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

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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 18:56:14 -0800, Chris Kavanagh wrote:
> Ok I've had a breakthrough (I guess,lol). I started a command prompt
> from my Python Scripts folder (C:\Python27\Scripts\), typed in "Python
> django-admin.py startproject mysite", and it worked!! I now have the
> "mysite" folder with appropriate subfolders (__init__.py,
> manage.py,settings.py,urls.py).

It still doesn't make sense that it wasn't working before. Did you try
the modified args.py script I sent you?

> Is this working correctly?? Should I have to create Projects in the
> Python Scripts Folder?? Should it work from another (any misc dir)
> dir??

If Python itself and the django-admin.py script were being found
properly (and they were when you were getting the help message), yes,
you should be able to do that from any directory.

> And, can I leave it in the Scripts Folder or should I move it?? If I
> do move it, will that cause other problems??

You should probably move it. It should work anywhere, again, as long
as it can find Python properly.

--bart

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

Re: Django app for IP address lookup

Here you go:
http://dazzlepod.com/ip/8.8.8.8.json

On Sat, Dec 31, 2011 at 10:14 PM, Timothy Makobu <makobu.mwambiriro@gmail.com> wrote:
Thanks.

Do you have an API for it yet? so we can do something like http://dazzlepod.com/ip/api/json/1x7.x37.8.xx and get the data in JSON?


On Sat, Dec 31, 2011 at 4:09 PM, yati sagade <yati.sagade@gmail.com> wrote:
Nice app :) can you share the sources? And happy new year to you, too!


On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow <ayeowch@gmail.com> wrote:
Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

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

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

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

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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 18:47:13 -0800, Chris Kavanagh wrote:
> Forgive my ignorance, but if that's the way it's supposed to work
> (script must be in current dir) then how would Python know to run
> django-admin.py if I'm NOT in the same directory it is
> (Python27\Scripts\)??? In other words, the tutorial says to create a
> mysite dir somewhere, NOT in the Python27\Scripts dir. So how would it
> work then if Python27\Scripts\ isn't my current working dir (ie:
> mysite isn't in the Scripts dir)??

Three options:

Either you run
python C:\path\to\django-admin.py startproject mysite
from whatever directory you want, to run an arbitrary Python script
anywhere on your machine.

Or, with other scripts, from the directory where the Python script is,
you can generally do
python some-script.py C:\path\to\some\target
depending how the script itself is set up -- the django-admin.py
doesn't let you do this, it wants only to create a project in the
current directory.

Or (what you're encouraged to do in this case) the django-admin.py
script is set up somewhere in your lookup PATH. The lookup PATH is the
list of directories in which commands live, and so when asked to run a
particular command the shell looks in those directories and if it
finds the command you wanted runs it, no matter where you are. To get
the django-admin.py script in the PATH so you can run it from anywhere
without a full path either you install the script to a directory which
is already in your PATH (I think on Windows C:\windows\system32 is one
such directory) or the Django directory containing the script is added
to your PATH.

There might have been instructions to do that when you installed
Django, or perhaps it was done as part of an installation script.

The fact that this path exists is the reason you can run commands like
"python" itself from anywhere, if it's set up properly.

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

Re: Happy new year

This is last evening of 2011
Last sun of 2011
Has spread its shine
On earth,
Feel remaining
Moments of last day,
Scatter happiness
Best of luck for 2012


On 1/1/12, girish shabadimath <girishmss.1203@gmail.com> wrote:
> New year wishes to everyone,,
>
> regards,
> girish ms
> On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma
> <varma.nikhil22@gmail.com>wrote:
>
>> Happy new year to all of you.
>>
>>
>> On Sun, Jan 1, 2012 at 10:22 AM, yati sagade <yati.sagade@gmail.com>wrote:
>>
>>> Happy new year all :)
>>>
>>>
>>> On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <
>>> adrien.lemaire@aquasys.co.jp> wrote:
>>>
>>>> Happy new year dear folks !
>>>>
>>>> On Jan 1, 1:48 am, Sławomir Zborowski <stilew...@gmail.com> wrote:
>>>> > Happy new year, Django users :-) !
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> django-users+unsubscribe@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/django-users?hl=en.
>>>>
>>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscribe@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Nikhil Verma
>> +91-958-273-3156
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Girish M S
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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

Re: Happy new year

New year wishes to everyone,,

regards,
girish ms
On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma <varma.nikhil22@gmail.com> wrote:
Happy new year to all of you.


On Sun, Jan 1, 2012 at 10:22 AM, yati sagade <yati.sagade@gmail.com> wrote:
Happy new year all :)


On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <adrien.lemaire@aquasys.co.jp> wrote:
Happy new year dear folks !

On Jan 1, 1:48 am, Sławomir Zborowski <stilew...@gmail.com> wrote:
> Happy new year, Django users :-) !

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


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



--
Regards
Nikhil Verma
+91-958-273-3156


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



--
Girish M S

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

Re: Happy new year

Happy new year to all of you.

On Sun, Jan 1, 2012 at 10:22 AM, yati sagade <yati.sagade@gmail.com> wrote:
Happy new year all :)


On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <adrien.lemaire@aquasys.co.jp> wrote:
Happy new year dear folks !

On Jan 1, 1:48 am, Sławomir Zborowski <stilew...@gmail.com> wrote:
> Happy new year, Django users :-) !

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


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



--
Regards
Nikhil Verma
+91-958-273-3156

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

Re: Happy new year

Happy new year all :)

On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <adrien.lemaire@aquasys.co.jp> wrote:
Happy new year dear folks !

On Jan 1, 1:48 am, Sławomir Zborowski <stilew...@gmail.com> wrote:
> Happy new year, Django users :-) !

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


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

Re: django-admin.py startproject will NOT work.

>
> No, that's not wrong, that's how it should be. The python interpreter
> is in your path, but you're telling the interpreter which file to run.
> If you tell it to run a file args.py and there is no such file in the
> current directory, it's correct to give you an error message.
>
> Does this little script tell you correctly the number of arguments you
> pass to it?
>
> --bart

Ok I've had a breakthrough (I guess,lol). I started a command prompt
from my Python Scripts folder (C:\Python27\Scripts\), typed in "Python
django-admin.py startproject mysite", and it worked!! I now have the
"mysite" folder with appropriate subfolders (__init__.py,
manage.py,settings.py,urls.py).

Is this working correctly?? Should I have to create Projects in the
Python Scripts Folder?? Should it work from another (any misc dir)
dir??

And, can I leave it in the Scripts Folder or should I move it?? If I
do move it, will that cause other problems??

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 7:00 pm, Chris Kavanagh <cka...@gmail.com> wrote:
> On Dec 31, 6:48 pm, Bart Nagel <b...@tremby.net> wrote:
>
>
>
>
>
>
>
>
>
> > At 2011-12-31 15:43:36 -0800, Chris Kavanagh wrote:
>
> > > Ok, I CAN start the Python Interpreter from the command line by just
> > > typing "python" then "enter".
>
> > > I saved the file "args.py" in the Python Scripts folder. When I try to
> > > run it from command prompt, I get the message  "python: can't open
> > > file 'args.py': [Errno 2] No such file or directory".
>
> > > The only way I CAN get it to open, is to change (cd into) into the
> > > python scripts folder (where I saved args.py) then run it (type
> > > "python args.py" in command prompt). So, obviously something is wrong.
>
> > No, that's not wrong, that's how it should be. The python interpreter
> > is in your path, but you're telling the interpreter which file to run.
> > If you tell it to run a file args.py and there is no such file in the
> > current directory, it's correct to give you an error message.
>
> > Does this little script tell you correctly the number of arguments you
> > pass to it?
>
> > --bart
>
> Yes, it tells me the number of args.
>
> BTW, thanks for the patience.

Forgive my ignorance, but if that's the way it's supposed to work
(script must be in current dir) then how would Python know to run
django-admin.py if I'm NOT in the same directory it is
(Python27\Scripts\)??? In other words, the tutorial says to create a
mysite dir somewhere, NOT in the Python27\Scripts dir. So how would it
work then if Python27\Scripts\ isn't my current working dir (ie:
mysite isn't in the Scripts dir)??

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

Re: Happy new year

Happy new year dear folks !

On Jan 1, 1:48 am, Sławomir Zborowski <stilew...@gmail.com> wrote:
> Happy new year, Django users :-) !

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

Re: USStateField default value

hi erisa,

please try passing "initial" instead of default.

On 31 Aralık 2011, 23:52, Erisa <bruceaw...@gmail.com> wrote:
> I wanted to have a select box for the state with California as the
> default.  I first tried in my model the following:
>
> state = USStateField(blank=True, default='CA')
>
> This gave me the error "TypeError: __init__() got an unexpected
> keyword argument 'default'".
>
> But the following works (i.e., California is the default and I have a
> nice select box):
>
> state = models.CharField(blank=True, max_length=2,
> choices=STATE_CHOICES, default='CA')
>
> Could this be a bug?  I am using 1.3.

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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 16:00:44 -0800, Chris Kavanagh wrote:
> On Dec 31, 6:48 pm, Bart Nagel <b...@tremby.net> wrote:
> > Does this little script tell you correctly the number of arguments you
> > pass to it?
>
> Yes, it tells me the number of args.

Okay, in that case the arguments should also be getting to the
django-admin script. To give you the help message it must not be able
to read the "startproject" argument, since the name of the project
shouldn't matter to it. Perhaps something bad is happening to it,
possibly due to the registry stuff you folks were talking about
earlier, or some other Windows sorcery.

Change args.py a little to this:

import sys
print "%d arguments: %s" % (len(sys.argv), sys.argv)

And now run it with the arguments you were trying to give to
django-admin:
python args.py startproject mysite

When I run that I get
3 arguments: ['args.py', 'startproject', 'mysite']

Paste your own output.

--bart

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 6:48 pm, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 15:43:36 -0800, Chris Kavanagh wrote:
>
> > Ok, I CAN start the Python Interpreter from the command line by just
> > typing "python" then "enter".
>
> > I saved the file "args.py" in the Python Scripts folder. When I try to
> > run it from command prompt, I get the message  "python: can't open
> > file 'args.py': [Errno 2] No such file or directory".
>
> > The only way I CAN get it to open, is to change (cd into) into the
> > python scripts folder (where I saved args.py) then run it (type
> > "python args.py" in command prompt). So, obviously something is wrong.
>
> No, that's not wrong, that's how it should be. The python interpreter
> is in your path, but you're telling the interpreter which file to run.
> If you tell it to run a file args.py and there is no such file in the
> current directory, it's correct to give you an error message.
>
> Does this little script tell you correctly the number of arguments you
> pass to it?
>
> --bart

Yes, it tells me the number of args.

BTW, thanks for the patience.

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 6:48 pm, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 15:43:36 -0800, Chris Kavanagh wrote:
>
> > Ok, I CAN start the Python Interpreter from the command line by just
> > typing "python" then "enter".
>
> > I saved the file "args.py" in the Python Scripts folder. When I try to
> > run it from command prompt, I get the message  "python: can't open
> > file 'args.py': [Errno 2] No such file or directory".
>
> > The only way I CAN get it to open, is to change (cd into) into the
> > python scripts folder (where I saved args.py) then run it (type
> > "python args.py" in command prompt). So, obviously something is wrong.
>
> No, that's not wrong, that's how it should be. The python interpreter
> is in your path, but you're telling the interpreter which file to run.
> If you tell it to run a file args.py and there is no such file in the
> current directory, it's correct to give you an error message.
>
> Does this little script tell you correctly the number of arguments you
> pass to it?
>
> --bart

Yes, it tells me the number of args.

BTW, thanks for the patience.

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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 15:43:36 -0800, Chris Kavanagh wrote:
> Ok, I CAN start the Python Interpreter from the command line by just
> typing "python" then "enter".
>
> I saved the file "args.py" in the Python Scripts folder. When I try to
> run it from command prompt, I get the message "python: can't open
> file 'args.py': [Errno 2] No such file or directory".
>
> The only way I CAN get it to open, is to change (cd into) into the
> python scripts folder (where I saved args.py) then run it (type
> "python args.py" in command prompt). So, obviously something is wrong.

No, that's not wrong, that's how it should be. The python interpreter
is in your path, but you're telling the interpreter which file to run.
If you tell it to run a file args.py and there is no such file in the
current directory, it's correct to give you an error message.

Does this little script tell you correctly the number of arguments you
pass to it?

--bart

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 6:18 pm, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 15:01:39 -0800, Chris Kavanagh wrote:
>
>
>
>
>
>
>
>
>
> > On Dec 31, 11:58 am, Bart Nagel <b...@tremby.net> wrote:
> > > What about other Python programs? Do they have the same problem?
>
> > > Put this next paragraph in a file and run it with different numbers of
> > > arguments and see what happens.
>
> > > import sys
> > > print "%d arguments" % len(sys.argv)
>
> > > Save it as args.py
>
> > > Run
> > > python args.py
> > > python args.py arg1
> > > python args.py arg1 arg2
>
> > As far as other programs, I'm not sure. I'm not a programmer (just
> > learned Python over the last few months) so I haven't tried any other
> > programs yet.
>
> > Ok, so save the paragraph in a file, then run the commands from the
> > command line EXACTLY as you have them? In other words, from command
> > line, type in Python args.py, then python args.py arg1, and python
> > args.py arg 2??
>
> > Forgive my ignorance, working from the command line with this stuff is
> > new to me. And I've never understood exactly what command line args
> > are. . .But I'm learning.
>
> The command line is the dream, you'll come to love it. Well, maybe not
> the Windows one.
>
> I guess first up just run
>     python
> and see if you get the interactive Python shell. Or maybe you need
>     python.exe
> since you're on Windows? Anyway, if you get the shell, the python
> executable is in your path and works to at least some extent. If you
> don't get the shell, and you get "command not found" or something (I
> don't have a Windows box so I don't know exactly what it would look
> like) you may need to use the full path to the executable, as people
> before have suggested.
>
> So those two lines ("import..." and "print...") make a very simple
> Python script which just outputs the number of arguments it thinks it
> was given.
>
> Invoke the script with Python just as you're meant to do for the
> Django script. On linux I just run
>     python args.py
> and it tells me "1 arguments". If I run
>     python args.py something
> it tells me "2 arguments" and so on.
>
> What behaviour do you get?
>
> The point of this is that if this python script can see the arguments
> then I can see absolutely no reason why your django-admin.py script
> would not see them, and I would be stumped.
>
> --bart

Ok, I CAN start the Python Interpreter from the command line by just
typing "python" then "enter".

I saved the file "args.py" in the Python Scripts folder. When I try to
run it from command prompt, I get the message "python: can't open
file 'args.py': [Errno 2] No such file or directory".

The only way I CAN get it to open, is to change (cd into) into the
python scripts folder (where I saved args.py) then run it (type
"python args.py" in command prompt). So, obviously something is wrong.

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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 15:01:39 -0800, Chris Kavanagh wrote:
> On Dec 31, 11:58 am, Bart Nagel <b...@tremby.net> wrote:
> > What about other Python programs? Do they have the same problem?
> >
> > Put this next paragraph in a file and run it with different numbers of
> > arguments and see what happens.
> >
> > import sys
> > print "%d arguments" % len(sys.argv)
> >
> > Save it as args.py
> >
> > Run
> >     python args.py
> >     python args.py arg1
> >     python args.py arg1 arg2
>
> As far as other programs, I'm not sure. I'm not a programmer (just
> learned Python over the last few months) so I haven't tried any other
> programs yet.
>
> Ok, so save the paragraph in a file, then run the commands from the
> command line EXACTLY as you have them? In other words, from command
> line, type in Python args.py, then python args.py arg1, and python
> args.py arg 2??
>
> Forgive my ignorance, working from the command line with this stuff is
> new to me. And I've never understood exactly what command line args
> are. . .But I'm learning.

The command line is the dream, you'll come to love it. Well, maybe not
the Windows one.

I guess first up just run
python
and see if you get the interactive Python shell. Or maybe you need
python.exe
since you're on Windows? Anyway, if you get the shell, the python
executable is in your path and works to at least some extent. If you
don't get the shell, and you get "command not found" or something (I
don't have a Windows box so I don't know exactly what it would look
like) you may need to use the full path to the executable, as people
before have suggested.

So those two lines ("import..." and "print...") make a very simple
Python script which just outputs the number of arguments it thinks it
was given.

Invoke the script with Python just as you're meant to do for the
Django script. On linux I just run
python args.py
and it tells me "1 arguments". If I run
python args.py something
it tells me "2 arguments" and so on.

What behaviour do you get?

The point of this is that if this python script can see the arguments
then I can see absolutely no reason why your django-admin.py script
would not see them, and I would be stumped.

--bart

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 12:38 pm, Ramiro Morales <cra...@gmail.com> wrote:
> On Fri, Dec 30, 2011 at 4:04 PM, Chris Kavanagh <cka...@gmail.com> wrote:
>
> >>   C:\python27\python C:\path\to\django-admin startproject foo
>
> >> or, if you have C:\python27 in the PATH, simply:
>
> >>   python C:\path\to\django-admin startproject foo
>
> > Thanks for the reply, however it didn't work. I get the exact same
> > thing: "Usage: django-admin.py subcommand [options] [args]" with
> > options below for help.
>
> Try both, I think both of them should work.
>
> BUT, that isn't the important part. The important part is abut you should
> make sure you execute it with the Python interpreter.
>
> Forget about trying to simple invoke django-admin (or django-admin.py)
> as a standalone program.
>
> Good luck.
>
> --
> Ramiro Morales

Thanks Ramiro. . .I don't think you saw my other reply to your
original post about trying this. . .

I'll ask again. I'm not sure exactly what path to use, when you say
\path\to. The directory I created is called "mysite" & it's path is C:
\mysite\.I started a command prompt from "mysite" then typed "python
django-admin.py startproject mysite" in the command prompt (didn't
work).

Forgive my ignorance, is this what you wanted me to try??

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 11:58 am, Bart Nagel <b...@tremby.net> wrote:
> At 2011-12-31 19:47:35 +0300, Timothy Makobu wrote:
>
> > File associations are fine i reckon, because django-admin is giving you the
> > help message because for some reason it thinks you're *giving it improper
> > input*.
>
> What about other Python programs? Do they have the same problem?
>
> Put this next paragraph in a file and run it with different numbers of
> arguments and see what happens.
>
> import sys
> print "%d arguments" % len(sys.argv)
>
> Save it as args.py
>
> Run
>     python args.py
>     python args.py arg1
>     python args.py arg1 arg2

As far as other programs, I'm not sure. I'm not a programmer (just
learned Python over the last few months) so I haven't tried any other
programs yet.

Ok, so save the paragraph in a file, then run the commands from the
command line EXACTLY as you have them? In other words, from command
line, type in Python args.py, then python args.py arg1, and python
args.py arg 2??

Forgive my ignorance, working from the command line with this stuff is
new to me. And I've never understood exactly what command line args
are. . .But I'm learning.

And THANK YOU ALL FOR THE HELP!!!

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 11:47 am, Timothy Makobu <makobu.mwambir...@gmail.com>
wrote:
> Hi,
>
> File associations are fine i reckon, because django-admin is giving you the
> help message because for some reason it thinks you're *giving it improper
> input*.
>
>So, you're saying you don't believe this is the problem (File Associations)?? I don't think it is either, but I thought it was worth a try. It was in a Stack Overflow question about Python (Windows) not accepting command line args.

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 12:13 pm, Andre Terra <andrete...@gmail.com> wrote:
> This has been answered before:
>
> http://groups.google.com/group/django-users/browse_thread/thread/9d53...
>
> Cheers,
> AT
>
>
> Yes, I saw that thread, and I tried changing my registry as suggested. And the other 'work around'. Neither worked.
>
>
>
>

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

USStateField default value

I wanted to have a select box for the state with California as the
default. I first tried in my model the following:

state = USStateField(blank=True, default='CA')

This gave me the error "TypeError: __init__() got an unexpected
keyword argument 'default'".

But the following works (i.e., California is the default and I have a
nice select box):

state = models.CharField(blank=True, max_length=2,
choices=STATE_CHOICES, default='CA')

Could this be a bug? I am using 1.3.

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

Re: Django dev/deploy environment for distributed agile teams

Hi Ashkan,

You can take a look at our project: django-fagungis = DJANGO + FAbric + GUnicorn + NGInx + Supervisor deployment
Here: https://bitbucket.org/DNX/django-fagungis/
We use it for the same purpose as you described.
If you have some questions, suggestions or ideas about and for the project feel free to open an issue on bitbucket.

Happy new year to all!


On Sat, Dec 31, 2011 at 8:11 PM, Paul Msegeya <msegeya@gmail.com> wrote:
sounds good...Happy new year too.


On Sat, Dec 31, 2011 at 10:25 PM, Ashkan Roshanayi <ashkan.roshanayi@gmail.com> wrote:
Hi everybody, we are working in a geographically distributed agile team. I am trying to design and configure our development environment and deployment procedures and need to know about your valuable experiences. My requirements are:

* Each new developer can kick-start developing: dev environment and all installs/configs (python related) should be achievable in 15 minutes. This procedure should be automated and repeatable.

* Everybody can pull & build whole project locally and run complete *functional* test suite

* Upon pushing code in our Github repo, it will be pulled out by our build/staging server automatically --> all *functional* & *non-functional* tests will be run by Jenkins --> if successful: we can test it manually on this server too.

* Admins can choose some features or profiles on this staging server and deploy them to live (production) server by ideally executing a script


I've read a lot about virtualenv, pip, fabric, puppet, chef & blueprint and used some of them but want to hear more about your recommendations, best practices and potential pitfalls. Appreciate it very much.

Happy new year :)

--
Ashkan

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


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



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

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

Re: Happy New Year – Django on display in Times Square!

awesome!

2011/12/31 Jason Ford <jason@feedmagnet.com>:
> Our app, FeedMagnet (built in Django!) gathers content from social
> networks in real-time, curate the feed, and then display it. All day
> today, FeedMagnet is powering the Verizon screen in Times Square
> (running on the giant MTV HD display) – showing real-time posts from
> Facebook, G+, and Twitter, plus photos from Instagram and a giant
> Foursquare avatar montage and checkin counter. It's pretty awesome.
>
> http://instagr.am/p/dPWfx/
>
> If you happen to be in Times Square for the New Years party, tell the
> folks around you that big social media screen is powered by Django and
> Python!
>
> - Jason (founder of FeedMagnet)
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>

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

Django dev/deploy environment for distributed agile teams

Hi everybody, we are working in a geographically distributed agile team. I am trying to design and configure our development environment and deployment procedures and need to know about your valuable experiences. My requirements are:

* Each new developer can kick-start developing: dev environment and all installs/configs (python related) should be achievable in 15 minutes. This procedure should be automated and repeatable.

* Everybody can pull & build whole project locally and run complete *functional* test suite

* Upon pushing code in our Github repo, it will be pulled out by our build/staging server automatically --> all *functional* & *non-functional* tests will be run by Jenkins --> if successful: we can test it manually on this server too.

* Admins can choose some features or profiles on this staging server and deploy them to live (production) server by ideally executing a script


I've read a lot about virtualenv, pip, fabric, puppet, chef & blueprint and used some of them but want to hear more about your recommendations, best practices and potential pitfalls. Appreciate it very much.

Happy new year :)

--
Ashkan

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

Re: Django dev/deploy environment for distributed agile teams

sounds good...Happy new year too.

On Sat, Dec 31, 2011 at 10:25 PM, Ashkan Roshanayi <ashkan.roshanayi@gmail.com> wrote:
Hi everybody, we are working in a geographically distributed agile team. I am trying to design and configure our development environment and deployment procedures and need to know about your valuable experiences. My requirements are:

* Each new developer can kick-start developing: dev environment and all installs/configs (python related) should be achievable in 15 minutes. This procedure should be automated and repeatable.

* Everybody can pull & build whole project locally and run complete *functional* test suite

* Upon pushing code in our Github repo, it will be pulled out by our build/staging server automatically --> all *functional* & *non-functional* tests will be run by Jenkins --> if successful: we can test it manually on this server too.

* Admins can choose some features or profiles on this staging server and deploy them to live (production) server by ideally executing a script


I've read a lot about virtualenv, pip, fabric, puppet, chef & blueprint and used some of them but want to hear more about your recommendations, best practices and potential pitfalls. Appreciate it very much.

Happy new year :)

--
Ashkan

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


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

Happy New Year – Django on display in Times Square!

Our app, FeedMagnet (built in Django!) gathers content from social
networks in real-time, curate the feed, and then display it. All day
today, FeedMagnet is powering the Verizon screen in Times Square
(running on the giant MTV HD display) – showing real-time posts from
Facebook, G+, and Twitter, plus photos from Instagram and a giant
Foursquare avatar montage and checkin counter. It's pretty awesome.

http://instagr.am/p/dPWfx/

If you happen to be in Times Square for the New Years party, tell the
folks around you that big social media screen is powered by Django and
Python!

- Jason (founder of FeedMagnet)

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

Re: django-admin.py startproject will NOT work.

On Fri, Dec 30, 2011 at 4:04 PM, Chris Kavanagh <ckava3@gmail.com> wrote:
>>
>>   C:\python27\python C:\path\to\django-admin startproject foo
>>
>> or, if you have C:\python27 in the PATH, simply:
>>
>>   python C:\path\to\django-admin startproject foo
>>
>
> Thanks for the reply, however it didn't work. I get the exact same
> thing: "Usage: django-admin.py subcommand [options] [args]" with
> options below for help.
>

Try both, I think both of them should work.

BUT, that isn't the important part. The important part is abut you should
make sure you execute it with the Python interpreter.

Forget about trying to simple invoke django-admin (or django-admin.py)
as a standalone program.

Good luck.

--
Ramiro Morales

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

Re: Django app for IP address lookup

Nice app .Can you share the source code.It will be good.

Happy new Year

On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow <ayeowch@gmail.com> wrote:
Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

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



--
Regards
Nikhil Verma
+91-958-273-3156

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

Re: django-admin.py startproject will NOT work.

This has been answered before:



Cheers,
AT

On Sat, Dec 31, 2011 at 2:58 PM, Bart Nagel <bart@tremby.net> wrote:
At 2011-12-31 19:47:35 +0300, Timothy Makobu wrote:
> File associations are fine i reckon, because django-admin is giving you the
> help message because for some reason it thinks you're *giving it improper
> input*.

What about other Python programs? Do they have the same problem?

Put this next paragraph in a file and run it with different numbers of
arguments and see what happens.

import sys
print "%d arguments" % len(sys.argv)

Save it as args.py

Run
   python args.py
   python args.py arg1
   python args.py arg1 arg2

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


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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 19:47:35 +0300, Timothy Makobu wrote:
> File associations are fine i reckon, because django-admin is giving you the
> help message because for some reason it thinks you're *giving it improper
> input*.

What about other Python programs? Do they have the same problem?

Put this next paragraph in a file and run it with different numbers of
arguments and see what happens.

import sys
print "%d arguments" % len(sys.argv)

Save it as args.py

Run
python args.py
python args.py arg1
python args.py arg1 arg2

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

Happy new year

Happy new year, Django users :-) !

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

Re: django-admin.py startproject will NOT work.

Hi,

File associations are fine i reckon, because django-admin is giving you the help message because for some reason it thinks you're giving it improper input

On Sat, Dec 31, 2011 at 7:40 PM, Chris Kavanagh <ckava3@gmail.com> wrote:
While looking for a solution, I found someone with a similar problem.
he thought there was a problem with the way Python Files are
associated. So I did what was suggested on the command line, using
"assoc.py" and ftype Python.File. What I got back is listed below. I
don't think this is right according to what the message said.
According to him, it should've returned ".py=Python.File" and
"Python.File="C:\Python25\python.exe" "%1" %*". . .Obviously mine was
different. Any suggestions???




C:\>assoc .py
.py=py_auto_file

C:\>ftype python.file
File type 'python.file' not found or no open command associated with
it.

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


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

Re: django-admin.py startproject will NOT work.

At 2011-12-31 08:40:26 -0800, Chris Kavanagh wrote:
> While looking for a solution, I found someone with a similar problem.
> he thought there was a problem with the way Python Files are
> associated. So I did what was suggested on the command line, using
> "assoc.py" and ftype Python.File. What I got back is listed below. I
> don't think this is right according to what the message said.
> According to him, it should've returned ".py=Python.File" and
> "Python.File="C:\Python25\python.exe" "%1" %*". . .Obviously mine was
> different. Any suggestions???
>
>
>
>
> C:\>assoc .py
> .py=py_auto_file
>
> C:\>ftype python.file
> File type 'python.file' not found or no open command associated with
> it.

Try
ftype py_auto_file

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

Re: django-admin.py startproject will NOT work.

While looking for a solution, I found someone with a similar problem.
he thought there was a problem with the way Python Files are
associated. So I did what was suggested on the command line, using
"assoc.py" and ftype Python.File. What I got back is listed below. I
don't think this is right according to what the message said.
According to him, it should've returned ".py=Python.File" and
"Python.File="C:\Python25\python.exe" "%1" %*". . .Obviously mine was
different. Any suggestions???


C:\>assoc .py
.py=py_auto_file

C:\>ftype python.file
File type 'python.file' not found or no open command associated with
it.

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

Re: django-admin.py startproject will NOT work.

On Dec 31, 10:19 am, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote:
> On Fri, 30 Dec 2011 16:36:32 -0800 (PST), Chris Kavanagh
>
> <cka...@gmail.com> wrote:
> >> I'm not sure you'll be able to see the screenshot at the link, it's very small. So, here's a copy/paste of it from my command prompt:
>
> >C:\Documents and Settings\mysite>django-admin.py startproject mysite
>
>         Have you tried that while explicitly specifying the Python
> interpreter on the line?
>
>         I seem to recall that Windows has some problem passing command line
> arguments when the first item (the "program") isn't directly executable.
>
> http://stackoverflow.com/questions/2640971/windows-is-not-passing-com...http://stackoverflow.com/questions/7860872/run-python-scripts-from-wi...
>
> (or for the full google list;http://www.google.com/search?q=windows%20python%20command%20line%20ar...
> )
> --
>         Wulfraed                 Dennis Lee Bieber         AF6VN
>         wlfr...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


Thanks for the reply Dennis. . .Yeah, I have tried that, LOL. Several
different ways actually. From what I can tell, it seems to solve this
problem for MOST people, but NOT me, lol.

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

"syncdb --database=xxx" not working

Hello,

I've tried to setup a project that supports two different databases, a
postgres-db and a mysql-db. The DATABASES-setting is configured
properly with a 'default' key for the mysql-db and 'pg' for the
postgres. However, if I try to syncdb the postgres-db, manage.py
accesses the 'default' mysql-db.
This is what I enter in the commandline: "python manage.py syncdb --
database=pg", like documented here: <https://docs.djangoproject.com/en/
1.3/topics/db/multi-db/>
It seems that the --database option is ignored. Why?

Regards,
Andreas

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

Re: django-admin.py startproject will NOT work.

On Fri, 30 Dec 2011 16:36:32 -0800 (PST), Chris Kavanagh
<ckava3@gmail.com> wrote:

>> I'm not sure you'll be able to see the screenshot at the link, it's very small. So, here's a copy/paste of it from my command prompt:
>
>
>
>
>C:\Documents and Settings\mysite>django-admin.py startproject mysite

Have you tried that while explicitly specifying the Python
interpreter on the line?

I seem to recall that Windows has some problem passing command line
arguments when the first item (the "program") isn't directly executable.

http://stackoverflow.com/questions/2640971/windows-is-not-passing-command-line-arguments-to-python-programs-executed-from-t
http://stackoverflow.com/questions/7860872/run-python-scripts-from-windows-command-line-argument-not-passed

(or for the full google list;
http://www.google.com/search?q=windows%20python%20command%20line%20argument%20passing&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&source=hp&channel=np
)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Django app for IP address lookup

Thanks.

Do you have an API for it yet? so we can do something like http://dazzlepod.com/ip/api/json/1x7.x37.8.xx and get the data in JSON?


On Sat, Dec 31, 2011 at 4:09 PM, yati sagade <yati.sagade@gmail.com> wrote:
Nice app :) can you share the sources? And happy new year to you, too!


On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow <ayeowch@gmail.com> wrote:
Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

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

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

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

Re: Django app for IP address lookup

Nice app :) can you share the sources? And happy new year to you, too!

On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow <ayeowch@gmail.com> wrote:
Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

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

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

Django app for IP address lookup

Hi guys,

Just sharing a simple Django app that allows you to do IP address lookup:

Happy new year!

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

Re: Managers of related fields

On Fri, 30 Dec 2011 19:37:54 -0800 (PST)
Daniel Kaplun <min@dvir.us> wrote:

> I have Articles that refer to Authors using
> ForeignKey(related_name='articles'). Given an Author author, I'd like
> to be able to use the default manager for author.articles, but I'd
> also like to have author.published_articles, using a custom manager.
> Is this possible?

At the moment, this is not possible, as Django always uses the default
manager when doing the reverse lookup on foreign keys (as well as when
doing lookups in many-to-many relations).

However, there is a patch currently pending review in ticket #3871 [1]
which makes it possible to select which manager instead of the default
manager is used in these lookups.


As I wrote the last iteration of this patch myself, I cannot review it
myself. If you feel confident, please have a look at it and mark it as
"ready for check-in" if you think it is.

Otherwise please head over to <django-developers@googlegroups.com> and
present your use-case there, hopefully finding somebody who can take a
look at the latest progress in ticket #3871.

Regards,
Sebastian.

[1] https://code.djangoproject.com/ticket/3871

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

Re: Unable to display static content.

use {{STATIC_URL}} in place of {{MEDIA_URL}} and keep STATIC_ROOT =' ' in settings page.

refer : https://docs.djangoproject.com/en/dev/howto/static-files/

On Sat, Dec 31, 2011 at 7:42 AM, Chirdeep <chirdeep.tomar@gmail.com> wrote:
Hi All,

I am just learning Python and Django. I am able to see the webpage but
css and images are not picked up.

Configuration as below:

Linux Ubuntu 11.04
Python 2.7.2
Django 1.3.1

I have setup Django using VirtualEnv. I am using PyCharm and my Django
project is pointing to the VirtualEnv Django installation.

In firebug, I am getting 404 for css and images.

Project Structure.

ProjectRoot
-media
  -images
  -stylesheets
-templates
-webapp

urls.py
------------------------------------------------------------------------------------------
from django.conf.urls.defaults import patterns, include, url
import settings
from talenthunt.web import views

urlpatterns = patterns('',
   url(r'^search-form/$', views.search_form),
   url(r'^search/$', views.search),
)

if settings.DEBUG:
   urlpatterns += patterns('',
       (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
           'document_root': settings.MEDIA_ROOT}))


settings.py
---------------------------------------------------------------------------------------
def rel(*x):
   return os.path.join(os.path.abspath(os.path.dirname(__file__)),
*x )

MEDIA_ROOT = rel('media')
MEDIA_URL = '/media/'

STATIC_ROOT = rel('static')
STATIC_URL = '/static/'

ADMIN_MEDIA_PREFIX = '/media/admin/'

Only pasting relevant code from settings.py

Base.html
------------------------------------------------------------------------------------------
<head>
   <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
   <title>Organic Web Design</title>
   <link href="{{ MEDIA_URL }}stylesheets/common.css"
rel="stylesheet" type="text/css" />
</head>

Any help will be much appreciated.

Thanks
Chirdeep



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


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