Re: Database setup

2019-05-13 Thread Devender Kumar
You need to make model for that where managed = false in class meta of the 
model. 
even you can generate complete table model from the db.

On Friday, May 10, 2019 at 8:29:40 PM UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
>
> I have one existing table in my database then how I can use the same table 
> in my models.py.
>
> Thank You. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b72208ad-4983-426b-8de3-664b4ba0a960%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database setup

2019-05-10 Thread Lucas G. Navarro
Hi Soumen, i think that what you need is this  [1]


Regards!

El vie., 10 may. 2019 a las 11:59, Soumen Khatua ()
escribió:

> Hi Folks,
>
> I have one existing table in my database then how I can use the same table
> in my models.py.
>
> Thank You.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6WakznFSEwPXtisj9rz782HEKxEDVE10GC1nNtEL7dGMOg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABomRVUHmLMbMXXhN4bD7WxzgrmmB2Kt2M3A6p7_1nwNk6SdEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database setup

2019-04-22 Thread Sipum
Hi somen,

Just Open xampp control panel and run apache and mySQL sever.
then go to localhost/phpmyadmin in browser and there create a database as u 
do for php.

then in search DATABASE in settings.py file (which would be created when u 
create a project in django) do the below changes -
 
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'webapp', --> name of db which u created b4
'USER': 'root',--> user is root 
'PASSWORD': '',   > it is pasword less
'HOST': '127.0.0.1',---> this is for local host
'PORT': '3306',   > this port number u will get 
from xampp control panel where u start MYSQL
}


Hope it will help... Njoy



On Saturday, 20 April 2019 09:52:05 UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
> How can I configure xampp server provided mysql database in django.
>
> Thank you.  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b941ec4c-d348-4ce6-80de-bd433893b0b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database setup

2019-04-20 Thread Okware Aldo
So if you launch xampp and you are sure all the services are running.
services (Apache, MySQL, and PHP), xampp also ships with phpmyadmin a mysql
webbased interface. which you can launch by typing `localhost/phpmyadmin`
in any browser of choice.

Once the PHPMyAdmin interface is launched. using this tool you can create a
MySQL DB, create a user with password and attach the user to that database

if you have a database already you could use the default root user for
MySQL, there is usually no password. so you username: root and password
would be blank, I don't recommend this, it's not a good practice.

https://www.youtube.com/watch?v=1-81n_vuwug

On Fri, Apr 19, 2019 at 10:58 PM Soumen Khatua 
wrote:

> Yes I already install xampp server but what will be my password? Actually
> for development purpose xampp server not accept any password, I guess!!
>
>
> Thank you for your valuable time.
>
> On Sat, 20 Apr 2019, 10:48 Okware Aldo,  wrote:
>
>> Hey, If you have xampp installed, just create a database using
>> phpmyadmin, attach a user to that database.
>> then ensure you have a driver package installed and setup for django. eg.
>> pymsql has worked well for.
>> then make the necessary changes in django settings file.
>>
>>
>> On Fri, Apr 19, 2019 at 9:21 PM Soumen Khatua 
>> wrote:
>>
>>> Hi Folks,
>>> How can I configure xampp server provided mysql database in django.
>>>
>>> Thank you.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAPUw6WZXNhKtx4zkUk-tqjSTvfBU%2BhFKuzqXG-UzHmDzT9iZyg%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMEZma_4bR_yUbUTWJCB_JhmRXWqEHpgzGzQp24qCCr%3DG%3DjQvg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6WZ9FfDQi2dewUuL4W%2BV9XEsafK4Fmp-XiV72ySyNdYZGw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMEZma9ypAVxv%3DfMMs%2B0Q3CtzdoUNxC06M1t8QiT19s4-iE7Pg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database setup

2019-04-19 Thread Soumen Khatua
Yes I already install xampp server but what will be my password? Actually
for development purpose xampp server not accept any password, I guess!!


Thank you for your valuable time.

On Sat, 20 Apr 2019, 10:48 Okware Aldo,  wrote:

> Hey, If you have xampp installed, just create a database using phpmyadmin,
> attach a user to that database.
> then ensure you have a driver package installed and setup for django. eg.
> pymsql has worked well for.
> then make the necessary changes in django settings file.
>
>
> On Fri, Apr 19, 2019 at 9:21 PM Soumen Khatua 
> wrote:
>
>> Hi Folks,
>> How can I configure xampp server provided mysql database in django.
>>
>> Thank you.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPUw6WZXNhKtx4zkUk-tqjSTvfBU%2BhFKuzqXG-UzHmDzT9iZyg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMEZma_4bR_yUbUTWJCB_JhmRXWqEHpgzGzQp24qCCr%3DG%3DjQvg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WZ9FfDQi2dewUuL4W%2BV9XEsafK4Fmp-XiV72ySyNdYZGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database setup

