Give Mysql prompt: python manage.py dbshell Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8255 to server version: 5.0.22 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> On Jul 2, 1:23 pm, jon michaels <joniama...@gmail.com> wrote: > What do you get when you type 'python manage.py dbshell'? > > On Thu, Jul 2, 2009 at 10:25 AM, Harsha Reddy<nhar...@gmail.com> wrote: > > > I using Django from past one week. > > > On the Django web site, I read that it is a high-level python web > > framework. Inspite of knowing this I am trying to use a Django > > application both as a web application as well as a CLI client. > > > To know if this works out, I created a Django project named "pyMyApp" > > and added an application into it. > > I updated the: > > > settings.py to detect my application, > > also models.py to create two tables. > > > I have an other python file in the application which parses XML. This > > python file makes use of objects defined in the models.py to store the > > parsed values in those 2 tables. > > > In the directory "../" where my "pyMyApp" resides, I created a file > > index.py added the code to test the parser code. Runnning this file > > yeilds: > > > python index.py > > Traceback (most recent call last): > > File "index.py", line 3, in ? > > from pyAPP.translator.translate import * > > File "/usr/src/pySCAF/translator/translate.py", line 3, in ? > > from pySCAF.translator.models import duo, scenario > > File "/usr/src/pySCAF/../pySCAF/translator/models.py", line 1, in ? > > from django.db import models > > File "/usr/lib/python2.4/site-packages/django/db/__init__.py", line > > 10, in ? > > if not settings.DATABASE_ENGINE: > > File "/usr/lib/python2.4/site-packages/django/utils/functional.py", > > line 269, in __getattr__ > > self._setup() > > File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", > > line 38, in _setup > > raise ImportError("Settings cannot be imported, because > > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > > ImportError: Settings cannot be imported, because environment variable > > DJANGO_SETTINGS_MODULE is undefined. > > > By looking at the trace, I got a thought that "Django is designed to > > be used as web framework" > > if at all I want to use it both as cli and web apps, how to achieve > > this in the case above? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---