Re: Django and LDAP

2012-09-10 Thread Mike Dewhirst
ecommend you start with a plan to unit test absolutely everything. The ldap side of things is tricky. Once you get your head around Python and Django you will really appreciate the nth degree of flexibility. Good luck Mike Can someone please help me with this issue, i'll be very gratefu

Re: Problems with simple "hello world" test - "ImportError: Could not import settings"

2012-09-10 Thread Mike Dewhirst
On 11/09/2012 1:31am, DJ-Tom wrote: Hi, I'm new to django and python at the same time (Nightmare ) and currently struggling to get a basic understanding of how everything works and how the different components are connected to each other. My setup is a s follows: - Apache 2.2 running as a serv

Re: Django and LDAP

2012-09-11 Thread Mike Dewhirst
On 12/09/2012 7:49am, Ivan Pavlović wrote: Thank you Mike for your answer. I started this topic, because i have an assignment at my Faculty, which requires connection between Django and an LDAP (assistant insisted on 389ds). I installed Django, enabled admin, logged in through Firefox. I can&#

Re: Django and LDAP

2012-09-11 Thread Mike Dewhirst
On 12/09/2012 8:05am, Mike Dewhirst wrote: On 12/09/2012 7:49am, Ivan Pavlović wrote: Thank you Mike for your answer. I started this topic, because i have an assignment at my Faculty, which requires connection between Django and an LDAP (assistant insisted on 389ds). I installed Django, enabled

prevent change depending on other field values

2012-09-13 Thread Mike Dewhirst
will be a business rule violation to change that ForeignKey. I thought of adding a duplicate field and if both of the other fields are non-blank comparing the duplicate with the ForeignKey field to see if a violation has occurred. Seems messy. How can I do this? Thanks Mike -- You received

Re: check if an user is authenticated from another app

2012-09-14 Thread Mike Dewhirst
On 15/09/2012 2:56am, refreegrata wrote: Hello list. Obviously, I come here with a question. I have a web application developed with Django. It's working Ok. The app is just for internal use and the access to every view is only avaliable for authenticated users with permissions over the section

Re: tree.io installation with django

2012-09-16 Thread Mike Dewhirst
On 16/09/2012 6:41am, Fabian Weiss wrote: The invalid syntax thing is also a bit odd, as it looks valid to me. I haven't followed this thread but whenever I get an invalid syntax error with valid syntax it is usually a problem with an earlier line. In my cases it is often a missing comma or

Re: tree.io installation with django

2012-09-16 Thread Mike Dewhirst
2012 01:59:09 UTC+2 schrieb Mike Dewhirst: On 16/09/2012 6:41am, Fabian Weiss wrote: > The invalid syntax thing is also a bit odd, as it looks valid to me. > I haven't followed this thread but whenever I get an invalid syntax error with valid syntax it is usually a probl

Re: last changed by User

2012-09-27 Thread Mike Dewhirst
https://bitbucket.org/q/django-current-user/src Mike -- 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-user

Re: last changed by User

2012-09-27 Thread Mike Dewhirst
On 28/09/2012 3:01pm, Mike Dewhirst wrote: On 28/09/2012 2:16pm, Greg Donald wrote: On Thu, Sep 27, 2012 at 10:28 PM, Lachlan Musicman wrote: I wanted to display the user that last changed a model instance. I use django-reversion for this: https://github.com/etianen/django-reversion

Re: Javascript encoding and python decoding and vice versa

2012-10-08 Thread Mike Dewhirst
On 9/10/2012 4:07pm, Laxmikant Gurnalkar wrote: Hi, Guys. Anybody knows to encrypt the content in javascript and decode it using python and vice versa. Not sure where you see the threat but if it is between the browser and the server then I think your server needs to provide https encryption

Re: Object Serializer

