Re: Dynamic settings variables (dynamic global variable)

2012-02-08 Thread Andy McKay
You can define multiple caches: https://docs.djangoproject.com/en/1.3/topics/cache/#django-s-cache-framework You could then use a file system cache or your own local memcache. https://docs.djangoproject.com/en/1.3/topics/cache/#filesystem-caching You can then get that cache and access it in you

Re: Speficy a Database for Testing

2012-02-08 Thread Andy McKay
You can define a custom test runner to do this. For example: https://docs.djangoproject.com/en/dev/topics/testing/#django.test.simple.DjangoTestSuiteRunner.setup_databases On Wed, Feb 8, 2012 at 7:42 AM, xina towner wrote: > Yes, but django makes a new testDatabase and that's my problem, I want

Re: User .get_all_permissions() vs. .has_perm() inconsistency

2012-02-10 Thread Andy McKay
On Fri, Feb 10, 2012 at 4:01 PM, dslowik wrote: u.get_all_permissions() > set([u'wb.delete_libraryitem', u'wb.change_libraryitem']) u.has_perm("wb.change_libraryitem") > True > > ...Shouldn't that be False? Why would it be False? get_all_permissions: Returns a set of permission strings

Re: Question on unknown error

2012-02-26 Thread Andy McKay
Please give us the full traceback and exact line of code it occurred on. There isn't enough information right now. On Sun, Feb 26, 2012 at 1:38 PM, Mario Gudelj wrote: > In print 'time' what's time? Should you not have print exp_datetime? > > > On 27 February 2012 01:27, Stanwin Siow wrote: >> >

Re: Question on unknown error

2012-02-26 Thread Andy McKay
You can return whatever you want. All depends how you are using the result. On Sun, Feb 26, 2012 at 5:48 PM, Stanwin Siow wrote: > It's ok guys! > > > I figured out the error. > > At the end of the method we were returning 0 and 1 that will throw the > error. > > Is there some rule in django that

Re: Sorting the output of regroup

2012-03-10 Thread Andy McKay
> Any idea what is the best way to accomplish this? Sort the list in Python in your view. Its easier to do, easier to test and easier to maintain. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users

Re: How to add audio to a Django based webpage?

2012-04-04 Thread Andy McKay
On Wed, Apr 4, 2012 at 12:50 PM, Homer wrote: > Should I add something else so that it would work? Thanks for your help! There's nothing I've seen yet that's a Django problem. Does the outputted HTML look right? Does that work? If not tell us and we'll see if we can help you figure out how your

Re: PythonScript(Zope) like in a django app, any tips?

2012-04-14 Thread Andy McKay
That's not something I'd ever recommend an untrusted user do. There are still many ways that could go wrong. The safest execution environment I've seen for Python is App Engine, send a callback to that instead :) -- You received this message because you are subscribed to the Google Groups "Djang

Re: PythonScript(Zope) like in a django app, any tips?

2012-04-14 Thread Andy McKay
own servers and excuting them there. On Apr 14, 2012 11:43 AM, "Arruda" wrote: > Is this what you're talking about? > https://developers.google.com/appengine/docs/python/overview > Still don't understand how this would be used. > > Em sábado, 14 de abril de

Re: mocking out a Model

2012-04-14 Thread Andy McKay
> @patch('apps.market.models.House') Is create house in apps.market.models, or is it somewhere else? If it's somewhere else, mock it relative to that file eg: @patch('apps.some_file.House') > I'm also wondering if it's possible to inspect MockedHouse to see if it has > for example some tags adde

Re: Problems extracting valid form data lately

2012-04-15 Thread Andy McKay
What does your form code look like? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For

Re: High Traffic

2012-04-16 Thread Andy McKay
Run django debug toolbar, see what queries you are running and how long they take and that you've got database indexes set up. Failing that, run a middleware or other logging tool to tell you slow pages. Then test with django debug toolbar. Rinse and repeat. -- You received this message because

Re: restarting a django development server

2012-04-23 Thread Andy McKay
Change your code so you don't have to. Relying on a restart for that is the wrong approach. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send

Re: Tools for extending the admin?

2012-05-05 Thread Andy Baker
There's loads of interesting admin-related code on djangosnippets. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/iunDY_f8tHUJ. To post to this group, send

