Re: SyntaxError Creating New Project

2012-09-20 Thread Stephen Anto
Hi Daniel,

I am not spamming. just inform you that how to create django projects with
initial steps.

I just replied for your 'SyntaxError Creating New Project' title.

I have prepared to make this answer for your questions. Is it related your
query or not?

On Thu, Sep 20, 2012 at 3:35 PM, Daniel Roseman <dan...@roseman.org.uk>wrote:

> On Thursday, 20 September 2012 05:20:56 UTC+1, Stephen Anto wrote:
>>
>> Hi,
>>
>> Just follow these 7 steps to start new project
>> http://f2finterview.com/web/**Django/17/<http://f2finterview.com/web/Django/17/>For
>>  more
>> http://f2finterview.com/web/**Django <http://f2finterview.com/web/Django>
>>
>>
>>
> Stephen, please stop spamming this list by posting the same link to your
> site over and over again.
> --
> Daniel.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/DmRKpNppH9MJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: SyntaxError Creating New Project

2012-09-20 Thread Daniel Roseman
On Thursday, 20 September 2012 05:20:56 UTC+1, Stephen Anto wrote:
>
> Hi,
>
> Just follow these 7 steps to start new project 
> http://f2finterview.com/web/Django/17/ For more 
> http://f2finterview.com/web/Django
>
>
>
Stephen, please stop spamming this list by posting the same link to your 
site over and over again.
--
Daniel. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/DmRKpNppH9MJ.
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: SyntaxError Creating New Project

2012-09-19 Thread Stephen Anto
Hi,

Just follow these 7 steps to start new project
http://f2finterview.com/web/Django/17/ For more
http://f2finterview.com/web/Django

On Wed, Sep 19, 2012 at 1:49 AM, Bestrafung  wrote:

> I restarted from the beginning using the previously mentioned guide but
> also a very helpful post on the cpanel.net forums and there were some
> missed steps and minor misconfigurations. Everthing seems to be working on
> the webserver side but now have some strange permissions issues that'll go
> into another post. I hope this helps anyone else interested in setting up
> Django on a CentOS 5.x cPanel system.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/GukGIRK-mpwJ.
> 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.
>



-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: SyntaxError Creating New Project

2012-09-18 Thread Bestrafung
I restarted from the beginning using the previously mentioned guide but 
also a very helpful post on the cpanel.net forums and there were some 
missed steps and minor misconfigurations. Everthing seems to be working on 
the webserver side but now have some strange permissions issues that'll go 
into another post. I hope this helps anyone else interested in setting up 
Django on a CentOS 5.x cPanel system.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/GukGIRK-mpwJ.
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: SyntaxError Creating New Project

2012-09-06 Thread Bestrafung
I've been extremely busy with other projects and just got back to this. It 
would appear you are correct about it not working correctly. I'm new to all 
of this and I'd have been lost long ago without that guide but it is 
severely lacking. Below is the result of the manage.py command.

[-bash-3.2 root@server1: 
/home/username/sites/domain.com/django/bin/testproject] # 
/opt/python2.5/bin/python manage.py
Traceback (most recent call last):
  File "manage.py", line 8, in 
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management


On Monday, August 27, 2012 6:07:50 PM UTC-4, Melvyn Sopacua wrote:
>
> On 27-8-2012 17:05, Bestrafung wrote: 
> > Ok, I think it's worked out now. I added the export line to the root 
> > .bash_profile and then changed the shebang in django-admin.py to 
> > "/opt/python2.5/bin python" and now everything seems to be working. 
>
> I imagine there's a typo there and no space, but a forward slash. 
> > If 
> > anyone is working on an older Red Hat/CentOS system and has to follow 
> the 
> > guide I'm following I hope this helps them. 
> > 
> It's kind of weird that this fix works without problems. You should try 
> the following in your project directory: 
> /opt/python2.5/bin/python manage.py shell 
> On the shell you get then: 
> >>> from django.db import models 
> >>> print models.__file__ 
>
> I'm quite interested what that shows since your installation seems to be 
> all over the place. 
>
> -- 
> Melvyn Sopacua 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/RzVoU1PEINkJ.
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: SyntaxError Creating New Project

2012-08-27 Thread Melvyn Sopacua
On 27-8-2012 17:05, Bestrafung wrote:
> Ok, I think it's worked out now. I added the export line to the root 
> .bash_profile and then changed the shebang in django-admin.py to 
> "/opt/python2.5/bin python" and now everything seems to be working.

