ructions by an author who wishes
there were a better way, but another reply says to just use MacPorts to
install it.
Any advice? Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source
2.3
% python setup.py build
% sudo python setup.py install
Success! Now I can access MySQL from my Python/Django apps.
BTW, I also downloaded and installed PyCharm. Nice Python IDE!
--Fred
--------
Fred Stluka -- mailto:f
build
% sudo python setup.py install
Thanks!
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fence
build
% sudo python setup.py install
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fence
-Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or
like smtp.googlemail.com as you do with your Apple Mail
client.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without wall
ou'll have to enhance the above to support multiple answers.
Also, to allow editing of existing questions and answers. I have
code for that scenario too, if you can't figure it out, but this
should get you started.
Anyone else have improvements on this?
--Fred
--
-Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or
/Tips/Unix.htm#tripwire
and 9 other security tips:
http://bristle.com/Tips/Unix.htm#unix_security
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad
Yeah, I do the same with STATIC and COLLECTED_STATIC.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without
Nice! Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or
Tom,
Excellent article! Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we
OS X.
I can give you instructions for those platforms.
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without wall
Good idea! I donated $100. Excellent product. Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without
Fadi,
You need to {% load %} the file that defines the tags.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates
7;show_edit':True,
'show_tags':True
}
return render_to_response('bookmark_list.html',
variables, RequestContext(request))
--Fred
Fred Stlu
;.
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Window
Can also use render_to_string().
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we
B.
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Window
;ve always
passed the dictionary directly to render_to_response().
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Wit
odwsgi/wiki/QuickConfigurationGuide
- http://code.google.com/p/modwsgi/wiki/ConfigurationIssues
- https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
tino,
Didn't need the WSGIPythonHome setting in Apache, eh?
Interesting...
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of se
in western Philly suburbs
- Full time (30+ hours/week) consultant
- 6+ months
Interested?
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates
Nicole,
If you can't access self.client of TestCase, you can always
allocate one yourself as:
c = Client()
See details in:
- http://www.dougalmatthews.com/2010/Jan/20/testing-your-first-django-app/
--Fred
Fred S
I did the tutorial, then created this site for a local non-profit:
http://helphopelive.org
--Fred
Original message From: Jorge Andrés Vergara
Ebratt Date:8/21/2014 9:55 PM (GMT-05:00)
To: django-users@googlegroups.com Subject: Re: Your
further steps after tutorial?
After
I'm getting error:
django.core.exceptions.ImproperlyConfigured:
Error loading either pysqlite2 or sqlite3 modules
(tried in that order): cannot import name dbapi2
Any suggestions?
Details:
My settings.py contains:
DATABASE = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
How quickly do Django unit tests run?
Mine are taking 7-9 seconds each, even for trivial tests like:
self.assertEqual(1 + 1, 2)
that are all in the same test class of the same app.
Is this typical? Or do I have something misconfigured.
Thanks!
--Fred
--
You received this message becau
Benjamin,
OK, Thanks! So roughly how fast would you expect? Hundreds
of trivial tests per minute? Thousands per minute?
Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software
ime is going.
Thanks again!
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
python/virtualenvs/hhl/lib/python2.7/site-packages/sql_server
instead of setting PYTHONPATH:
% setenv PYTHONPATH
~/python/virtualenvs/hhl/lib/python2.7/site-packages/django/db/backends
FYI,
--Fred
--------
Fred Stluka -- mailt
Benjamin,
I solved my problem. I switched to SQLite for testing and now
run 500+ tests in 30 secs instead of 75 minutes. Much better!
Thanks for your help!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http
s if over 100 concurrent users
- Use db_routers.py to write primary DB, read replica DB
Thanks again!
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad
.0.0.1',
# Required for Windows; Harmless (same as default) for Linux
'PORT' : '3306',
},
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristl
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates
g/
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Window
e this helps!
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need
-Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or
Change it to:
</tt><tt>
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences
assertEqual(response.content, '0')
# An invalid vote - poll doesn't exist
response = c.post('/polls/2/vote/', {'choice': '1',},
**kwargs)
self.assertEqual(response.status_code, 404)
- Selenium te
Excellent! Thanks! Now I can just point my team at it, instead
of writing out the details myself.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com
Andrew,
Good stuff! Thanks! We're still on 1.4, but planning a move
soon to 1.7. Very helpful.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristl
es//table_name/.default.json
- Add to forwards() method:
call_command("loaddata", "/table_name/")
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, In
grations/#dependencies
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fence
and manipulate orm.ModelName
instead of appname.models.ModelName, it should solve exactly
the problem you are describing.
Hope this helps,
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- htt
The problem is that static is not being recognized as a valid Django
tag. Add this line to the top of the template file to define it.
{% load staticfiles %}
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http
- Differences from Django 1.7 migrations
- How to get started with Django 1.7 migrations
- Unicode vs ASCII issues
- Use of objects.bulk_create()
Thanks!
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.
APPS, plus
a whole lot more, right?
Otherwise, can you suggest where I can find an article similar to
yours that gets me from 1.4 to 1.5 and on to 1.6 before I use
yours to get me from 1.6 to 1.7?
Thanks!
--Fred
--------
Fred Stluka
ever did before.
Thanks again!
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no W
Sounds good! Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no
e by using ssh -t as
I've often had to do when running sudo via ssh.
See:
- http://bristle.com/Tips/Unix.htm#sudo_via_ssh
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Softwa
Leonard,
In Django 1.4, you would add this code to the forwards()
method of the migration:
from django.core.management import call_command
call_command("loaddata", "")
--Fred
----
Fred Stluka -- mai
ls.py:*
class Meta:
managed = True if settings.RUNNING_UNIT_TESTS else False
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
of us reading them as email, not
at the Google Groups Web site.
Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open S
messages, prompts, confirmations, etc. Also,
some of these steps are combined into a remote script that
runs on the server to reduce the number of "ssh -t sudo"
commands I would otherwise have to do. But, that's the gist
of it.
Hope this helps!
--Fred
---
cking/un-stacking, hiding/showing, etc. Anything is
possible.
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
--
a script of his own. I don't type all
of those commands each time. I just type: *pub*
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to
://helphopelive.org
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates
on IE? Have you tried specifying multiple forms?
Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without
1.7 or 1.8.
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need
ks!
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Window
about a month or so.
Telecommute with weekly status meetings in Radnor PA,
and ad-hoc local co-working sessions with the dev team.
Interested in either one, please let me know.
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -
gt;> conn = pyodbc.connect('DRIVER=SQL Server;'
'SERVER=my_db_server_name'
'PORT=my_db_server_port_number;'
'DATABASE=my_db_name;'
'UID=my_usern
if handled by
separate threads that share the same memory, and presumably
the same signals and callbacks.
Thoughts?
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://b
styles, colors, fonts,
presentation of info? Or is there a change to the content or the
navigation, as well?
Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http
off to what the real problem is.
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls
+1 for AWS.
Been using it for years. Keeps getting cheaper and better.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates
Clifford,
Yes, its because the legacy DB has Windows-1252 chars in it, but
mis-informs Django that it is all UTF-8 chars.
Not a problem with django-pyodbc, which seems to work perfectly.
--Fred
Fred Stluka -- mailto:f
fferent servers.
Thoughts?
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and
Larry,
+1 for Pycharm (JetBrains).
I use their DB tools to explore both MS SQL and MySQL DBs. If
you like, I can dig up my notes on exactly how I made the
connection from PyCharm to MS SQL Server.
--Fred
Fred Stluka
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates
x27;SERVER=_your_db_host_name_or_ip_;'
'PORT=_your_db_port_number_;'
'DATABASE=_your_db_name_;'
'UID=_your_db_username_;'
&
s helps!
--Fred
--------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no W
s ago to never use a full sentence
when a simple phrase will do.
Anyhow, good luck with your Django/WSGI setup!
Any more problems, speak up.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://brist
ers to all of the above before I
agree to do a mailing to any of my lists of hundreds of local
developers. This has kept my subscribers happy.
HTH,
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fre
ions.
I have a few ideas about how to deal with this, but it must be a common
problem. What do you folks do?
Thanks!
--Fred
----
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://
Feel free to reply with more questions.
Also, you'll quickly get a feel for Django's power if you go
through the on-line tutorial at:
- https://docs.djangoproject.com/en/dev/intro/
Enjoy!
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bri
pip freeze
on one and a pip install -r on the other?
Nothing left to do.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service
David,
It works fine for me. Must be something about your environment.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service
- Udacity
- edX
- Alison
- Lynda
- NewCircle.com
Any advice? Thanks!
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
Ludovic,
Thanks for the tip! I'll check them out.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open S
Thanks for the feedback!
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open Source: Without walls and fences, we need no
Krishna,
How long is "a long time"? I have a project of ~200K lines of
python/django code. The dev server reloads in a second or so.
--Fred
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, I
Hildeberto,
No, the number of migrations does affect how long it takes to
run automated tests, but should not affect how long it takes
the dev server to start.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred
at slow on your Mac.
To narrow down the problem, I suggest you use the -v option:
% python -v manage.py runserver
and watch to see what seems to be taking so long.
Any other suggestions, anyone?
--Fred
Fred Stluka -- mailto:f...@bristle.co
Deepak,
Bitbucket has pretty good documentation, including a Getting Started
section. Should tell you all you need to know. See:
- https://www.google.com/search?q=bitbucket+getting+started
--Fred
Fred Stluka -- mailto:f...@bristle.com
x27;s this line:
def __unicode__(self):
which should be indented exactly as much as the line:
def get_absolute_url(self):
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Softwa
te and could
be deleted? We tend to get rid of our dead ones pretty quickly
because PyCharm shows them as grey when they're not needed.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- htt
27; +
unicode(email_message.to)
exception = e
except BaseException as e:
msg = u'An unexpected error occurred '
msg += u' when sending e-mail to ' +
unicode(email_message.to)
msg += u' during step: "'
use.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open Source: Without walls and fences, we need no Windows or
Gates
ot sure if there any
pros/cons vs lxml, but it works great for us!
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open Source: Wit
Oct 2006'
'%d %b, %Y', # '25 Oct, 2006'
'%B %d %Y', # 'October 25 2006'
'%B %d, %Y', # 'October 25, 2006'
'%d %B %Y', # '25 October 2006'
'%d %B, %Y
g.
Any suggestions? I feel like I may be missing something obvious.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open S
Md. Ohiduzzaman,
Looks good so far. What happens when you try it?
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service
Matt,
Drop the "s" from "tests":
./manage.py test backups
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to
something to do with "refreshes"? The test trace shows
it trying to run testcase "refreshes.backups.tests", but in the
manual
import you did from the python shell, you only import
"backups.tests"
--Fred
Fred Stluka -- mailto:
for tests that don't exist?
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open Source: Without walls and fences, we need no Wi
anything
else.
--Fred
Fred Stluka -- mailto:f...@bristle.com --
http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of
service!
Open Source: Without walls and fences, we need no Windows or
Gates
1 - 100 of 140 matches
Mail list logo