Re: Django - Worldwide Developer Rates - Hourly Income - location and project duration specific

2012-05-05 Thread Andy McKay
> A plumber is mostly manual labor which will take a toll on the body over the > years. Programming too takes its toll on the body over time (make sure you have a nice ergonomic setup). The relentless march of technology means that the length of a programmers career is shorter than many jobs, incl

Re: How do you write a django model that can crunch numbers and automatically populate another field with results?

2012-05-08 Thread Andy McKay
You can hook into the model signal so that when the model changes, you do you calculation and change your models. https://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.post_save -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Different urls.py file for different apps

2012-05-22 Thread Andy McKay
Use include to pull in values from other apps inside your urls.py https://docs.djangoproject.com/en/dev/topics/http/urls/#including-other-urlconfs On Tue, May 22, 2012 at 11:49 AM, siddharth56660 wrote: > Hi, > I am developing an ERP system which is vast and covers many modules. > After developi

Re: Off-line Django apps / Caching and synchronizing data

2012-05-24 Thread Andy McKay
> Somehow create a standalone django app that is the same as the online one > and then have it synchronize when it goes back online. Something ala Google > Gears / HTML5. But not done anything like this and I'm not sure how > complicated the synchronizing would be and I'm reluctant to roll out djan

Re: Render time

2012-06-25 Thread Andy McKay
> Now they want me to add to that how long > the browser takes to render the page after it gets the data. You can use the navigation timing API: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html We use this in conjuction with graphite and django-statsd to produce g

Re: Render time

2012-07-05 Thread Andy McKay
> I'm trying to use the Navigation Timing package to measure how long a > page takes to be rendered. So you don't want to include all the lookups? Just the "rendering" part? > So that would be loadEventEnd-responseEnd, > however I am finding that loadEventEnd is always 0 for me, even though > I a

Re: Render time

2012-07-05 Thread Andy McKay
> Thanks Andy. Super cool, and pretty much just what I was looking for. > Seems to work fine in FF and Chrome, but in Safari I don't seem to > have access to the performance.timing data. Should that be there or do > I have do something to load or enable it? Sadly, Safari does

Re: Can a method call inside save() display its return on template?

2012-07-20 Thread Andy McKay
> cursor.execute("SELECT > GetDirectionDescr("+str(nod_id1)+","+str(nod_id2)+") from sys.dual") Please note that code means that you might be open to SQL injection. You should be using the parameters for SQL, see: https://docs.djangoproject.com/en/dev/topics/db/sql/#passing-parameters-i

Any Django people in Windor/West London looking for a client?

2012-08-17 Thread Andy Baker
We built a fairly simple Django site and the client would like someone more local to take over maintenance. If anyone is interested then drop me a line. I'm happy to help with the handover. -- You received this message because you are subscribed to the Google Groups "Django users" group. To vi

Re: Any Django people in Windor/West London looking for a client?

2012-08-18 Thread Andy Baker
t 01273 906061 • m 07968 119324 On Sat, Aug 18, 2012 at 11:21 AM, Babatunde Akinyanmi wrote: > Hi Andy, > I think you need to add more details like what the simple site is and then > where the client is located. That way, more local doesn't sound cryptic > > On Fri, Aug 17,

Re: Model field that links to a page ID, or external URL

2012-10-10 Thread Andy Baker
(long dead thread resuscitation attempt) I'm not sure I understand your objections. Why would absolute url change? And if it does you still have to worry about external links breaking. Surely the answer is to ensure you don't change the value of get_absolute_url. Don't base it on anything that'

Re: message mark_safe and redirect results in message still showiing with encoded tags

2011-08-22 Thread Andy McKay
es it. Then when read it does the reverse turning it back into a string. You'll have either to alter that behaviour or find another way around. [1] https://code.djangoproject.com/browser/django/trunk/django/utils/safestring.py#L89 -- Andy McKay a...@clearwind.ca twitter: @andymckay

Re: models.URLField does not validate a valid url

2011-08-22 Thread Andy McKay
ors or simply timing out on HEAD requests" Sounds like similar is happening here. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: message mark_safe and redirect results in message still showiing with encoded tags

2011-08-23 Thread Andy McKay
7;:'hello', 'safe':True} and then cope with it when you deserialize. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: can django be used in destop application?