2012-10-09 Thread Mike Dewhirst
On 10/10/2012 12:10pm, Victor Manuel Quiñones Victor wrote: Hi guys, I need some help here... I need to serialize some objects and save them into the database. What library would you suggest for it? Have you looked at ... https://docs.djangoproject.com/en/1.4/topics/serialization/ Thank y

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Mike Dewhirst
r creds[4] can mean anything you want[2] in your seetings. Mike [1] # -*- coding: utf-8 -*- def getcreds(fname, credsdir='/var/creds/'): """ Return a list of userid and password and perhaps other data. make sure there are a few empty lines at the end of f

Re: environment variable DJANGO_SETTINGS_MODULE is undefined.

2012-10-22 Thread Mike Dewhirst
.py lives in C:\webwork\djngony\project\xyz\settings.py. Then your PYTHONPATH needs to include C:\webwork\djngony The traceback indicates, you need a DJANGO_SETTINGS_MODULE environment variable. In my example above it would simply be project.xyz hth Mike thank you so much. -- You received th

Re: Billing and invoicing app?

2012-10-23 Thread Mike Dewhirst
On 24/10/2012 1:08pm, Jesramz wrote: Quick question, is there a good billing and invoicing app, that anyone can point me to? http://www.djangopackages.com/ Thanks all! -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion

"calculated" filed in model

2012-10-24 Thread Mike Burr
I would like to accomplish the following: class Foo(models.Model): bar = models.CharField() baz = function(self.bar) Of course this doesn't work (at least as I want it to), but I'm guessing that most humans will know what I'm trying to do. What I want is: 1) User supplies value for 'ba

Re: "calculated" filed in model

2012-10-24 Thread Mike Burr
On Oct 25, 12:26 pm, Russell Keith-Magee wrote: > Hi Mike, > > Easily done Just as you said. Works like a charm. And as an added benefit, I understand what the code's doing. Caveats noted. Thanks a bunch. -Mike. > , and no need to use signals or raw SQL: just override the

Append only tables/models

2012-10-24 Thread Mike Burr
I know there are DBMS-specific ways of doing this. I know that there are Django ways of making fields read-only. What I cannot find is a way to make a table/model append-only. It'd be great if this were at the DB level, so I don't have to rely on my code not having any holes that allow edits. I do

Re: environment variable DJANGO_SETTINGS_MODULE is undefined.

2012-10-24 Thread Mike Dewhirst
On 23/10/2012 2:10pm, Mike Dewhirst wrote: On 23/10/2012 8:37am, DjgoNy wrote: I have problem importing from django_tables import tables and when i do it on manage.py shell i get this error. >>> import django_tables2 Traceback (most recent call last): File "", line 1,

Re: Append only tables/models

2012-10-25 Thread Mike Burr
On Oct 25, 3:44 pm, Christophe Pettus wrote: > On Oct 25, 2012, at 8:26 AM, Mike Burr wrote: > > > I know there are DBMS-specific ways of doing this. I know that there > > are Django ways of making fields read-only. What I cannot find is a > > way to make a table/model

signals documentation question

2012-10-29 Thread Mike Dewhirst
This makes your app's models.py a good place to put registration of signal handlers. ... and my question: When models live in a models directory instead of models.py, should the signal handling and registration code go in __init__.py where the models are imported? Thanks Mike \ -- Yo

Re: signals documentation question

2012-10-29 Thread Mike Dewhirst
e. Cheers Mike On 30/10/2012 4:55pm, Russell Keith-Magee wrote: On Tue, Oct 30, 2012 at 1:40 PM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote: The 1.5 docs say ... Where should this code live? You can put signal handling and registration code anywhere you like. However

Re: Posting from HTTP to HTTPS on same domain results in CSRF failure

2012-10-31 Thread Mike Dewhirst
On 31/10/2012 7:21pm, Kevin wrote: Hello everyone, I am in the process of deploying a Django app which works both on HTTP and HTTPS connections, and require that some specific forms only submit via HTTPS. I want the transition process over to HTTPS to be seamless for the end-user. I am impl

