Search Results

Search found 62 results on 3 pages for 'syncdb'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Apache cannot find mysql database modules

    - by user809857
    I've created a simple django project and setup a mysql database. My simple project just creates an entry on the database. The project works fine when I use the built in development server provided by django (runserver) and it works well. But when I deployed the project on Apache and mod_Wsgi (Ubuntu server), django could not find 'books', which is in this case my table in the database. The mysql database that I use in runserver and apache are just the same. I also did rebuild the database using sqlall,validate and syncdb of django but still i get the error. What could be wrong with what I'm doing? Thanks

    Read the article

  • Apache cannot find mysql database modules

    - by user809857
    I've created a simple django project and setup a mysql database. My simple project just creates an entry on the database. The project works fine when I use the built in development server provided by django (runserver) and it works well. But when I deployed the project on Apache and mod_Wsgi (Ubuntu server), django could not find 'books', which is in this case my table in the database. The mysql database that I use in runserver and apache are just the same. I also did rebuild the database using sqlall,validate and syncdb of django but still i get the error. What could be wrong with what I'm doing? Thanks

    Read the article

  • django error:The model Tribe is already registered

    - by zjm1126
    when i python manage.py syncdb,it show this: The following content types are stale and need to be deleted: maps | tribe Any objects related to these content types by a foreign key will also be deleted. Are you sure you want to delete these content types? If you're unsure, answer 'no'. Type 'yes' to continue, or 'no' to cancel: no when i put 'no' ,and then python manage runserver: AlreadyRegistered at / The model Tribe is already registered what should i do ? thanks

    Read the article

  • django custom management command does not show up in production

    - by Tom Tom
    I wrote a custom management command for django. Locally with my dev settings everything works fine. Now I deployed my project onto the production server and the management command does not show up, respectively is not available. But I did not get an error message deploying the project (syncdb). Any ideas where I could try to begin to search? Is there a special command that all custom management commands are "autodiscovered"?

    Read the article

  • Pinax installation problem

    - by 47
    I'm trying to setup a Pinax demo to work on and I've tried it under both Windows and FreeBSD with no luck...in both OS's, the virtual environment is created without a hitch, but then the following happens: For Windows, I can start the virtal environment and clone one of the sample projects as my starting point....however, running: manage.py syncdb Gives this error:Error: Can't import Pinax. Make sure you're in a virtual environment that has Pinax installed... For FreeBSD, when I try to start the environment: Badly placed ()'s What could be the problem?

    Read the article

  • How come my South migrations doesn't work for Django?

    - by TIMEX
    First, I create my database. create database mydb; I add "south" to installed Apps. Then, I go to this tutorial: http://south.aeracode.org/docs/tutorial/part1.html The tutorial tells me to do this: $ py manage.py schemamigration wall --initial >>> Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate wall Great, now I migrate. $ py manage.py migrate wall But it gives me this error... django.db.utils.DatabaseError: (1146, "Table 'fable.south_migrationhistory' doesn't exist") So I use Google (which never works. hence my 870 questions asked on Stackoverflow), and I get this page: http://groups.google.com/group/south-users/browse_thread/thread/d4c83f821dd2ca1c Alright, so I follow that instructions >> Drop database mydb; >> Create database mydb; $ rm -rf ./wall/migrations $ py manage.py syncdb But when I run syncdb, Django creates a bunch of tables. Yes, it creates the south_migrationhistory table, but it also creates my app's tables. Synced: > django.contrib.admin > django.contrib.auth > django.contrib.contenttypes > django.contrib.sessions > django.contrib.sites > django.contrib.messages > south > fable.notification > pagination > timezones > fable.wall > mediasync > staticfiles > debug_toolbar Not synced (use migrations): - (use ./manage.py migrate to migrate these) Cool....now it tells me to migrate these. So, I do this: $ py manage.py migrate wall The app 'wall' does not appear to use migrations. Alright, so fine. I'll add wall to initial migrations. $ py manage.py schemamigration wall --initial Then I migrate: $ py manage.py migrate wall You know what? It gives me this BS: _mysql_exceptions.OperationalError: (1050, "Table 'wall_content' already exists") Sorry, this is really pissing me off. Can someone help ? thanks. How do I get South to work and sync correctly with everything?

    Read the article

  • Where does the creation of permissions live in Django?

    - by lazerscience
    I need to do some debugging, because the permissions for one of my models are created wrongly. So I tried to find the piece of code where Django creates the permissions upon syncdb and writes them in the database, but I haven't been successful at all; maybe I just overlooked the right lines of code, but if somebody can point me out the right module / line of code where this happens I'd be very happy!

    Read the article

  • django deployment apache

    - by Uszy Wieloryba
    I would like to create a python script, which will: Create a django project in the current directory. Fix settings.py, urls.py. Do syncdb Install new apache instance listening on specific port (command line argument), with WSGI configured to serve my project. I can't figure out how to do point 3. EDIT: Peter Rowell: I need the solution for both Linux and Windows I have root access This is a dedicated host Apache only

    Read the article

  • Trouble using South with Django and Heroku

    - by Dan
    I had an existing Django project that I've just added South to. I ran syncdb locally. I ran manage.py schemamigration app_name locally I ran manage.py migrate app_name --fake locally I commit and pushed to heroku master I ran syncdb on heroku I ran manage.py schemamigration app_name on heroku I ran manage.py migrate app_name on heroku I then receive this: $ heroku run python notecard/manage.py migrate notecards Running python notecard/manage.py migrate notecards attached to terminal... up, run.1 Running migrations for notecards: - Migrating forwards to 0005_initial. > notecards:0003_initial Traceback (most recent call last): File "notecard/manage.py", line 14, in <module> execute_manager(settings) File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/app/lib/python2.7/site-packages/south/management/commands/migrate.py", line 105, in handle ignore_ghosts = ignore_ghosts, File "/app/lib/python2.7/site-packages/south/migration/__init__.py", line 191, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 221, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 292, in migrate_many result = self.migrate(migration, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 125, in migrate result = self.run(migration) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 99, in run return self.run_migration(migration) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in <lambda> return (lambda: direction(orm)) File "/app/notecard/notecards/migrations/0003_initial.py", line 15, in forwards ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), File "/app/lib/python2.7/site-packages/south/db/generic.py", line 226, in create_table ', '.join([col for col in columns if col]), File "/app/lib/python2.7/site-packages/south/db/generic.py", line 150, in execute cursor.execute(sql, params) File "/app/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute return self.cursor.execute(sql, params) File "/app/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute return self.cursor.execute(query, args) django.db.utils.DatabaseError: relation "notecards_semester" already exists I have 3 models. Section, Semester, and Notecards. I've added one field to the Notecards model and I cannot get it added on Heroku. Thank you.

    Read the article

  • python django automated data addition

    - by zubin71
    I have a script which reads data from a csv file. I need to store the data into a database which has already been created as $ python manage.py syncdb so, that automated data entry is possible in an easier manner, as available in the django shell.

    Read the article

  • How to add django-db-log models to admin panel?

    - by Enchantner
    Just installed django-db-log module and trying to make it work properly. 'python manage.py syncdb' command created databases, it seems like logging works, but there is nothing about it in admin panel. As I found in documentation, it should add itself in admin panel without any additional configuration, but then I added 'djangodblog.middleware.DBLogMiddleware' in MIDDLEWARE_CLASSES and 'djangodblog' in INSTALLED_APPS it looks like nothing happens. What I'm doing wrong?

    Read the article

  • Parameterized Django models

    - by mgibsonbr
    In principle, a single Django application can be reused in two or more projects, providing functionality relevent to both. That implies that the same database structure (tables and relations) will be re-created identically in different databases, and most times this is not a problem (assuming the projects/databases are unrelated - for instance when someone downloads a complete app to use in their own projects). Sometimes, however, the models must be "tweaked" a little to better fit the problem needs. This can be accomplished by forking the app, but I wondered if there wouldn't be a better option in cases where the app designer can anticipate the most common customizations. For instance, if I have a model that could relate to another as one-to-one or one-to-many, I could specify the unique property as a parameter, that can be specified in the project's settings: class This(models.Model): other = models.ForeignKey(Other, unique=settings.OTHER_TO_THIS) Or if a model can relate to many others, I could create an intermediate table for each of them (thus enforcing referential integrity) instead of using generic fks: for related in settings.MODELS_RELATED_TO_OTHER: model_name = '%s_Other' % related globals()[model_name] = type(model_name, (models.Model,) { me:models.ForeignKey(find_model_class(related)), other:models.ForeignKey(Other), # Some other properties all intersection tables must have }) Etc. Let me stress out that I'm not proposing to change the models at runtime nor anything like that; once the parameters were defined and syncdb called for the first time, those parameters are not to be changed again (unless you're doing a schema migration). Is this a good design? Are there better ways to accomplish the same thing, or maybe drawbacks I coulnd't anticipate? This technique is meant to be used sparingly (only on apps meant to be reused in wildly different contexts, and only when a specific need of customization can be detected while the app model is being designed).

    Read the article

  • WHoosh (full text search) index problem

    - by Rama Vadakattu
    iam having the following problem with whoosh full text search engine. 1.After syncdb i am creating the intial index from the database objects. 2.it is working fine.I can able to search the data and see the results. 3.after that in one of my view i have added another document (via signals) to the index (during a request --response) 4.that' it from then onwards i could not able to search any data , for which i have successfully found results before adding new document (before step 3) ix = storage.open_index() writer = ix.writer() writer.add_document(.............) I have tried hard to resolve but i could not. Any ideas on how to resolve this problem?

    Read the article

  • Python-MySQLdb problem: wrong ELF class: ELFCLASS32

    - by jsalonen
    As part of trying out django CMS (http://www.django-cms.org/), I'm struggling with getting Python-MySQLdb to work (http://pypi.python.org/pypi/MySQL-python/). I have installed Django CMS and all of its dependencies (Python 2.5, Django, django-south, MySQL server) I'm trying out the example code within Django CMS code with MySQL as chosen database type When I execute python manage.py syncdb, the following error occurs: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: /root/.python-eggs/MySQL_python-1.2.3c1-py2.5-linux-i686.egg-tmp/_mysql.so: wrong ELF class: ELFCLASS32 I have been able to trace the problem specifically to python-mySQLdb (as also visible in the stack trace). Other than that, I am completely puzzled. I don't have a clue what ELFCLASS32 means, or what ELF class is anyway. I suspect that this error could have something to do with the fact that I am running 64-bit version of Debian 5 (on a VPS). Any good ideas how to troubleshoot?

    Read the article

  • error about django to connecct newes mssql2008

    - by qq263020776
    I am using django-mssql and SQL Server 2008, but I found that it always errors when I do some commands,for example: python manage.py syncdb the error is below: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi.OperationalError: (com_error(-2147352567, xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB Provider for L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d \u5b58\u 8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None), 'Error ning connection: PROVIDER=SQLOLEDB;DATA SOURCE=115.238.106.100,60433;Network rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=xxxx') When I use Microsoft SQL Server Management studio client, I can successfully connect the database. I got some infomation from: http://code.google.com/p/django-mssql/issues/detail?id=76 but I still tried I got wrong and I think the solution provided is wrong.

    Read the article

  • Error connecting to SQL Server 2008 with Django

    - by qq263020776
    I am using django-mssql and SQL Server 2008, but I found that it always errors when I do some commands,for example: python manage.py syncdb the error is below: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi.OperationalError: (com_error(-2147352567, xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\xa1\xa3', (0, u'Microsoft OLE DB Provider for L Server', u'[DBNETLIB][ConnectionOpen (Connect()).]SQL Server \u4e0d \u5b58\u 8\u6216\u62d2\u7edd\u8bbf\u95ee\u3002', None, 0, -2147467259), None), 'Error ning connection: PROVIDER=SQLOLEDB;DATA SOURCE=115.238.106.100,60433;Network rary=DBMSSOCN;Initial Catalog=rvdb_1;UID=sa;PWD=xxxx') When I use Microsoft SQL Server Management studio client, I can successfully connect the database. I got some infomation from: http://code.google.com/p/django-mssql/issues/detail?id=76 but I still tried I got wrong and I think the solution provided is wrong.

    Read the article

  • Modifing settings in Django

    - by Cato Johnston
    I'm trying to get Django's manage.py to run with modified settings files. I have three settings files settings.py preview.py live.py settings.py contains my base settings but on live & preview sites I point the ['DJANGO_SETTINGS_MODULE'] to live or preview which in turn load the base file and any settings specific to that environment. This works fine, until I try to run migrations using manage.py I updated the manage.py file to import settings.preview but now when I try to run syncdb or migrate I get this error: django.core.exceptions.ImproperlyConfigured: You haven't set the DATABASE_ENGINE setting yet. My settings file has this in it though: DATABASE_ENGINE = 'mysql' How can I get this to work?

    Read the article

  • How do I do this Database Model in Django?

    - by alex
    Django currently does not support the "Point" datatype in MySQL. That's why I created my own. class PointField(models.Field): def db_type(self): return 'Point' class Tag(models.Model): user = models.ForeignKey(User) utm = PointField() As you can see, this works, and syncdb creates the model fine. However, my current code calculates a length between two Points using raw SQL. cursor.execute("SELECT user_id FROM life_tag WHERE\ (GLength(LineStringFromWKB(LineString(asbinary(utm), asbinary(PointFromWKB(point(%s, %s)))))) < 55)... This says: Select where the length between the given point and the table point is less than 55. How can I do this with Django instead of RAW SQL? I don't want to do cursors and SELECT statements anymore. How can I modify the models.py in order to do this?

    Read the article

  • When I run Django on Dreamhost using SQLite, why do I get an OperationalError telling me that a tabl

    - by Paul D. Waite
    I had a Django site running on Dreamhost. Although I used SQLite when developing locally, I initially used MySQL on Dreamhost, because that’s what the wiki page said to do, and because if I’m using an ORM, I might as well take advantage of it by running against a different database. After a while, I switched the settings on the server to use SQLite, to make it easier to keep my development database in sync with the server one. python manage.py syncdb worked on the server, but when I tried to access the site, I got an OperationalError. The Django error page said that one of my tables didn’t exist. I checked the database using sqlite on the command line on the server, and using python manage.py shell, and both worked fine.

    Read the article

  • View centric design with Django

    - by wishi_
    Hi! I'm relatively new to Django and I'm designing a website that primarily needs usability experience, speaking of optimized CSS, HTML5 and UI stuff. It's very easy to use Django for data/Model centric design. Just designing a couple of Python classes and ./manage.py syncdb - there's your Model. But I'm dealing with a significant amount of View centric challenges. (Different user classes, different tasks, different design challenges.) The official Django tutorial cursorily goes through using a "Template". Is there any Design centric guide for Django, or a set of Templates that are ready and useable? I don't want to start from scratch using JS, HTML5, Ajax and everything. From the Model layer perspective Django is very rapid and delivering a working base system. I wonder whether there's something like that for the Views.

    Read the article

  • Django : mysql : 1045, "Access denied for user

    - by PlanetUnknown
    I have the whole setup working for months on my local computer. I'm installing on a remote site now. Created a fresh mysql DB, and created a new user ("someuser") and gave it complete grants, like so - GRANT ALL PRIVILEGES ON . TO 'someuser'@'localhost' IDENTIFIED BY 'somepassword' WITH GRANT OPTION; I have sync'd the db, using "python manage.py syncdb" and the correct tables were created. My settings.py has this same user. But when I try to login a user through the application, and it hits the DB, I see the following in the logs - (1045, "Access denied for user 'someuser'@'localhost' (using password: YES)") I logged in through mysql (installed on the same box as django) and checked the grants and it correctly shows - Grants for djangouser@localhost GRANT ALL PRIVILEGES ON * . * TO 'someuser'@'localhost' IDENTIFIED BY PASSWORD '*thesaltedpasswordOverHere' WITH GRANT OPTION I don't want to use the root user/password for django, since it doesn't seem the correct way. Any pointers as to what might be wrong ?

    Read the article

  • Djangobb problem

    - by Djero
    I've installed Djangobb app on my server (Debian, mod_python) by cloning original source. The only things I've changed is database options in settings.py. All needed components are installed - syncdb query was executed right. But, when I'm trying to enter on my forum, it returns me error: ImproperlyConfigured: Error importing middleware django_authopenid.middleware: "No module named djangobb_forum.subscription" I've checked - djangobb_forum/subscription.py exist, so I don't know what can be wrong. Maybe someone had problems like that and know how to fix it? Sorry for my english.

    Read the article

  • How to reload Django models without losing my locals in an interactive session?

    - by Gj
    I'm doing some research with an interactive shell and using a Django app (shell_plus) for storing data and browsing it using the convenient admin. Occasionally I add or change some of the app models, and run a syncdb (or South migration when changing a model). The changes to the models don't take effect in my interactive session even if I re-import the app models. Thus I'm forced to restart the shell_plus and lose my precious locals() in the process. Is there any way to reload the models during a session? Thanks!!

    Read the article

< Previous Page | 1 2 3  | Next Page >