2011-08-23 Thread Andy McKay
On 2011-08-23, at 4:17 AM, smith jack wrote: > i mean not use django for web site development, but for desktop application, > it seems its orm can be used in destop application, isn't it? Yes. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message

Re: configuration field

2011-09-02 Thread Andy McKay
don't involve parsing the entire tree, as far as I remember: http://docs.python.org/library/markup.html But I would take the XML and store the bits you need in a more efficient format. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are

Re: Can I write tests for 3rd party url shortener?

2011-09-02 Thread Andy McKay
On 2011-09-02, at 4:58 AM, Yaşar Arabacı wrote: > > Is there a way to test whether or not a 3rd party url shortener works. What I > have in mind is this: Sure, python has libraries like urllib for dong that sort of thing. http://docs.python.org/library/urllib.html -- Andy

Re: Create socket server in django

2011-09-19 Thread Andy McKay
You could write a Python process that starts up a Socket Server and imports all the Django stuff, just like the current server does for HTTP. Then there's no need to "send the data to django". Might help: http://docs.python.org/library/socketserver.html On Mon, Sep 19, 2011 at 2:00 PM, Micke wro

Re: PayPal Adaptive Payments

2011-10-09 Thread Andy McKay
with Django. Our codebase is rather big so might be hard to follow, but the key PayPal stuff is here: https://github.com/jbalogh/zamboni/blob/master/apps/paypal/__init__.py It doesn't answer your question, but gives you something to look at ;) Cheers. -- Andy McKay a...@clearwind.ca

Re: Question about Signals and Bootstrap

2011-10-09 Thread Andy McKay
ort order. So relax, don't worry about it. Instead give each signal a unique dispatch_uid: https://docs.djangoproject.com/en/dev/topics/signals/#preventing-duplicate-signals This makes disconnecting signals easier as well. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You rec

Re: Signals and listeners defined in a separate modules unusable in other apps

2011-10-09 Thread Andy McKay
n't being imported. Stick a print statement in the module to confirm this is the case. If so, import them. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re:Field available via Django shell but not via web application (crossposted from StackOverFlow)

2011-11-01 Thread Andy McKay
Is this using the Django built in runserver or some other way of serving pages? If not try using runserver. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from t

FormWizard and "add to basket" problem

2011-11-16 Thread Andy Robinson
self.process_step(request, form, current_step) next_step = current_step + 1 3. Any other ideas? FormWizard is very nice in our case as it adds some very useful security and validation features. I'm hoping someone will tell me there is an easy way around this! Thanks, Andy

Re: How to get current session user in models.py?

2012-01-02 Thread Andy McKay
Inspecting your stack to find the user seems a pretty convoluted way to do it. You could either a) not access users in your models b) explicitly pass the user around or c) just place your user into a local threading and retrieve it anywhere else for example: https://github.com/andymckay/arecibo/bl

Re: How to get current session user in models.py?

2012-01-03 Thread Andy McKay
On Mon, Jan 2, 2012 at 12:25 PM, Waldek Herka wrote: > c) local threading way posted by you is not as straight > forward as it looks - I'd say it's very similar in complexity to > mine.. you still need to explicitly call 'activate' somewhere(view > method) Middleware can do that just fine. --

Admin interface does not save routine object

2012-01-04 Thread Andy Oram
I am pasting in a pretty basic models.py here. It is fairly classic (I actually started with Poll tutorial example) and I have stripped out anything that looks questionable. Through the standard admin interface, I can create a User8, a Documentversion8, and a Document8. However, after I fill out th

Re: Admin interface does not save routine object

2012-01-04 Thread Andy Oram
Thanks, Bill. I apologize for not including DEBUG output. Here is what seems relevant. It looks like the ForeignKey relationship filled in fields with the id's of the document and document version (which is what one would expect) and there was a problem converting it to a string. Request Me

Re: Admin interface does not save routine object

2012-01-05 Thread Andy Oram
e string.  Try returning unicode(self.document) or something > like '%d' % document.id. > > Brett > > On 1/4/12 5:07 PM, "Andy Oram" wrote: > > > > > > > > >Thanks, Bill. I apologize for not including DEBUG output. Here is what >

Re: reverse() with keyword argument driving me batty

