django-admin2
This project looks similar more similar to Flask-Admin than regular Django Admin: https://github.com/pydanny/django-admin2
There’s an example admin app here: https://github.com/pydanny/django-admin2/tree/develop/example
This project looks similar more similar to Flask-Admin than regular Django Admin: https://github.com/pydanny/django-admin2
There’s an example admin app here: https://github.com/pydanny/django-admin2/tree/develop/example
Solution: AND column IS NOT NULL
Example: query.filter(or_(~self.column.in_(value), self.column == None))
This thread explains “SQL Server in treating NULL as a value”: http://stackoverflow.com/questions/11491831/null-values-are-excluded-why
Run: git remote -v
If the output has a URL that starts with https://github.com and not git@github.com, you need to change that by running a command similar to this: git remote set-url origin git@github.com:pawl/flask-admin.git
https://help.github.com/articles/changing-a-remote-s-url/#switching-remote-urls-from-ssh-to-https
Flask-Admin’s date and datetime filters used bootstrap-datetimepicker, and it was giving me trouble on Bootstrap 3. I swapped it for bootstrap-daterangepicker (#688), which bundles a date picker, a time picker, and a datetime picker in one library and works on both Bootstrap 2 and 3.
With the new picker in place I added range filters for date, datetime, and time columns on the SQLAlchemy backend (#703). Instead of just “greater than” or “less than”, you can filter for records that fall between two dates, or two times.
class EventView(ModelView):
column_filters = ['start_time', 'created_at']
Pick the “between” option on one of those columns and you get a two-ended picker.
While I was in there I moved the active-filter rendering into filters.js. It had been split between models/layout.html and the JS, and adding range filters would have meant duplicating that generation logic in the template. Loading the filters entirely from filters.js kept it in one place.
One follow-up: the “equals” filter on time and datetime columns was matching nothing on SQLite, because of how SQLite stores timestamps (#697).
https://help.github.com/articles/syncing-a-fork/
From my fork, I ran these commands:
git remote add upstream https://github.com/pallets-eco/flask-admin.gitgit fetch upstreamgit merge upstream/mastergit pushCreate new branch and sync with upstream (change the bolded text):
git remote add upstream https://github.com/pallets-eco/flask-admin.gitgit fetch upstreamgit checkout -b issue_xxxx upstream/masterfind . -name '*.py' -exec autopep8 --in-place '{}' \;
https://github.com/hhatto/autopep8/issues/30#issuecomment-22458121
On the Settings->”Preferences”, “Tab Settings” tab, I set “[Default]” at Tab size: 8, uncheck Replace by space; and set “Python” to uncheck Use default value, Tab size: 4, check Replace by space. This causes inserts into a python source to use 4 spaces for indents, and indent with spaces instead of tabs.
If I end up with any tabs in the source, I use Edit->Blank Operations->TAB to Space to convert them. I also clean up trailing blanks with Edit->Blank Operations->Trim Trailing Space.
I install and use the pep8 package to verify standard formatting.
http://www.reddit.com/r/Python/comments/2mfrn6/python_in_notepad/cm3tdj5
This doesn’t actually work: “source /etc/environment”
This did the trick though:
for line in $( cat /etc/environment ) ; do export $line ; done
Saw this charting library from the Mozilla Metrics Team on hacker news recently: MetricsGraphics.js interactive demo
Their interactive example is here: MetricsGraphics.js interactive demo
I’m not aware of any other charting libraries besides highcharts that do vertical marker lines this easily.