I imagine there's a typo there and no space, but a forward slash.
> If 
> anyone is working on an older Red Hat/CentOS system and has to follow the 
> guide I'm following I hope this helps them.
> 
It's kind of weird that this fix works without problems. You should try
the following in your project directory:
/opt/python2.5/bin/python manage.py shell
On the shell you get then:
>>> from django.db import models
>>> print models.__file__

I'm quite interested what that shows since your installation seems to be
all over the place.

-- 
Melvyn Sopacua

-- 
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: SyntaxError Creating New Project

2012-08-27 Thread Bestrafung
Ok, I think it's worked out now. I added the export line to the root 
.bash_profile and then changed the shebang in django-admin.py to 
"/opt/python2.5/bin python" and now everything seems to be working. If 
anyone is working on an older Red Hat/CentOS system and has to follow the 
guide I'm following I hope this helps them.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/xgqKgMFwFD4J.
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: SyntaxError Creating New Project

2012-08-27 Thread Bestrafung
I ran python and checked the version number. This is what I get:

[-bash-3.2 root@server1: ~] # python
Python 2.5 (r25:51908, Aug 20 2012, 11:55:47)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

When I run "import django" I get:

>>> import django
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named django


I assumed this was normal since the guide I'm following has all of the 
django setup in the user's home directory. Is this the problem? I will keep 
looking into it, the guide had me enter export 
PYTHONPATH='$PYTHONPATH:/home/username/sites/domain.com' in the user's 
.bash_profile, since I am logged in as root should I add that to the 
/root/.bash_profile?

On Monday, August 27, 2012 9:51:22 AM UTC-4, Bestrafung wrote:
>
> Thank you all for the tips. I was pretty sure I tried using the full path 
> to the 2.5 install with the same error but I'll check again. I'll let you 
> know what I find.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/DVeH65k8aUcJ.
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: SyntaxError Creating New Project

2012-08-27 Thread Bestrafung
Thank you all for the tips. I was pretty sure I tried using the full path 
to the 2.5 install with the same error but I'll check again. I'll let you 
know what I find.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/90kVMNbxfawJ.
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: SyntaxError Creating New Project

2012-08-22 Thread Karen Tracey
On Wed, Aug 22, 2012 at 5:00 PM, Bestrafung  wrote:

> I'm new to Django and though I've dabbled with Linux off and on for a
> decade I'm still learning so please go easy on me. I'm following this
> guideto
>  setup a Django 1.4.1 test project. So far I've setup Python 2.5 with
> MySQL-python-1.2.3 and setuptools, setup mod_wsgi, and edited
> .bash_profile. I've downloaded Django 1.4.1 (not trunk) and so far
> everything looks good. As soon as I run "django-admin.py startproject
> testproject" I receive an error and am having trouble resolving it. I
> apologize if this has come up before bet a quick search wasn't helpful.
> Thanks in advance for any assistance, the error is below:
>
> [-bash-3.2 root@server1: /home/username/sites/domain.com] #
> /home/username/sites/domain.com/django/bin/django-admin.py startproject
> testproject
> Traceback (most recent call last):
>   File "/home/username/sites/domain.com/django/bin/django-admin.py", line
> 2, in ?
> from django.core import management
>   File "/home/username/sites/domain.com/django/__init__.py", line 15
> parts = 2 if version[2] == 0 else 3
>^
> SyntaxError: invalid syntax
> [-bash-3.2 root@server1: /home/username/sites/domain.com] #
>
> That error indicates the python executable processing django-admin.py is
Python 2.4 level, not 2.5. With Python 2.5 I can import django at level
1.4.1:

kmt@lbox 20:04:15: ~/software/web
--> python
Python 2.5.2 (r252:60911, Jan 20 2010, 23:16:55)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> quit()

If I try with Python 2.4 level, I get the error you are seeing:

kmt@lbox 20:04:45: ~/software/web
--> python2.4
Python 2.4.5 (#2, Jan 21 2010, 19:44:35)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
  File "", line 1, in ?
  File "/home/kmt/django/Django-1.4.1/django/__init__.py", line 15
parts = 2 if version[2] == 0 else 3
   ^
SyntaxError: invalid syntax
>>>

You may have python 2.5 installed, but you seem to have 2.4 also, and 2.4
is what's getting used for the command you are running.

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: SyntaxError Creating New Project

2012-08-22 Thread Alexis Roda

Al 22/08/12 23:00, En/na Bestrafung ha escrit:

I'm new to Django and though I've dabbled with Linux off and on for a
decade I'm still learning so please go easy on me. I'm following this
guide

to setup a Django 1.4.1 test project. So far I've setup Python 2.5 with
MySQL-python-1.2.3 and setuptools, setup mod_wsgi, and edited
.bash_profile. I've downloaded Django 1.4.1 (not trunk) and so far
everything looks good. As soon as I run "django-admin.py startproject
testproject" I receive an error and am having trouble resolving it. I
apologize if this has come up before bet a quick search wasn't helpful.
Thanks in advance for any assistance, the error is below:

[-bash-3.2 root@server1: /home/username/sites/domain.com] #
/home/username/sites/domain.com/django/bin/django-admin.py
startproject testproject
Traceback (most recent call last):
File "/home/username/sites/domain.com/django/bin/django-admin.py",
line 2, in ?
from django.core import management
File "/home/username/sites/domain.com/django/__init__.py", line 15
parts = 2 if version[2] == 0 else 3
^
SyntaxError: invalid syntax
[-bash-3.2 root@server1: /home/username/sites/domain.com] #


The "var = value if predicate else value" syntax was introduce in python 
2.5, so it seems like the python interpreter that's being used to run 
django-admin.py is older.


Try executing python and look at the version number. Check the shebang 
in the 'django-admin.py' too.


As a workaround execute:

/path/to/python2.5 /path/to/django-admin.py startproject testproject



HTH

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



Re: SyntaxError Creating New Project

2012-08-22 Thread Kurtis Mullins
Very weird. I ran the syntax and did not receive a syntax error. I just
checked on the documentation and it does say Python 2.5 is required, which
as you mentioned you have installed.

Maybe double-check to make sure that you're executing this with the right
Python executable? I'm running Python 2.7 if it makes a difference.

Here's a reference to the file that's giving you the error:
https://github.com/django/django/blob/1.4.1/django/__init__.py

On Wed, Aug 22, 2012 at 5:00 PM, Bestrafung  wrote:

> I'm new to Django and though I've dabbled with Linux off and on for a
> decade I'm still learning so please go easy on me. I'm following this
> guideto
>  setup a Django 1.4.1 test project. So far I've setup Python 2.5 with
> MySQL-python-1.2.3 and setuptools, setup mod_wsgi, and edited
> .bash_profile. I've downloaded Django 1.4.1 (not trunk) and so far
> everything looks good. As soon as I run "django-admin.py startproject
> testproject" I receive an error and am having trouble resolving it. I
> apologize if this has come up before bet a quick search wasn't helpful.
> Thanks in advance for any assistance, the error is below:
>
> [-bash-3.2 root@server1: /home/username/sites/domain.com] #
> /home/username/sites/domain.com/django/bin/django-admin.py startproject
> testproject
> Traceback (most recent call last):
>   File "/home/username/sites/domain.com/django/bin/django-admin.py", line
> 2, in ?
> from django.core import management
>   File "/home/username/sites/domain.com/django/__init__.py", line 15
> parts = 2 if version[2] == 0 else 3
>^
> SyntaxError: invalid syntax
> [-bash-3.2 root@server1: /home/username/sites/domain.com] #
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/WszNLKVNcxcJ.
> 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.



SyntaxError Creating New Project

2012-08-22 Thread Bestrafung
I'm new to Django and though I've dabbled with Linux off and on for a 
decade I'm still learning so please go easy on me. I'm following this 
guideto
 setup a Django 1.4.1 test project. So far I've setup Python 2.5 with 
MySQL-python-1.2.3 and setuptools, setup mod_wsgi, and edited 
.bash_profile. I've downloaded Django 1.4.1 (not trunk) and so far 
everything looks good. As soon as I run "django-admin.py startproject 
testproject" I receive an error and am having trouble resolving it. I 
apologize if this has come up before bet a quick search wasn't helpful. 
Thanks in advance for any assistance, the error is below:

[-bash-3.2 root@server1: /home/username/sites/domain.com] # 
/home/username/sites/domain.com/django/bin/django-admin.py startproject 
testproject
Traceback (most recent call last):
  File "/home/username/sites/domain.com/django/bin/django-admin.py", line 
2, in ?
from django.core import management
  File "/home/username/sites/domain.com/django/__init__.py", line 15
parts = 2 if version[2] == 0 else 3
   ^
SyntaxError: invalid syntax
[-bash-3.2 root@server1: /home/username/sites/domain.com] #


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/WszNLKVNcxcJ.
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.