2012-01-12 Thread Andy McKay
On Thu, Jan 12, 2012 at 9:50 AM, John DeRosa wrote: >       url(r'^results/text/(?P)/$', 'textresults', > name='exporttextresults') One guess, you haven't specified what the (?P in your regex accepts. For example: (?P\w+) -- You received this message because you are subscribed to the Google Gr

cursor.execute with multiple parameters might be broken

2013-01-15 Thread Andy Woods
e("""SELECT %s FROM '99'""", ["test"]) I just cannot get multiple parameters to work, e.g.: cursor.execute("""SELECT %s FROM %s""", ["test","99"]) I've tried everything I can think of here!

Table2 populated by raw SQL query, help needed

2013-01-17 Thread Andy Woods
Hi, I need to use a raw SQL query and populate a table2 table with the results. The query works fine and returns a list of Dicts using this function from the helpfile : def dictfetchall(cursor): "Returns all rows from a cursor as a dict"

list of dicts to Table2

2013-01-17 Thread Andy Woods
d. I started a stackoverflow question on this<http://stackoverflow.com/questions/14366098/django-list-of-dictionaries-to-tables2>. Spent the whole day trying to figure this out :( Thanks, Andy. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Benchmarking and timing DB transactions in Django

2013-03-03 Thread Andy McKay
On Feb 22, 2013, at 3:18 AM, R R wrote: > I was wondering if there are any tools to benchmark DB transactions using the > Django ORM. I'm using PostGreSQL with Django 1.4. I'm required to compare and > come up with the best possible database design for a project which will have > millions of r

Re: how do I run a django script from command line or Pycharm?

2013-03-12 Thread Andy McKay
On Tue, Mar 12, 2013 at 5:42 PM, frocco wrote: > I want to run the code below in a file called migration.py django-extensions will do this for you, if you create a run method. http://blog.brendel.com/2012/01/how-to-use-djangextensions-runscript.html -- You received this message because you are

Re: Django 1.5 with uwsgi(threaded)/mysql seems to magically cache querysets

2013-04-09 Thread Andy Dustman
You know, I had another report of this, which seemed completely improbable: https://plus.google.com/u/0/101898908470597791359/posts/AuMJdgEo93k Maybe it's related to a bug in Django 1.5 that was fixed in 1.5.1? https://www.djangoproject.com/weblog/2013/mar/28/django-151/ On Thu, Apr 4, 2013 at 1

Re: Friendship model

2013-08-08 Thread Andy McKay
On Thu, Aug 8, 2013 at 12:41 PM, Robin Lery wrote: > How do i create a Friendship model? Please guide me. > You would need to provide more detail to get much help. The tutorial covers how to make models: https://docs.djangoproject.com/en/dev/intro/tutorial01/ -- You received this message beca

Re: Passing variables to css file in django

2013-08-25 Thread Andy McKay
Any string can be rendered as a template. This is covered pretty well in the docs: https://docs.djangoproject.com/en/dev/ref/templates/api/ For example: >>> from django.template import Context, Template >>> t = Template("body { background-color: {{ bgcolor }} }") >>> c = Context({'bgcolor': '#99

Vancouver Python Day

2013-09-30 Thread Andy McKay
The Vancouver Python User Group and the Vancouver Django Meetup Group are pleased to announce: Vancouver Python Day Saturday, November 16, 2013 SFU Harbour Centre Part of Vancouver Developer Week 2013, Vancouver Python Day is a one-day mini conference celebrating the Python Developer Community in

Vancouver Python Day - Talk Proposal Deadline

2013-10-14 Thread Andy McKay
nouncement soon regarding ticket availability. In the meantime, mark your calendar! Andy -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to d

Django Software Foundation minutes

2013-10-14 Thread Andy McKay
Just wanted to make people aware that each month the board of the Django Software Foundation meets. The minutes of each meeting are published here: https://www.djangoproject.com/foundation/records/ If there's anything you'd like discussed at the next board meeting, please contact us at: https://

Vancouver Python Day - Tickets on sale Friday

2013-10-23 Thread Andy McKay
We're pleased to announce that tickets for Vancouver Python Day will be released on Friday, October 25 at 10AM. You can purchase tickets at http://vanpyday.eventbrite.com/ Space is extremely limited, so we advise buying your tickets as early as possible if you plan to attend. Thanks to our generou

