This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can use the diff command just as you would use it for files: | |
diff <directory1> <directory2> | |
If you want to see subfolders and -files too, you can use the -r option: | |
diff -r <directory1> <directory2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -su postgres | |
psql | |
create database wynvent; | |
CREATE USER myuser WITH PASSWORD 'password'; | |
GRANT ALL PRIVILEGES ON DATABASE "wynvent" to myuser; | |
ALTER USER myuser WITH SUPERUSER; | |
#quit psql shell | |
\q | |
#list all databases | |
\l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET parameters have nothing to do with the URL as returned by reverse. Just add it on at the end: | |
url = "%s?name=joe" % reverse(viewOne) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from myapp.models import Entry | |
from django.db.models import Q | |
Entry.objects.filter(~Q(id = 3)) | |
#[<Entry: Entry object>, <Entry: Entry object>, <Entry: Entry object>, ...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create user fmfb_user with password 'sayone'; | |
create database fmfb_db with owner fmfb_user; | |
\c fmfb_db |
OlderNewer