Verfasst: Samstag 19. Dezember 2009, 21:34
Nein, es ist eine Umgebungsvariable: http://de.wikipedia.org/wiki/Umgebungsv ... svariablen
Seit 2002 Diskussionen rund um die Programmiersprache Python
https://www.python-forum.de/
Code: Alles auswählen
PATH=$PATH:/usr/local/mysql/bin python manage.py dbshell
Nein. Nicht wenn das Programm wie vom Fragesteller geschrieben im Pfad /usr/local/mysql/bin liegt.cofi hat geschrieben:Zum Problem: Meine Zeilen waren falsch.
Folgende sollte funktionieren.Code: Alles auswählen
PATH=$PATH:/usr/local python manage.py dbshell
Code: Alles auswählen
Develops-MacBook-Pro:web develop$ PATH=$PATH:/usr/local/mysql/bin 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 203
Server version: 5.1.40 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Code: Alles auswählen
class Book(models.Model):
title = models.CharField(max_length=100)
authors = models.ManyToManyField(Author)
publisher = models.ForeignKey(Publisher)
publisher_date = models.DateField()
Code: Alles auswählen
class Book(models.Model):
title = models.CharField(max_length=100)
authors = models.ManyToManyField(Author)
publisher = models.ForeignKey(Publisher)
publisher_date = models.DateField(blank=True, null=True)