Re: Using auth.login() with multiple databases

2011-04-21 Thread Andy McKay
have another user database where you can store data particular to you application such as session and profiles since your other databases sound immutable? -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups &q

Re: bound form with ModelChoiceField

2011-04-21 Thread Andy McKay
delChoiceField. Since one is a form and one is a field. You can create a ModelForm given a Model and its instance or primary key as outlined here: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#modelform -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You receive

Re: bound form with ModelChoiceField

2011-04-23 Thread Andy McKay
oiceField back into the object ids. new_dict = form.cleaned_data.copy() new_dict['option'] = new_dict['option'].pk Might work. You should then be able to cleanly store that in a session and repopulate forms with it again later. -- Andy McKay a...@clearwind.ca twitt

Re: removing the source of a OneToOneField relationship

2011-05-03 Thread Andy McKay
On 2011-05-03, at 2:05 PM, Seth Gordon wrote: > I get an exception, complaining that Target.source does not allow > null values. You'll probably want to allow null values on your OneToOne field then: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.nul

Re: removing the source of a OneToOneField relationship

2011-05-03 Thread Andy McKay
On 2011-05-03, at 2:05 PM, Seth Gordon wrote: > I get an exception, complaining that Target.source does not allow > null values. You'll probably want to allow null values on your OneToOne field then: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.nul

Re: Hidden rows elements also visible on list filters

2011-05-04 Thread Andy McKay
e unlikely to be able to help. But here's a bet: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter The example for DecadeBornListFilter shows how you can define a custom queryset and perhaps this will allow you to filter out disabled rows

Re: selecting all columns from a table (advanced query)

2011-05-05 Thread Andy McKay
tial model. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Help! Database is locked! Windows developing envrionment, sqlite3, djcelery and djkombu

2011-05-06 Thread Andy McKay
On 2011-05-06, at 7:01 PM, Robert Ray wrote: > I''im using Django 1.3 with Djcelery and Djkombu on Windows7. When I'm > Can anyone give me any help? Thanks in advance! You are using sqlite? Don't use that, use postgresql instead. -- Andy McKay a...@clearwin

Re: Django administration page, created a Site -- now what?

2011-05-06 Thread Andy McKay
/ref/contrib/sites/?from=olddocs The tutorial is a good place to start: http://docs.djangoproject.com/en/dev/intro/tutorial01/ -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django password reset modification

2011-05-07 Thread Andy McKay
internet about this. Here's a couple: http://blog.moertel.com/articles/2006/12/15/never-store-passwords-in-a-database http://www.codinghorror.com/blog/2007/09/youre-probably-storing-passwords-incorrectly.html -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received thi

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-07 Thread Andy McKay
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position > 41: ordinal not in range(128) There's some helpful information on this error from Google, here's one of them: http://wiki.python.org/moin/UnicodeDecodeError -- Andy McKay a...@clearwind.ca

Re: [help]django's FloatField can't insert the mysql's double type data.

2011-05-14 Thread Andy McKay
> Exception Type: TypeError at /admin/main/learndjango/add/ > Exception Value: 'float' object is not callable Please paste your model that is having the problem. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscrib

Re: [help]django's FloatField can't insert the mysql's double type data.

2011-05-14 Thread Andy McKay
els/fields/#floatfield Not sure off the top of my head why you get that error though. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Inverted checkbox value in modelForm field for BooleanField?

2011-05-14 Thread Andy McKay
): def __init__(self, *args, **kw): kw['instance'].click_through = True super(MyForm, self).__init__() -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: NoReverseMatch while rendering

2011-05-25 Thread Andy McKay
while rendering: Reverse for 'profile_detail' > with arguments '('',)' and keyword arguments '{}' not found. Hence it can't find the matching url. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are

Re: Synchronize method or model field access

2011-05-25 Thread Andy McKay
http://ask.github.com/celery/getting-started/introduction.html -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: Need some help with MySQL and on OSX

2011-06-06 Thread Andy Dustman
MacPorts will install it too, but you might find there are a lot of dependencies. On Jun 6, 2011 9:56 AM, "Ivo Brodien" wrote: > > >> MAMP. about as easy as it can get. >> http://www.mamp.info/de/index.html > > But you will still need to install somehow MySQLdb and that is the main problem. > > I