how to semi-automate a choice in contrib.admin

2012-11-01 Thread Mike Dewhirst
left empty when my logic says it should complain? Thanks Mike -- 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 dj

Re: how to semi-automate a choice in contrib.admin

2012-11-01 Thread Mike Dewhirst
On 2/11/2012 3:09pm, Mike Dewhirst wrote: If a user leaves a compulsory (blank=False) field empty in the Admin app I want to check the value of a different field and depending on that value either ... do nothing and let the system complain it needs data or fill in some appropriate data so it

Re: docstrings for inherited models not showing in Admin Docs

2012-11-10 Thread Mike Dewhirst
mented but that takes admindocs away from its objectives. Template authors can't use arguments when using model methods. Mike On 11/11/2012 1:15am, David Simmons wrote: Hi I'm using Django 1.4.2. I have a base model: class Account(models.Model): account_id = models.Cha

testing unique_together IntegrityError

2012-11-10 Thread Mike Dewhirst
create(company=tstc) tstdivb.name = '' try: # company and name are unique together tstdivb.save() except IntegrityError as e: pass tstdivb.delete() I've also tried self.assertRaises(IntegrityError) instead of the

Re: testing unique_together IntegrityError

2012-11-10 Thread Mike Dewhirst
On 11/11/2012 4:45pm, Mike Dewhirst wrote: Can anyone help with some unit test guidance please? How can I trap an IntegrityError in a test to prove unique_together is working? I'm modelling a company and multiple divisions. A solo division doesn't need a division.name so I'm al

Re: How to change the schma of database using python manage.py syncdb?

2011-08-18 Thread Mike Seidle
On Thursday, August 18, 2011 12:03:00 pm smith jack wrote: > at last, i use command python manage.py syncdb > > but was suprised to find that the schema of url table in the database > is not changed > > so is there any method to change the shcema of table using django command? When I started wi

Re: objects tools redirect to models def

2011-08-21 Thread Mike Dewhirst
how new you are? Have you got the tutorial working? Mike -- 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+uns

Re: How to create a sub-app directly

2011-08-21 Thread Mike Dewhirst
rly simple, app2 has many complex models so you put them into separate files in a models sub-dir, while app3 has simple models but lots of complex urls which would be best in a separate urls directory and likewise for app3's views. hth Mike -- You received this message because you are s

Re: Quick question on importing

2011-08-22 Thread Mike Dewhirst
The easy way to figure this out is to do it then start a Python interpreter and say "import myapp.model1" The fact is it depends on your python path and the existence of __init__.py files. Testing the import will show you the situation. Regards Mike or do I need to edit someth

Re: Django Development environment

2011-08-23 Thread Mike Seidle
MySQL Production: Debian Lenny, Cherokee or Apache, MySQL Couldn't survive without South :) -- Mike Seidle -- 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 unsubs

Re: How to make an app independent on a specific site?

2011-08-23 Thread Mike Dewhirst
/path/to/mysite is on the pythonpath. Also check that you have __init__.py in each of the sub-directories. hth Mike -- 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.c

Re: Setting default form value in template

2011-08-25 Thread Mike Dewhirst
rite some javascript which finds some value(s) which only appear in the user's browser in the DOM or in the headers - not sure - and manipulate the DOM to save it somewhere before the user hits [Submit]. I'm interested to see how you do this so if you figure it out please post your solut

Re: why is settings.py executed twice?

2011-08-28 Thread Mike Dewhirst
Best answer is here ... http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html M On 28/08/2011 11:02am, Gelonida N wrote: Hi, This is also one of the things (I just started using django, so I have still quite many questions) , that I don't really understand. It doesn't brea

manage.py test app can't find tests

2011-08-30 Thread Mike Dewhirst
'django.contrib.admindocs', 'django.contrib.staticfiles', 'django.contrib.comments', 'commoninfo', 'ldap_groups', # Novell login for auth 'app', ) Thanks for any hints Mike -- You received this message