2019-04-19 Thread Okware Aldo
Hey, If you have xampp installed, just create a database using phpmyadmin,
attach a user to that database.
then ensure you have a driver package installed and setup for django. eg.
pymsql has worked well for.
then make the necessary changes in django settings file.


On Fri, Apr 19, 2019 at 9:21 PM Soumen Khatua 
wrote:

> Hi Folks,
> How can I configure xampp server provided mysql database in django.
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6WZXNhKtx4zkUk-tqjSTvfBU%2BhFKuzqXG-UzHmDzT9iZyg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMEZma_4bR_yUbUTWJCB_JhmRXWqEHpgzGzQp24qCCr%3DG%3DjQvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database setup Issue

2013-03-21 Thread Antoni Aloy
You have to create first the database in Postgresql, give it a name and a
password, and configure it to allow connections. Then you have to configure
the database settings with the database name, ip, user and password.

If you're doing the tutorial is much better to stay in sqlite3, so you'll
have less noise and you could focus on the tutorial itself.


2013/3/21 Kamalakannan Srinivasan 

> Hi,
>
> I installed PostgreSQL 8.4.16 and was trying to set up the database as
> specified in the tutorial under djangoproject.com. I gave the Engine name
> as 'django.db.backends.postgresql_psycopg2' and Name as 'PostgreSQL' and
> ran the python manage.py syncdb command. But it gave the error 'database
> PostgreSQL' does not exist.
>
> I even gave the name in different ways - in caps, in small cases,
> suffixing version number etc. But everything returned similar errors.
>
> Please help with a workaround.
>
> Thanks and regards,
> Kamal
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Antoni Aloy López
Blog: http://trespams.com
Site: http://apsl.net

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




Re: Database setup

2012-10-30 Thread Jirka Vejrazka
Hi Markus,

  I don't think you mentioned what OS you use on your machine with Django.

  If it helps, I had this in my settings.py when connecting to MS SQL
database from Linux

'mssql': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'mdb',
'USER': USERNAME,
'PASSWORD': PASSWORD,
'OPTIONS': {
'driver': 'FreeTDS',
'encoding': 'latin1',  # see django-pyodbc issue #24
# UAPM uses SQL_Latin1_General_CP1_CI_AS
'dsn': 'mssql', # see /etc/odbc.ini
},

  There was some extra client libraries installed and a configuration
had to be do be done for system ODBC. Can't help you there, memory
failing :)

  HTH

   Jirka

-- 
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: Database setup

2012-10-30 Thread Markus Christen

>
> What i know now:
>  
>
-- 

>  
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'baan5c',
> 'USER': '***',
> 'PASSWORD': '*',
> 'HOST': 'MAURITIUS',
> 'PORT': '1433',
> }
> }
>
-- 

>  
> This will works, if my DB is a mysql. But I use MsSql.
> The pyodbc is installed and i made connects over it, to the DB. But for 
> settings.py, i cant find the base.py of this pyodbc.
> Any idea where i can find it?
>

-- 
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/-/-SD8TV-mOV4J.
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: Database setup

2012-10-29 Thread Tom Evans
On Mon, Oct 29, 2012 at 3:54 PM, Onyx Fields
 wrote:
> I wish I could help as well, but I just started with the tutorial (HERE),
> and I am not following the Database Setup either.  Perhaps someone who is
> more familiar with it could explain it in layman's terms for a noob like
> myself?
>

Are you also trying to set up an ODBC connection to Lotus Notes? If
not ,starting a thread about your own issues would be more
appropriate.

Cheers

Tom

-- 
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: Database setup

2012-10-29 Thread Onyx Fields
I wish I could help as well, but I just started with the tutorial 
(HERE), 
and I am not following the Database Setup either.  Perhaps someone who is 
more familiar with it could explain it in layman's terms for a noob like 
myself?