Re: Need some help with MySQL and on OSX

2011-06-06 Thread Andy Dustman
Everyone complains, but no one submits patches. On Mon, Jun 6, 2011 at 12:54 PM, scot.hac...@gmail.com wrote: >> On Monday, June 6, 2011 2:30:25 AM UTC+1, Kolbe wrote: >> >> > Anyone have any good documentation on getting django with MySQL on OSX >> > out there? > > It really is amazing how diffi

Re: Open source Django websites

2011-06-20 Thread Andy McKay
p. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Andy McKay

Re: Unit-Testing Dilemma

2011-06-21 Thread Andy McKay
r mock and check that under different conditions it is called correctly. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: mach-o, but wrong architecture

2011-06-23 Thread Andy Dustman
Did you make sure you completely cleaned out the build directory between attempts? I.e. manually remove it. Also see (if you haven't already) http://stackoverflow.com/questions/3061277/python-mysql-wrong-architecture-error I don't know exactly why it's so hard to build on Mac OS X, and I wrote th

Re: mach-o, but wrong architecture

2011-06-24 Thread Andy Dustman
"Safe" probably means "it won't crash". On Fri, Jun 24, 2011 at 11:03 AM, John wrote: > So the documentation is incorrect? > > It claims that it is multi-process safe. > > On Jun 23, 6:53 pm, Malcolm Box wrote: >> Re your cacheing problem the behaviour you are seeing is exactly what would >> be

Re: mach-o, but wrong architecture

2011-06-24 Thread Andy Dustman
sql (had to > reinstall XCode for some reason) and it tells me that it cant find a > dependency of python_select, but apparently python_select has been > deprecated. > > Do you know a way around this? > > On Jun 23, 5:50 pm, Andy Dustman wrote: >> Did you make sure you comp

Re: mach-o, but wrong architecture

2011-06-24 Thread Andy Dustman
. > > John-Paynes-MacBook-Pro:~ jpayne$ sudo port install python27 > --->  Computing dependencies for python27 > Error: Dependency 'python_select' not found. > Error: Status 1 encountered during processing. > To report a bug, see <http://guide.macports.org/#project.tic

Re: ImportError: No module named site

2011-06-30 Thread Andy Dustman
On Thu, Jun 30, 2011 at 4:54 AM, bruno desthuilliers wrote: > On Jun 29, 7:32 pm, Kyle Latham wrote: > (snip) >> I have no idea what is going wrong, but here is all my code thus far >> (I'm following the tutorial to create my own app that will display >> various material measurements) >> >> -

Re: How to use the django-users mailing list properly and doing your homework..

2011-07-06 Thread Andy McKay
hey are longer around - IRC will still be there :) The #django IRC channel and all the other channels for all the other projects (celery, gevent, postgres, mysql etc) can be great. I'd recommend them as a great help channel to everyone. -- Andy McKay a...@clearwind.ca twitter: @a

Re: anybody using PhoneGap with Django

2011-07-07 Thread Andy McKay
On 2011-07-07, at 2:22 PM, John Fabiani wrote: > I'm wondering if anyone has had any success with PhoneGap and Django? Yes. -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users"

Re: [gripe] Pain on OSX

2011-07-28 Thread Andy Dustman
My development setup is: Snow Leopard X-Code MacPorts Python-2.6 via MacPorts MySQLdb via MacPorts MySQL server on an Ubuntu VM (mimics production) Django-1.3 via virtualenv easy_install WingIDE or Django internal HTTP server Production (and pre-production testing) is on Ubuntu Lucid, Apache, mod

Re: Subdomain/Accounts

2010-12-29 Thread Andy Shaw
yuser/*. Once you've done this, you can use standard a Django URLConf and not worry about what the actual domain name is :) HTH, -Andy [1]: There's an example of what is essentially this rule for Apache here: http://muffinresearch.co.uk/archives/2006/08/20/redirecting-

Re: slugify override

2011-01-08 Thread Andy Mikhailenko
> How can I override slugify function globally? I want to add some other > letters actions especially form my language. You can try django-autoslug for your own code. Existing code can be (?) fixed via monkey-patching but that's not a good idea. -- You received this message because you are subsc

Re: "CSRF verification failed" when sending simple GET request using curl

2011-01-19 Thread Andy McKay
com/en/dev/ref/contrib/csrf/#exceptions -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from t

Re: Word file Display and Save??

2011-01-29 Thread Andy McKay
eField. http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goog

Re: QUERYDICT immutable

2011-01-29 Thread Andy McKay
cs.djangoproject.com/en/dev/ref/request-response/#httpresponse-objects -- Andy McKay a...@clearwind.ca twitter: @andymckay -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@google

Re: checkbox, how to return state back to html

2011-02-03 Thread Andy McKay
t equal to 'cbSMWord' > return render_to_response('c:/Python27/Scripts/Spokas/web.html', > {'cbSMWord':cbSMWord}, context_instance = RequestContext(request) ) Also, you should not be specifying the full path to templates, let the template loader do that

Re: Navigation menu

2011-04-12 Thread Andy Mikhailenko
be natural. [1] http://packages.python.org/django-navigation/ Regards, Andy -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email

Bug? Infinite migrations with empty help_text and ugettext_lazy

2015-06-04 Thread Andy Gimblett
rsions up to 1.8.2, but it doesn't exhibit on any 1.7.x versions I've tried. I haven't tried any development versions. Can anyone provide any insight? Is this worth raising a bug over? Thanks! -Andy -- You received this message because you are subscribed to the Google Grou

Re: Bug? Infinite migrations with empty help_text and ugettext_lazy

2015-06-04 Thread Andy Gimblett
om/newticket and fixed. > > ... > > Thanks for finding and reporting the bug! Thanks for the clear reply! I'll raise a ticket on Tuesday (which will be my next opportunity to do so). Best, -Andy -- You received this message because you are subscribed to the Google Groups "D

Re: Interfacing Django Project with Python Script

2015-07-18 Thread Andy Shapiro
For a standalone script (and django 1.7+), you'll need to add this at the top of your script: import django django.setup() https://docs.djangoproject.com/en/1.8/ref/applications/#django.setup https://docs.djangoproject.com/en/1.8/intro/tutorial01/#playing-with-the-api On Friday, July 17, 2015

Django migrations and DateTimeField defaults

2014-08-12 Thread Andy Roxby
Hello all, I'm new to this list so please let me know I'm overlooking any sort of e tiquette. I'm having problem trying to use a default value for a DateTimeField. When I specify a default value WITH a timezone I receive the following error during './manage.py makemigrations' ValueError: Cannot

Re: Django migrations and DateTimeField defaults

2014-08-13 Thread Andy Roxby
Thanks, that's what I did. In my humble opinion, the ValueError should be removed and the timezone serialized in the form UTC offset (eg: -0400). On Tuesday, August 12, 2014 9:43:11 PM UTC-4, Collin Anderson wrote: > > Wow. That almost sounds like a bug, though you can however use a callable. >

Re: Django Tutorial #5 Testing: return Poll.objects.filter( SyntaxError: 'return' outside function

2014-09-16 Thread Andy McKay
You've got a syntax error in your code, likely wherever you have "return Poll.objects.filter(" in your code. "Outside a function" likely means that you have not correctly indented your code, for example if your return has no indentation. Whitespace in Python is significant and is part of the synta

How do I migrate models from one app to another with django 1.7 migrations?

2014-11-04 Thread Andy Kish
eir canonical names as would normally be created by the 0001_initial migration. 3. Fake the ('old_app', '0006_auto_delete_blah')migration. 4. Get rid of the Meta.db_table entries so my moved models just use the normal table names they're supposed to. Seems like it should

Re: memcached and redis

2014-03-01 Thread Andy McKay
a session backend: https://docs.djangoproject.com/en/dev/topics/http/sessions/#using-cached-sessions Andy -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

ANN: ReportLab PLUS 3.1 - rapid PDF creation for Django sites

2014-04-28 Thread Andy Robinson
uild service. Find out more... <http://www.reportlab.com/reportlabplus/> Andy Robinson CEO / Chief Architect ReportLab -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

Re: What are the active Django e-commerce frameworks right now (2014)?

2014-04-28 Thread Andy Robinson
I second the recommendation for Stripe. I have no need for shopping carts but suffered for years dealing with credit card payments for license renewals. Many solutions were running into problems with foreign banks blocking payments (which the payment solution can't do anything about), spurious

<    1   2   3   4   5   6   7   >