possible fix for auth test template

2011-09-01 Thread Mike Dewhirst
ccess.html into auth_attrs_no_access.html and the test passed. See diff below. Cheers Mike +++ /django/contrib/auth/tests/templates/context_processors/auth_attrs_no_access.html Fri Sep 2 13:39:08 2011 @@ -1 +1 @@ - +{% if session_accessed %}Session accessed{% else %}Session not access

Re: possible fix for auth test template

2011-09-01 Thread Mike Dewhirst
re. Unfortunately, any deeper and I lose my way. Mike On 2/09/2011 1:52pm, Mike Dewhirst wrote: Django trunk revision 16715 manage.py test is producing one failure out of 326 tests which might be due to an empty template. The test is asserting that response contains 'Session not acce

Re: Authorization workflow model

2011-09-05 Thread Mike Dewhirst
Then you could have 'approved' and 'edited' as two versions of the field. For example, the lower-privileged user edits a copy of 'approved' in 'edited' and save() just saves it. When the admin eventually approves it, the 'edited' field gets cop

Re: Internationalization

2011-09-22 Thread Mike Dewhirst
On 23/09/2011 1:45am, nadae ivar wrote: i check it but not undestand It takes a bit of study and much concentration. I tried it understand it myself recently and posed some questions here and got some very good answers and had my understandings corrected at the time. I still haven't implemen

Re: can't get STATICFILES to work (Django dev version)

2011-10-04 Thread Mike Dewhirst
On 3/10/2011 10:00pm, Gelonida N wrote: On 09/26/2011 10:21 PM, nara wrote: I am having trouble getting STATICFILES to work. I have read the docs, and followed the instructions, but I never get my css files to load. My current workaround is to put all the css inline in my template file, but that

Re: configuring

2011-10-12 Thread Mike Dewhirst
Yeah The last line of the traceback indicates a problem with your MySQL setup possibly with the backend. Check the docs for interfacing Django to MySQL. I use PostgreSQL so I can't help much here. Good luck Mike On 12/10/2011, at 11:12 PM, yezi wrote: > hey everyonei j

Re: a django question about "python manage.py syncdb"

2011-10-14 Thread Mike Dewhirst
d idea at the time. Also my guess is that you will eventually split your project into apps as a more "natural" way to keep things simple rather than putting individual models into their own files. However it may be possible to simply delete your models.py file to get syncdb to

Re: Django admin multiple company accounts

2011-10-19 Thread Mike Seidle
complaints about "why aren't totals at the bottom of tables? How come we have to used this wonky Year/Month/Date drill down? --- Mike -- 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: Integrating facebook canvas with django

2011-10-21 Thread Mike Seidle
r - you get very limited profile data from most Oauth and OpenID providers. Hope that helps. -- Mike -- 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 unsubsc

Re: model: how to reference to the model itself?

2011-10-23 Thread Mike Dewhirst
On 24/10/2011 3:47pm, Ken wrote: I want to create a parent-child like catalog system. from django.db import models class Catalog(models.Model): username = models.EmailField() name = models.CharField(max_length=64) color = models.CharField(max_length=20) state = models.Intege

Re: model: how to reference to the model itself?