On Monday, October 29, 2012 1:40:01 AM UTC-7, Markus Christen wrote:
>
> Good Morning
> First i made an odbc connect liek this:
>  
> -
> import pyodbc
> cnxn = pyodbc.connect('DRIVER={SQL 
> Server};SERVER=MAURITIUS;DATABASE=baan5c;UID=***;PWD=*')
> cursor = cnxn.cursor()
> cursor.execute("SELECT x.t_name, y.t_mail FROM tttaad20 as x, 
> tttcmf20 as y WHERE (x.t_name = y.t_name) AND (x.t_user = 'muster')")
> row = cursor.fetchall()
> if row:
>  print row
> 
> This gave me out the correct data (name + e-mail) from a user.
> I tryed now to use this database in the Admin site, but i'm to stupid to 
> implements this correct into the Database Setup.
> The server is not on my computer, it is in the same LAN
>  
> Can someone help me please?
>

-- 
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/-/bzVq0jZqI4oJ.
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: Database setup

2012-10-29 Thread Markus Christen
EDIT:
I have a second to implements. Its a Lotus Notes DB, and for the userauth 
there is a file on my computer.
I tryed it with  the odbc of IBM:
 
---
import pyodbc
conn = pyodbc.connect('DRIVER={Lotus Notes SQL Driver 
(*.nsf)};SERVER=Wind/Sefar;DATABASE=Kopie_SCHSales.nsf;UID=***/M/CHTHA/Sefar;PWD=*');
---
 
I can connect, but i cant read out data, thats my i try with this Admin 
Site.
Do someone know how to implements?
I know how to make Multiple DB's...

-- 
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/-/uyf5Zc1AhB8J.
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: Database Setup

2010-10-27 Thread Sithembewena Lloyd Dube
Thanks Everett!

On Sat, Oct 23, 2010 at 4:24 AM, Everett  wrote:

> Thanks everyone for all your help! I found a binary for Python 2.7
> Here's a the link: http://www.codegood.com/archives/129
> Just in case someone stumbles upon these posts.
>
> On Oct 16, 3:58 pm, Karen Tracey  wrote:
> > 2010/10/16 Jonathan Barratt 
> >
> > > Hope you have visual studio installed! :p
> >
> > If you do not, or if you do not want to go to the trouble of building
> > MySQLdb from source, it is usually possible to find Windows binary
> packages
> > for MySQLdb by searching Google with terms like:
> >
> > mysqldb windows binaries python 2.7
> >
> > I have never built MySQLdb from scratch on Windows, I've always used
> > pre-built binaries. (Though I have also not yet bothered to find binaries
> > for Python 2.7...I have Windows boxes and use them for testing Django but
> I
> > do not actually do any Django development on them, and I have not had
> time
> > lately to do much Windows testing.)
> >
> > Karen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>


-- 
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.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-us...@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: Database Setup

2010-10-22 Thread Everett
Thanks everyone for all your help! I found a binary for Python 2.7
Here's a the link: http://www.codegood.com/archives/129
Just in case someone stumbles upon these posts.

On Oct 16, 3:58 pm, Karen Tracey  wrote:
> 2010/10/16 Jonathan Barratt 
>
> > Hope you have visual studio installed! :p
>
> If you do not, or if you do not want to go to the trouble of building
> MySQLdb from source, it is usually possible to find Windows binary packages
> for MySQLdb by searching Google with terms like:
>
> mysqldb windows binaries python 2.7
>
> I have never built MySQLdb from scratch on Windows, I've always used
> pre-built binaries. (Though I have also not yet bothered to find binaries
> for Python 2.7...I have Windows boxes and use them for testing Django but I
> do not actually do any Django development on them, and I have not had time
> lately to do much Windows testing.)
>
> Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database Setup

2010-10-16 Thread Karen Tracey
2010/10/16 Jonathan Barratt 

> Hope you have visual studio installed! :p


If you do not, or if you do not want to go to the trouble of building
MySQLdb from source, it is usually possible to find Windows binary packages
for MySQLdb by searching Google with terms like:

mysqldb windows binaries python 2.7

I have never built MySQLdb from scratch on Windows, I've always used
pre-built binaries. (Though I have also not yet bothered to find binaries
for Python 2.7...I have Windows boxes and use them for testing Django but I
do not actually do any Django development on them, and I have not had time
lately to do much Windows testing.)

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database Setup

2010-10-16 Thread Jonathan Barratt

On 17 ?.?. 2010, at 0:03, Everett wrote:

> Ok...I'm confused nowdo I have to build the bindings or just copy
> them into the site-packages directory?

I'm not sure this advice:

>> I recall having a similar problem. Get the MySQL bindings appropriate to
>> your Python version below and install to your site-packages folder:
>> 
>> http://sourceforge.net/projects/mysql-python/

Was taking into account the fact that your OS is Windows - it's not a simple 
install to site-packages for you I'm afraid...

I don't have a windows machine, and am using postgres with Django myself, but I 
did some digging for you on the project's forums and found this link which 
looks like it does the trick:

http://www.bcspcsonline.com/wiki/index.php?title=MySQL-5.1.34_Python-2.6_Module_Build_Instructions

Hope you have visual studio installed! :p

Good luck!
Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database Setup

2010-10-16 Thread Everett
Ok...I'm confused nowdo I have to build the bindings or just copy
them into the site-packages directory?

On Oct 14, 4:26 am, Sithembewena Lloyd Dube  wrote:
> I recall having a similar problem. Get the MySQL bindings appropriate to
> your Python version below and install to your site-packages folder:
>
> http://sourceforge.net/projects/mysql-python/
>
> 2010/10/13 Everett 
>
>
>
>
>
>
>
> > On Oct 13, 2:34 am, Jonathan Barratt 
> > wrote:
> > > On 13 ต.ค. 2010, at 10:19, Everett wrote:
>
> > > > I'm running Django on Windows. When I edited the settings.py file for
> > > > the MySql database I'm running in an XAMPP package, the Django
> > > > development server throws a bunch of unhandled exceptions. It starts
> > > > out like this:
>
> > > 
>
> > > The most useful error message will be the last entry in the traceback
> > rather than the start of it. Please provide that message and we may have
> > more to go on.
>
> > > > Is this because of how I'm running the MySQL database? Or the
> > > > information in the settings.py file is off? Cause when I take all the
> > > > database settings out of the settings.py file the development server
> > > > runs fine.
>
> > > If there are no DB settings then obviously Django doesn't try to talk to
> > the DB, so yes that does suggest the problem is in the Django-DB
> > interaction.
>
> > > 
>
> > > > Any ideas?
>
> > > The first idea that pops into my head is that you may not have Python's
> > MySQL bindings installed (perhttp://
> > docs.djangoproject.com/en/dev/topics/install/#get-your-databas...), which
> > is available athttp://sourceforge.net/projects/mysql-python/
>
> > > If do already have that package installed then we'll just have to see the
> > most recent call that threw an exception...
>
> > > Best wishes,
> > > Jonathan
>
> > Ok I was just assuming Python already had the MySQL bindings.
> > So I've downloaded the MySQL-python-1.2.3.tar.gz, I decompressed it,
> > read that I needed easy_install or setuptools. So I installed
> > setuptools/easy_install but for some reason it won't install the MySQL-
> > python files. I tried getting easy_install to download it, wouldn't
> > work. I tried to get it to use the compressed version, still didn't
> > work. I'm guessing it's not working cause the easy_install needs an
> > egg file, yet there doesn't seem to be one in any of the directories.
>
> > As for the errors at the bottom of the thrown exceptions:
>
> > raise ImproperlyConfigured("Error loading MySQLdb module: %s" %e)
> > django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> > module: No module named MySQLdb
>
> > does that help?
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Regards,
> Sithembewena Lloyd Dubehttp://www.lloyddube.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-us...@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: Database Setup

2010-10-14 Thread Sithembewena Lloyd Dube
I recall having a similar problem. Get the MySQL bindings appropriate to
your Python version below and install to your site-packages folder:

http://sourceforge.net/projects/mysql-python/

2010/10/13 Everett 

>
>
> On Oct 13, 2:34 am, Jonathan Barratt 
> wrote:
> > On 13 ?.?. 2010, at 10:19, Everett wrote:
> >
> > > I'm running Django on Windows. When I edited the settings.py file for
> > > the MySql database I'm running in an XAMPP package, the Django
> > > development server throws a bunch of unhandled exceptions. It starts
> > > out like this:
> >
> > 
> >
> > The most useful error message will be the last entry in the traceback
> rather than the start of it. Please provide that message and we may have
> more to go on.
> >
> > > Is this because of how I'm running the MySQL database? Or the
> > > information in the settings.py file is off? Cause when I take all the
> > > database settings out of the settings.py file the development server
> > > runs fine.
> >
> > If there are no DB settings then obviously Django doesn't try to talk to
> the DB, so yes that does suggest the problem is in the Django-DB
> interaction.
> >
> > 
> >
> > > Any ideas?
> >
> > The first idea that pops into my head is that you may not have Python's
> MySQL bindings installed (perhttp://
> docs.djangoproject.com/en/dev/topics/install/#get-your-databas...), which
> is available athttp://sourceforge.net/projects/mysql-python/
> >
> > If do already have that package installed then we'll just have to see the
> most recent call that threw an exception...
> >
> > Best wishes,
> > Jonathan
>
> Ok I was just assuming Python already had the MySQL bindings.
> So I've downloaded the MySQL-python-1.2.3.tar.gz, I decompressed it,
> read that I needed easy_install or setuptools. So I installed
> setuptools/easy_install but for some reason it won't install the MySQL-
> python files. I tried getting easy_install to download it, wouldn't
> work. I tried to get it to use the compressed version, still didn't
> work. I'm guessing it's not working cause the easy_install needs an
> egg file, yet there doesn't seem to be one in any of the directories.
>
> As for the errors at the bottom of the thrown exceptions:
>
> raise ImproperlyConfigured("Error loading MySQLdb module: %s" %e)
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> module: No module named MySQLdb
>
> does that help?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>


-- 
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.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-us...@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: Database Setup

2010-10-14 Thread Greg Fuller
This can be a pain on windows, because there is usually no compiler
for setup to build the "binary" version of the adaptor.  The easiest
course of action is to find a binary for the version of python you are
running.  I haven't seen any for 2.7 yet but searching for "python
msqldb windows binary" will expose some binaries for earlier
versions.  I usually work on mac, but for my windows box at work I
reverted to an earlier version of python just to get mysql (and PIL)
working

On Oct 12, 10:19 pm, Everett  wrote:
> I'm running Django on Windows. When I edited the settings.py file for
> the MySql database I'm running in an XAMPP package, the Django
> development server throws a bunch of unhandled exceptions. It starts
> out like this:
>
> Unhandled exception in thread started by  0x01F69E70>
> Traceback (most recent call last):
> File "D:\Python27\lib\site-packages\django\core\managment\base.py",
> line 249 in validate
>
> Is this because of how I'm running the MySQL database? Or the
> information in the settings.py file is off? Cause when I take all the
> database settings out of the settings.py file the development server
> runs fine.
>
> Database settings:
>
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'djangodb',
> 'USER': 'admin',
> 'PASSWORD': ' ',
> 'HOST': 'localhost',
> 'PORT': ' ',
>
> Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database Setup

2010-10-14 Thread Jonathan Barratt
On 14 ?.?. 2010, at 1:32, Everett wrote:
> 

> Ok I was just assuming Python already had the MySQL bindings.
> So I've downloaded the MySQL-python-1.2.3.tar.gz, I decompressed it,
> read that I needed easy_install or setuptools. So I installed
> setuptools/easy_install but for some reason it won't install the MySQL-
> python files. I tried getting easy_install to download it, wouldn't
> work. I tried to get it to use the compressed version, still didn't
> work. I'm guessing it's not working cause the easy_install needs an
> egg file, yet there doesn't seem to be one in any of the directories.

You don't mention what OS you're running, nor show us the commands, and their 
corresponding errors, that you have tried to install with so far. I've only 
dealt with postgres and Django, so Google will be of more help to you than I 
can, but perhaps with those missing details provided others on this list can 
help.

> As for the errors at the bottom of the thrown exceptions:
> 
> raise ImproperlyConfigured("Error loading MySQLdb module: %s" %e)
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> module: No module named MySQLdb
> 
> does that help?

It does confirm that the problem is the missing DB bindings...

Good luck,
Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database Setup

2010-10-13 Thread Everett


On Oct 13, 2:34?am, Jonathan Barratt 
wrote:
> On 13 ?.?. 2010, at 10:19, Everett wrote:
>
> > I'm running Django on Windows. When I edited the settings.py file for
> > the MySql database I'm running in an XAMPP package, the Django
> > development server throws a bunch of unhandled exceptions. It starts
> > out like this:
>
> 
>
> The most useful error message will be the last entry in the traceback rather 
> than the start of it. Please provide that message and we may have more to go 
> on.
>
> > Is this because of how I'm running the MySQL database? Or the
> > information in the settings.py file is off? Cause when I take all the
> > database settings out of the settings.py file the development server
> > runs fine.
>
> If there are no DB settings then obviously Django doesn't try to talk to the 
> DB, so yes that does suggest the problem is in the Django-DB interaction.
>
> 
>
> > Any ideas?
>
> The first idea that pops into my head is that you may not have Python's MySQL 
> bindings installed 
> (perhttp://docs.djangoproject.com/en/dev/topics/install/#get-your-databas...),
>  which is available athttp://sourceforge.net/projects/mysql-python/
>
> If do already have that package installed then we'll just have to see the 
> most recent call that threw an exception...
>
> Best wishes,
> Jonathan

Ok I was just assuming Python already had the MySQL bindings.
So I've downloaded the MySQL-python-1.2.3.tar.gz, I decompressed it,
read that I needed easy_install or setuptools. So I installed
setuptools/easy_install but for some reason it won't install the MySQL-
python files. I tried getting easy_install to download it, wouldn't
work. I tried to get it to use the compressed version, still didn't
work. I'm guessing it's not working cause the easy_install needs an
egg file, yet there doesn't seem to be one in any of the directories.

As for the errors at the bottom of the thrown exceptions:

raise ImproperlyConfigured("Error loading MySQLdb module: %s" %e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: No module named MySQLdb

does that help?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database Setup

2010-10-13 Thread Jonathan Barratt
On 13 ?.?. 2010, at 10:19, Everett wrote:

> I'm running Django on Windows. When I edited the settings.py file for
> the MySql database I'm running in an XAMPP package, the Django
> development server throws a bunch of unhandled exceptions. It starts
> out like this:


The most useful error message will be the last entry in the traceback rather 
than the start of it. Please provide that message and we may have more to go on.

> Is this because of how I'm running the MySQL database? Or the
> information in the settings.py file is off? Cause when I take all the
> database settings out of the settings.py file the development server
> runs fine.

If there are no DB settings then obviously Django doesn't try to talk to the 
DB, so yes that does suggest the problem is in the Django-DB interaction.


> Any ideas?

The first idea that pops into my head is that you may not have Python's MySQL 
bindings installed (per 
http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running),
 which is available at http://sourceforge.net/projects/mysql-python/ 

If do already have that package installed then we'll just have to see the most 
recent call that threw an exception...

Best wishes,
Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Database setup

2007-07-14 Thread Carl Karsten

surfwizz wrote:
> I'm trying to do the django tutorial at 
> http://www.djangoproject.com/documentation/tutorial01/,
> but I don't know how to set up a database.  I do not have a dedicated
> server or web hosting at this time, and I want to do some work on
> setting up a website with database systems before I get web hosting.
> Can I make a database stored locally? if yes, how?

# settings.py
...
DATABASE_ENGINE = 'sqlite3'   # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'foo'
...

That is all you need (for DATABASE settings)  syncdb will create the database 
for you (called 'foo' in your  project dir.  which is fine for now.)

All that other stuff postdd is correct, but probably over your head at this 
point, so don't worry about it if you didn't understand.


Carl K

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Database setup

2007-07-14 Thread Tim Chase

> Sure you can. You might want to look at sqlite, as it's the
> easiest to set up. You can painlessly switch to a "better"
> database engine when going to production, though sqlite does
> quite well the job, even in production.

I second Christian's suggestion of using sqlite for its
minimal-fuss configuration (the OS permissions for the
web-server/django process on the database file are the
permissions you get).  It even has a ":memory:" database which is
handy for testing purposes (never touching a file).

I would add a small caveat to "painlessly":  it's painless unless
you try and monkey with the underlying SQL through either an
extra() call or hacking the ORM, both of which I do far too
regularly.  If you mess with either of these more obscure corners
of Django (okay, the extra() isn't obscured as it's right there
in the docs, but not many folks seem to know about it or use it),
you just have to be careful that your SQL is portable across the
various servers you expect to support.

However, if you avoid touching DB specific code, the Django ORM
does a rather good job of abstracting most of this stuff away so
your code becomes portable across DB engines.

-tim



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Database setup

2007-07-14 Thread Christian Hoeppner

Sure you can. You might want to look at sqlite, as it's the easiest to 
set up. You can painlessly switch to a "better" database engine when 
going to production, though sqlite does quite well the job, even in 
production.



surfwizz escribió:
> I'm trying to do the django tutorial at 
> http://www.djangoproject.com/documentation/tutorial01/,
> but I don't know how to set up a database.  I do not have a dedicated
> server or web hosting at this time, and I want to do some work on
> setting up a website with database systems before I get web hosting.
> Can I make a database stored locally? if yes, how?
>
>
> >
>   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---