Re: setting up new django project

2012-06-21 Thread Harjot Mann
you can use both methods.If you are getting a permission denied error by
giving full path,
then you have to change the permissions by using following command:

sudo chmod +x /usr/local/bin/django-admin.py

but its not necessary to give the whole path, infact the alternate method
is easier.

In most unix-like systems django is found in site packages
but in python2.6 and python2.7 django is found in dist packages
On Thu, Jun 21, 2012 at 2:26 PM, Gelonida N  wrote:

> On 05/28/2012 04:53 AM, xaegis wrote:
>
>> Hello, this is my first time posting to a list!
>>  I am running python 2.7 with django 1.4 installed on Ubuntu 12.04
>> I am having trouble creating new projects with django. Whenever I use
>> the command:
>> Code:
>>
>> sudo /usr/local/lib/python2.7/dist-**packages/django/bin/django-**
>> admin.py
>> startproject cms
>>
>> I get errors or permission denied messages but if I use:
>> Code:
>>
>>
> Just one other comment.
>
> Are you really sure, that you want to create a Django project with root
> privileges?
>
> This is rather unusual.
>
> Why do you want to do this?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

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



Re: setting up new django project

2012-06-21 Thread Gelonida N

On 05/28/2012 04:53 AM, xaegis wrote:

Hello, this is my first time posting to a list!
  I am running python 2.7 with django 1.4 installed on Ubuntu 12.04
I am having trouble creating new projects with django. Whenever I use
the command:
Code:

sudo /usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py
startproject cms

I get errors or permission denied messages but if I use:
Code:



Just one other comment.

Are you really sure, that you want to create a Django project with root 
privileges?


This is rather unusual.

Why do you want to do this?

--
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: setting up new django project

2012-06-20 Thread Peter of the Norse

On 5/27/2012 8:53 PM, xaegis wrote:

Hello, this is my first time posting to a list!
  I am running python 2.7 with django 1.4 installed on Ubuntu 12.04
I am having trouble creating new projects with django. Whenever I use
the command:
Code:

sudo /usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py
startproject cms

I get errors or permission denied messages but if I use:
Code:

django-admin.py startproject cms

Everything seems to work correctly. I know at some point I created a
sym link in:
Code:

/usr/local/bin

but is this the proper way to do this? Should I be using the full path
instead? Also, why is django found in dist-packages instead of site-
packages in the python directory? The books I am using are telling me
the python files should be located in site-packages.
You are most likely getting that error message because you have more 
than one copy of Django installed. Find out what version of 
django-admin.py you're using by doing:


$ whereis django-admin.py

It's possible that you installed Django using the system tools (apt-get, 
rpm, etc.) and that has preference over the one in /usr/local/bin.



I also noticed that django "startproject" created two directories
called "cms" one nested inside the other. Is this the default
behavior, and why?
It is as of 1.4. The things inside of cms/cms tend not to be that 
portable between sites while all of the app directories should show up 
as cms/app_1.

I am also having trouble setting up the sqlite3 back-end and I keep
getting the error:

Code:
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
sqlite3/base.py", line 281, in _cursor
 self._sqlite_create_connection()
   File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
sqlite3/base.py", line 271, in _sqlite_create_connection
 self.connection = Database.connect(**kwargs)
pysqlite2.dbapi2.OperationalError: unable to open database file


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



Re: setting up new django project

2012-05-27 Thread azizmb.in
HI

You should have a look at
virtualenv
 and virtualenvwrapper
.

On Mon, May 28, 2012 at 8:23 AM, xaegis  wrote:

> Hello, this is my first time posting to a list!
>  I am running python 2.7 with django 1.4 installed on Ubuntu 12.04
> I am having trouble creating new projects with django. Whenever I use
> the command:
> Code:
>
> sudo /usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py
> startproject cms
>
> I get errors or permission denied messages but if I use:
> Code:
>
> django-admin.py startproject cms
>
> Everything seems to work correctly. I know at some point I created a
> sym link in:
> Code:
>
> /usr/local/bin
>
> but is this the proper way to do this? Should I be using the full path
> instead? Also, why is django found in dist-packages instead of site-
> packages in the python directory? The books I am using are telling me
> the python files should be located in site-packages.
>
> I also noticed that django "startproject" created two directories
> called "cms" one nested inside the other. Is this the default
> behavior, and why?
>
>
> I am also having trouble setting up the sqlite3 back-end and I keep
> getting the error:
>
> Code:
> File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
> sqlite3/base.py", line 281, in _cursor
>self._sqlite_create_connection()
>  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
> sqlite3/base.py", line 271, in _sqlite_create_connection
>self.connection = Database.connect(**kwargs)
> pysqlite2.dbapi2.OperationalError: unable to open database file
>
>
> Thanks 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.
>
>


-- 
- Aziz M. Bookwala

Website  | Twitter  |
Github 

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



setting up new django project

2012-05-27 Thread xaegis
Hello, this is my first time posting to a list!
 I am running python 2.7 with django 1.4 installed on Ubuntu 12.04
I am having trouble creating new projects with django. Whenever I use
the command:
Code:

sudo /usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py
startproject cms

I get errors or permission denied messages but if I use:
Code:

django-admin.py startproject cms

Everything seems to work correctly. I know at some point I created a
sym link in:
Code:

/usr/local/bin

but is this the proper way to do this? Should I be using the full path
instead? Also, why is django found in dist-packages instead of site-
packages in the python directory? The books I am using are telling me
the python files should be located in site-packages.

I also noticed that django "startproject" created two directories
called "cms" one nested inside the other. Is this the default
behavior, and why?


I am also having trouble setting up the sqlite3 back-end and I keep
getting the error:

Code:
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
sqlite3/base.py", line 281, in _cursor
self._sqlite_create_connection()
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/
sqlite3/base.py", line 271, in _sqlite_create_connection
self.connection = Database.connect(**kwargs)
pysqlite2.dbapi2.OperationalError: unable to open database file


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