2011-10-23 Thread Mike Dewhirst
On 24/10/2011 4:00pm, Mike Dewhirst wrote: On 24/10/2011 3:47pm, Ken wrote: I want to create a parent-child like catalog system. from django.db import models class Catalog(models.Model): username = models.EmailField() name = models.CharField(max_length=64) color = models.CharField(max_length

Re: synchronize django admin interface password with other application passwords

2011-11-06 Thread Mike Dewhirst
x27;s hash. https://docs.djangoproject.com/en/dev/ref/authbackends/ Mike -- 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 t

Re: Serving up CSS files in development

2011-11-07 Thread Mike Dewhirst
orageFinder', ) if DEBUG: STATIC_ROOT = os.path.join(PROJECT_ROOT, 'htdocs/static/').replace('\\','/') print('STATIC_ROOT= %s %s' % (STATIC_ROOT, '(collectstatic)')) else: STATIC_ROOT = '/srv/www/%s/htdocs/static/' % P

help_text line continuation

2011-11-13 Thread Mike Dewhirst
the unwary? Thanks Mike -- 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

django.conf.urls.defaults.url documentation

2011-11-14 Thread Mike Thon
I recently started working on a new Django project using the latest release, and I found the function django.conf.urls.defaults.url being used in urls.py. There's no pydoc documentation for this function. Can anyone tell me what it does or point me to some documentation? thanks

Re: site organization best practices

2011-11-15 Thread Mike Thon
pp. Should be fairly simple to factor out your current logging code into a separate app. Then it will be easier to reuse in other projects. best Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this disc

Re: site organization best practices

2011-11-15 Thread Mike Dewhirst
On 16/11/2011 6:11am, Stuart Laughlin wrote: FWIW I agree with Mike. It's difficult to advise without seeing exactly what you're doing, but I think Mike's advice/approach is sound. I agree too. But in today's mail is a link to an answer to a similar question about cen

Re: django.conf.urls.defaults.url documentation

2011-11-15 Thread Mike Thon
Thanks! -- 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/-/Cq5IlvKfjVAJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe fro

Re: Strange new error

2011-11-16 Thread Mike Dewhirst
7;t some way I could have accidentally emptied that folder from the interpreter is there? Sounds to me like a trashed disk on a Windows machine. I suppose OSX might behave like that too - although I would hope to see an error message of some sort. Do you have any disk analysis utilities? Mike thanks,

Re: Strange new error

2011-11-16 Thread Mike Dewhirst
On the other hand if you have a backup you might be quite relaxed if whatever utility you choose actually does report a bad disk. I'm basing this on your earlier comment that you didn't empty the directory yourself and it is taking a long time to display. An empty directory should d

Re: Strange new error

2011-11-17 Thread Mike Dewhirst
On 18/11/2011 9:48am, Gchorn wrote: Is hard drive corruption like this a common occurrence, and can it be avoided? http://en.wikipedia.org/wiki/Hard-disk_failure http://static.googleusercontent.com/external_content/untrusted_dlcp/labs.google.com/en//papers/disk_failures.pdf ymmv mike

Re: Detect runserver in settings.py?

2011-11-21 Thread Mike Dewhirst
I found this in stackoverflow some time ago. Not sure who to thank but it works for me ... import socket if socket.gethostname() == '': DEBUG = True else: DEBUG = False hth Mike On 22/11/2011 8:03am, Jim wrote: Hello, Inside of my settings.py I'd like to know wheth

Re: Editable datagrid

2011-11-22 Thread Mike Seidle
nything right now. Better to stay loosley coupled and flexible than obsolete in six months -- Mike signature.asc Description: This is a digitally signed message part.

Re: How-to for static files?

2011-11-22 Thread Mike Dewhirst
just to enable static files. I do want to reiterate that I followed the tutorial closely in creating my project so I already have pretty much anything from there. Any other ideas? Inject a bunch of print statements into your settings.py so that you can see exactly where Django thinks it is

Re: django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Mike Dewhirst
There was a great solution to this posted just yesterday ... import sys if 'runserver' in sys.argv: DEBUG = True else: DEBUG = False ... which suggests if 'test' in sys.argv: do this On 24/11/2011 9:53am, Gelonida N wrote: Hi, I just started reading about django testing. Now

Security design questions

2011-11-27 Thread Mike Dewhirst
ango object permissions? Is that an existing framework for the sort of many-to-many relationships I think I need. This must have all been done before. Is there a design pattern someone can point me to? Thanks for reading this far. Any hints appreciated. Mike -- You received this message becau

Re: Security design questions

2011-11-28 Thread Mike Dewhirst
Javier Thank you - that looks great. I'll start coding ... Cheers Mike On 29/11/2011 1:24am, Javier Guerra Giraldez wrote: On Mon, Nov 28, 2011 at 2:21 AM, Mike Dewhirst wrote: 1. Do I have to create many-to-many relationships and before serving a page make sure the user making the re

Re: django tests. where to create users

2011-11-28 Thread Mike Dewhirst
bullet and completely re-load the test database for every unit test but use an in-memory sqlite it should run fairly quickly especially if you have a mega-swag of RAM. Then once a week, switch to PostgreSQL and leave them running while you go and have lunch. Mike -- You received this message

Re: Updating parent record, when child record changes

2011-12-06 Thread Mike Dewhirst
_save [2] https://docs.djangoproject.com/en/1.3/topics/signals/#listening-to-signals Mike Ian -- 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 f

Re: Django Upload Image Help

2011-12-12 Thread Mike Dewhirst
On 13/12/2011 5:25am, cmc wrote: write_info = "name: %s\n caption: %s\n source: %s\n more_info: %s\n\n" % photo.name, caption, source, more_info and I've always had to put parentheses around the values on the right hand side of the % like this ... write_info = "name: %s\n caption: %

get_FOO_display

2011-12-12 Thread Mike Dewhirst
hoosing one of the available things the error is ... Please correct the error below. Value u'1' is not a valid choice. This is Django 1.4 pre-alpha SVN-17200 running on Windows XP SP3 and Python 2.7 I'm 99% sure I have had get_FOO_display() working in the past. Can anyb

Re: get_FOO_display

2011-12-12 Thread Mike Dewhirst
On 13/12/2011 5:21pm, kenneth gonsalves wrote: On Tue, 2011-12-13 at 17:16 +1100, Mike Dewhirst wrote: THINGS = ( (0, 'Thing Zero'), (1, 'Thing One'), ) what happens when you do: THINGS = ( ('0', 'Thing Zero'), (&#

Re: get_FOO_display

2011-12-13 Thread Mike Dewhirst
Absolutely. I went back and found where I had made it work previously and that is exactly what I did. I just had a (hopefully) temporary blur. Thanks Mike On 13/12/2011, at 8:47 PM, Ilian Iliev wrote: > Or you can change your field to IntegerField instead of CharField if you are > pl

Re: Weekly discussion/randoms thread..

2011-12-23 Thread Mike Dewhirst
s as specialist reviewers. The industrial stream would be most appropriate for Django but there is nothing to stop people submitting significant papers for academic review as part of their career. Maybe Jacob could comment? Mike On 24/12/2011 1:24pm, Russell Keith-Magee wrote: On Fri, Dec

Re: django/Data Base Advice

2012-01-02 Thread Mike Dewhirst
instructions *slavishly* until it actually works. Then get yourself a copy of The Definitive Guide to Django by Adrian Holovaty and Jacob Kaplan-Moss and work through that. Finally tackle a small project of your own and make that work. Google will help you answer most of your questions. Good

business integrity rule

2012-01-04 Thread Mike Dewhirst
or each pair of companies. If this is a reasonable thing to do? If so how would I tackle that in the save() method of Obj-2? Thanks for any ideas and pointers Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: business integrity rule

2012-01-04 Thread Mike Dewhirst
Got it sorted now thanks ... Mike On 5/01/2012 2:55pm, Mike Dewhirst wrote: How should I do this? Obj-1 <---[n:M]---> Obj-2 Obj-1 is in one table and Obj-2 is in a different table. The business rule is that a relationship must exist between two companies before there can be a link b

molecular formulae

2012-01-05 Thread Mike Dewhirst
Does anyone know of a Django widget for representing molecula formulae? For example, entering h2o would display with the 2 subscripted and the h and o both uppercased. Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: molecular formulae

2012-01-05 Thread Mike Dewhirst
': char = u'\u2088' elif char == '9': char = u'\u2089' elif char == '0': char = u'\u2080' elif char == '1': char = u'\u2081'

Re: molecular formulae

2012-01-06 Thread Mike Dewhirst
On 06/01/2012, at 8:03 PM, Russell Keith-Magee wrote: > On Fri, Jan 6, 2012 at 1:43 PM, Mike Dewhirst wrote: >> I think I have found a workaround but it will probably blow up in my face >> due to encoding/decoding things I don't fully understand. >> >> Can any

Re: molecular formulae

2012-01-06 Thread Mike Dewhirst
I agree. I was wrong to try anything with the non-numerics. They need to be left as the user entered them. Thanks Mike On 06/01/2012, at 8:46 PM, aastrand wrote: > Unfortunately, an automatic capitalization routine would not work in > general. Take Co (the element cobolt) and C

Re: molecular formulae

2012-01-06 Thread Mike Dewhirst
On 6/01/2012 8:03pm, Russell Keith-Magee wrote: On Fri, Jan 6, 2012 at 1:43 PM, Mike Dewhirst wrote: I think I have found a workaround but it will probably blow up in my face due to encoding/decoding things I don't fully understand. Can anyone comment on the robustness of callin

Re: molecular formulae

2012-01-06 Thread Mike Dewhirst
s my limit for now. :) Thanks Mike might do the job for you. Per-Olof On Jan 6, 1:41 pm, Mike Dewhirst wrote: I agree. I was wrong to try anything with the non-numerics. They need to be left as the user entered them. Thanks Mike On 06/01/2012, at 8:46 PM, aastrand wrote: Unfortu

collectstatic missing on Linux

2012-01-09 Thread Mike Dewhirst
Apache on the Linux staging server if I manually copy all the static files to the STATIC_ROOT directory. Any hints appreciated Thanks Mike [1] Available subcommands: cleanup compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages

[Solved] collectstatic missing on Linux

2012-01-10 Thread Mike Dewhirst
'\\','/') sys.path.append(PROJECT_ROOT) sys.path.append(SRC_ROOT) ... for some reason manage.py doesn't like my Linux setup and needed some reassurance. Cheers Mike On 10/01/2012 5:24pm, Jeff Heard wrote: Make sure the staticfiles app is in your INSTALLED_APPS settin

scheduling in future

2012-01-10 Thread Mike Dewhirst
What is the best way to schedule future events in Django? I have a table with future dates and user info. When date==today I want Django to send an email to that user. Ideas? Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users"

Re: scheduling in future

2012-01-10 Thread Mike Dewhirst
On 11/01/2012 4:09pm, Donald Casson wrote: I would take a peek at celery and the eta function. It allows you to specify the task as specified in tasks.py with an eta to the run_asynchronous method. Hope this helps. Looking it up as we speak Thanks Mike Cheers Don On Jan 11, 2012 2:31

Re: Staging (dev,test,prod) in django

2012-01-12 Thread Mike Dewhirst
;m not ready to move code into production but I think that will be much more a manual process managed by a sysadmin after I document what I what I want done. Mike Thomas -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Open-source or closed-source for SaaS?

2012-01-15 Thread Mike Dewhirst
gle are in that market ... Cheers Mike To reiterate my question: Should I open-source the project, or keep it closed-source? Thanks for the advice, Alec Taylor -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

pseudo one-to-one

2012-01-15 Thread Mike Dewhirst
mapped together (in the Admin) as an extension of the parent. In a view I suppose I can use a manager to filter the children into a pseudo-one-to-one thingy but how do I do this in the Admin? Maybe sort them into date order and only show one? Is there a better way? Thanks for any help Mike

Re: pseudo one-to-one

2012-01-15 Thread Mike Dewhirst
'hidden' field which gets updated on saving based on the existence of a more modern child. Dunno. Thanks Mike Bill Beal On Mon, Jan 16, 2012 at 12:55 AM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote: I need a one-to-many to behave like a one-to-one. The paren

Re: pseudo one-to-one

2012-01-16 Thread Mike Dewhirst
x27;t work I'll try and filter out all children except for the current one and then, in the form for the only visible child, find a way to navigate forward to the not-yet-current one and backward to the immediate predecessor. Thanks Bill Mike Bill On 1/16/12, Mike Dewhirst wrote

Re: pseudo one-to-one

2012-01-16 Thread Mike Dewhirst
process. It succeeded nicely because it was genuinely different information in different tables. This problem isn't quite the same and I'm reluctant to keep the same information in two places. There has to be a better way than multiple tables. Thanks Jeff Mike On Jan 16, 201

Re: pseudo one-to-one

2012-01-16 Thread Mike Dewhirst
needs to chain from child to child. If they are entered in chronological order, the IDs will be in numerical order, or else you can add a field to order them. Bill - this is the direction I'm now taking. Thanks one and all. Cheers Mike On Mon, Jan 16, 2012 at 6:06 PM, Mike Dewhirst

ImageField filename

2012-01-18 Thread Mike Dewhirst
to a fixed directory in MEDIA_ROOT for these images. Thanks for any hints Mike -- 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 e

Re: file manager options for user home directory

2012-01-18 Thread Mike Dewhirst
On 19/01/2012 2:10pm, Brian Schott wrote: Looking for some expert advice. I need to provide an upload and file browse capability for a user's home directory. It doesn't have to be a full blown file explorer necessarily, just a basic upload, download, rename, delete. What's the best way to deal

Re: file manager options for user home directory

2012-01-19 Thread Mike Dewhirst
such security within the conf files without needing .htaccess files in the user directories. This approach is used frequently on sites where people require ftp access to tweak files owned and served by the webserver. It is just reversing the perspective to give nginx access to files it doesn&#x

Re: Model-driven Django development

2012-01-21 Thread Mike Dewhirst
ing a script to create Django models from the ER or UML diagrams. It is a while since I looked at it so I might be leading you astray. Good luck Mike Can any of these sorts of—or for that matter, any sort of—model-driven development techniques be used for Django? -- You received this me

Re: Deverifying a URLField

2012-01-24 Thread Mike Dewhirst
On 25/01/2012 10:30am, Rich Jones wrote: Hello, all! I have a small conundrum I could use a hand with. I have a deployed Django application with a Model which has a URLField: project_homepage = models.URLField('Project Homepage', blank=True) How about ... project_homepage = models.URLField(

Re: How to implement pre-save operations for inlines in the admin interface?

2012-11-15 Thread Mike Dewhirst
even subclass your models save- operation. This is a question not a competing opinion. Why would you use a post-save signal? Why not just override save() and use the model manager directly to find the previous period and if it doesn't have and end date pop one in? Thanks Mike -- You rec

Re: How to implement pre-save operations for inlines in the admin interface?

2012-11-15 Thread Mike Dewhirst
Thanks Arnold - makes sense. Cheers Mike On 16/11/2012 11:01am, Arnold Krille wrote: On Fri, 16 Nov 2012 08:43:04 +1100 Mike Dewhirst wrote: On 16/11/2012 3:52am, Arnold Krille wrote: Why do you want to do this only in the admin interface? Its a generic thing: every time you save/change a

no need to syncdb

2012-11-15 Thread Mike Dewhirst
inished I can syncdb and lock it in. Delicious! Mike -- 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

Re: psycopg2

2012-11-18 Thread Mike Dewhirst
A very useful resource for Windows users is http://www.lfd.uci.edu/~gohlke/pythonlibs/ ... where you can download the compiled psycpg2 package you need. Also, I prefer pip rather than easy-install Good luck. Mike On 18/11/2012 6:36pm, Jun Tanaka wrote: Thank you for your advise. I used

<    4   5   6   7   8   9   10   11   12   13   >