Re: Very bad experience in Django...

2009-06-25 Thread Chris Withers
steveneo wrote: > I try to use Django in a new project. Honestly, it is very bad > experience. It looks not boosting my development speed. Today, I > almost give up and begin to look up another Python framework Go for it :-) Chris -- Simplistix - Content Management, Zope & Python Consultin

Re: Very bad experience in Django...

2009-06-25 Thread Chris Withers
steveneo wrote: > BooleanField limits only to CheckBox? But I set > widget=HiddenField It does not report error. HTML renders > correctly, but actually, you can not use like that?! Didn't you hear me: I said go find another framework, Django obviously sucks because one new user can't get hi

Re: URL & DB question

2009-08-02 Thread Chris Withers
Rob B (uk) wrote: > Solved it by doing this: > > def profile_detail(request, name): > p = get_object_or_404(Profile, name=name) > return render_to_response('profile_detail.html', {'name': p}) How about using the detail generic view: from django.views.generic.list_detail import object_de

Re: URL & DB question

2009-08-02 Thread Chris Withers
Rob B wrote: > Great I didn't know about that one. I'm curious to what are the > benefits of doing it that are? Less code for you to write and maintain :-) Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~

Re: help with excel exports

2009-08-11 Thread Chris Withers
Bobby Roberts wrote: > I'm generating the > response in my view as such: > >response = render_to_response("spreadsheet.html", { > 'tms': tms, > }) This is an evil hack, don't be surprised if weird things happen with it. You should be using xlwt to generate your spre

Re: OT: Drawing lines in the browser

2009-08-18 Thread Chris Withers
Thomas Guettler wrote: > Hi, > > this is offtopic: How can you draw lines in a (django) web application? > > I think you need to use flash or java to do it. I googled for it, but found > only beta > quality projects. > > Has anyone experience with this? Depends on why you want to draw lines..

Re: String aggregator

2009-08-24 Thread Chris Withers
hyuen wrote: > When I use aggregators, I do something like > > T.aggregate(Max('LastName')) > > but the problem is that for aggregators, it expects a float, not a > string. Is it possible to use strings as maximum/minimum values? Where are you importing Max from? What is the error and traceback

Re: How to invoke hasNoProfanities?

2009-09-09 Thread Chris Withers
Brandon Taylor wrote: > I would like to do some obscenity filtering on posts, and I see there > is a setting: PROFANITIES_LIST > > But, how to I invoke the hasNoProfanities validator? I searched the > django source code for this, but the only thing I could find was the > setting in conf > global_

Re: help on outlook integration

2009-05-19 Thread Chris Withers
kam wrote: > We have to integrate of web outlook using HTTP protocol. We are > trying to connect outlook with form based authentication to connect > using HTTP protocol. We are able to connect outlook using HTTPS and > COM object but this is not work on Linux & using COM object we are > able to a

Re: perfomance question

2009-05-21 Thread Chris Withers
Rodrigo Aliste P. wrote: > OH! It does it alone! Another awesome thing to my awesomeness list of > django. What was your solution in the end? I'm always interested this kind of batching of results, and I'm very new to Django... Chris -- Simplistix - Content Management, Zope & Python Consulti

Re: Should this be its own app?

2009-06-19 Thread Chris Withers
Kenneth Gonsalves wrote: > I personally would put everything in one app at the start. If things start to > grow and you want to reuse that part in another project, or release it to the > public (and become famous), then it makes sense to factor it out into a > separate app - maybe a separate pr

djangorecipe questions

2009-09-16 Thread Chris Withers
Hi Jeroen, What's the best mailing list to ask questions about djangorecipe on? I'm CC'ing django-users in the meantime, let me know if there's a better list... I'm just coming to Django myself but I've been a heavy buildout user for a year or so now... I'm curious as to why djangorecipe does

Re: djangorecipe questions

2009-09-17 Thread Chris Withers
Jeroen Vloothuis wrote: > Afaik there is no proper list. I don't follow dango-users but I'm fine > with also discussing it there. Yeah, this list is pretty busy! I'll try and keep an eye out for djangorecipe related posts and forward them your way ;-) > I'm curious as to why djangorecipe

Re: djangorecipe questions

2009-09-17 Thread Chris Withers
James Bennett wrote: > On Thu, Sep 17, 2009 at 5:23 AM, Chris Withers wrote: >> Well, I'm certainly not setuptools-happy, but Django appears to be >> wrapped up as a standard distribution on PyPI (sorry, should have said >> distro, not egg), so it would make sense to u

where to put tests?

2009-09-17 Thread Chris Withers
Hi All, Will the Django testrunner really only find tests in a file called test.py? It strikes me that if a reasonable-sized app is fully tested, that tests.py is going to be unpleasantly long. How come the testrunner doesn't look for a package called tests like most of the other python testi

Re: where to put tests?

2009-09-17 Thread Chris Withers
Javier Guerra wrote: > reasonable-sized apps aren't too big; reasonably-factored projects > have lots of apps > > but, yeah, you're right that using a 'test' directory with an empty > __ini__.py and the tests files inside that should work... Nope, only finds them if you have a suite() function i

Re: djangorecipe questions

2009-09-18 Thread Chris Withers
James Bennett wrote: > On Thu, Sep 17, 2009 at 6:01 AM, Chris Withers wrote: >> All of your problems seem to center on zipped eggs. These are evil >> things anyway, and can be avoided by simply putting zip_safe=False as a >> parameter to setuptools (whether it actually come

composite primary keys?

2009-09-22 Thread Chris Withers
Hi All, Is it really the case that the Django ORM doesn't support composite primary keys? I'm looking to do the equivalent of the following sqlalchemy model: Base = declarative_base(...) class Month(Base): __tablename__ = 'months' username = Column( String,ForeignKe

specifying test-only dependencies with djangorecipe

2009-09-22 Thread Chris Withers
Hi Jeroen, I use two libraries a lot of the time when I'm testing: http://pypi.python.org/pypi/testfixtures http://pypi.python.org/pypi/mock However, I only use these in testing and don't really want them deployed for bin/django, only for bin/test. How would I go about doing this? cheers,

serialization formats?

2009-09-23 Thread Chris Withers
Hi All, Where can I find docs on the actual serialisation formats used by Django's serialisation support? http://docs.djangoproject.com/en/dev/topics/serialization/#id1 ...lists them, but doesn't actually describe them :-S cheers, Chris -- Simplistix - Content Management, Batch Processing

equivalent of getattr in a django template

2009-09-23 Thread Chris Withers
Hi All, I have this view function: def index(request,model,pk=None): return list_detail.object_list( request, queryset=model.objects.all(), paginate_by=10, template_name='index.html', extra_context=dict( column_titles = [f.name for

Re: equivalent of getattr in a django template

2009-09-23 Thread Chris Withers
Maksymus007 wrote: > {{object.name}} ? no, that is the equivalent of: getattr(object,'name') I want: getattr(object,name) Subtle, but rather important, difference... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -

Re: equivalent of getattr in a django template

2009-09-23 Thread Chris Withers
Daniel Roseman wrote: > It's an intentional limitation of the template language that you can't > do that. You'll need to write a custom tag or filter - luckily it can > be done very trivially as a filter: > > @register.filter > def get_attr(obj, val) > return getattr(obj, val) > > Now in the

re-using field definitions

2009-09-24 Thread Chris Withers
Hi All, I tried this: from django.db import models signins = models.IntegerField( default=0, db_index=True, verbose_name='Total Signins' ) class User(models.Model): name = models.CharField( max_length=50, primary_key=True, verbose_name='Usern

is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Hi All, I have the following in a view: objects = model.objects.all() paginator = Paginator(objects,10) return render_to_response( 'index.html',dict( objects = paginator.page(page), total_objects = len(objects), ) ) Is that

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Chris Withers wrote: > objects = model.objects.all() > paginator = Paginator(objects,10) > return render_to_response( > 'index.html',dict( > objects = paginator.page(page), > total_objects = len(objects), >

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Brian McKeever wrote: > .count is definitely the way to go. Although, I would probably pass it > to your template instead of determining it there. What difference does it make? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co

Re: re-using field definitions

2009-09-24 Thread Chris Withers
Ethan Jucovy wrote: > What happens if you wrap the definition in a function? > {{{ > def signins(): return models.IntegerField(...) > > class User(models.Model): > name = models.IntegerField(...) > signins = signins() > }}} Yeah, this is sort of what I ended up with: from django.db import mod

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Chris Withers
Jani Tiainen wrote: > Chris Withers kirjoitti: >> Brian McKeever wrote: >>> .count is definitely the way to go. Although, I would probably pass it >>> to your template instead of determining it there. >> What difference does it make? > > len(qs) evalu

Re: Is Django thread safe?

2009-09-28 Thread Chris Withers
Pythoni wrote: > Is Django thread safe?If so, from which version? > Thanks for reply The answer is most likely "no, but it doesn't matter". Why are you asking? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~-

Re: developing and deploying django with zc.buildout

2009-09-30 Thread Chris Withers
andreas schmid wrote: > then i wanted to try my apps which i have on my subversion repository > and i added a [site-packages] section to the buildout.cfg using Why not turn your apps into python packages and serve them from a private egg server? > to the [django] section. now i have my project

Re: Is Django thread safe?

2009-09-30 Thread Chris Withers
Torsten Bronger wrote: >> Why are you asking? > > Can it be safely used with Apache's Worker MPM? I guess that would depend on a lot of things, not least of all whether you use mod_python or mod_wsgi to deploy. Certainly if it's the latter, you're likely to get better help on the mod_wsgi list

bulk import limits?

2009-10-08 Thread Chris Withers
Hi All, I need to import data from a legacy app (non-relational database). I was planning to do an xml dump from the old app (which is now done and working) but turns out that the app has rather more data in it than I realised ;-) I need to import about 40 million rows into one table. I take

efficiently deleting content based on how old it is

2009-10-08 Thread Chris Withers
Hi All, I have a set of models structured roughly as follows: class Month(models.Model): monthname = models.CharField( max_length=14, db_index=True, verbose_name='Month' ) ... class Service(models.Model): month = models.ForeignKey(Month) s

Re: iphone to website

2009-10-08 Thread Chris Withers
grant neale wrote: > Does anyone have a hint on where I should start, re: making the > website ready to receive this information? Doesn't the iPhone have a web browser? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -

Re: efficiently deleting content based on how old it is

2009-10-08 Thread Chris Withers
Tim Chase wrote: > I wouldn't try to do it from within the web app itself -- > I'd schedule some wee-hours cron job to do the deletion. I plan to, don't worry ;-) But, I would like to do it from within the Django environment to make it immune to changes of database... > 6mo boundary. Your Mont

problems subclassing models

2009-10-08 Thread Chris Withers
Hi All, I have a set of models that all have the same implementation for a method, so I thought I'd create a base class for these: class UrlModel(models.Model): def get_absolute_url(self): return reverse(index,kwargs=dict(fk=self.pk)) ...and then have the relevant models subclass

Templating wart

2009-10-09 Thread Chris Withers
Hi All, I have a piece of template that looks like this: > >{% for cell in row %} > >{% if forloop.first and row.url %}{% endif %} >{{cell}} >{% if forloop.first and row.url %}{% endif %} > >{% endfor %} > How can I structure this such that I don't have to repea

Re: efficiently deleting content based on how old it is

2009-10-09 Thread Chris Withers
Streamweaver wrote: > You could set this up as a custom manage.py command and run a cron on > that. Gives the advantage of both initiating from outside the app and > using Django's DB abstraction layer. That's prettymuch what I was planning to do :-) > Then just iterate over the month names mor

Re: problems subclassing models

2009-10-09 Thread Chris Withers
Daniel Roseman wrote: > If your base model doesn't contain any fields, you should probably > mark it as abstract. > http://docs.djangoproject.com/en/dev/topics/db/models/#id6 Thanks, knew there'd be some magic I needed to invoke ;-) Chris --~--~-~--~~~---~--~~ Y

Re: Templating wart

2009-10-09 Thread Chris Withers
british.assassin wrote: > You could do this: > > > {% for cell in row %} > > {% if forloop.first and row.url %}{{cell}} > {% else %} > {{cell}} > {% endif %} Then you're violating DRY on {{cell}}, which of course may be a lot mroe complicated than {{cell}}... cheers, Chris -- Simplistix -

required fields during object instantiation

2009-10-10 Thread Chris Withers
Hi All, Assuming this model: class Month(models.Model): month = models.DateField( db_index=True, verbose_name='Month' ) def __unicode__(self): return unicode(self.month.strftime('%B %Y')) Now, I could have sworn this used to throw an error if I did:

Re: newbie , need some help

2009-10-10 Thread Chris Withers
danin wrote: > I am just learning django from last 2 weeks. while learning i get > confused in validation. Can anyone plese provide me reference to some > material so that i can read and underatand it from ther. http://lmgtfy.com/?q=django+validation How about getting and reading the Django b

Re: Current Django tests fail?

2009-10-12 Thread Chris Withers
Tim Chase wrote: > Is there something obvious I missed? Hi Tim, I do wonder if you might get more help with these problems on the Django developers list? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~-

does this get or create code ship with django?

2009-10-14 Thread Chris Withers
Hi All, I have a function that looks like: def get_or_create(model,**kw): try: obj = model.objects.get(**kw) except model.DoesNotExist: obj = model(**kw) return model Does something like this ship with django? If not, should it? cheers, Chris -- Simplistix

hosting from /some/url in apache

2009-10-14 Thread Chris Withers
Hi All, I need to host my django project from /some/folder in my apache instance. I have the following: WSGIScriptAlias /some/folder /path/to/django.wsgi Does this now mean I have to prefix all my entries in urls.py with /some/folder? I hope not, but give that going to: http://myserver/some

Re: hosting from /some/url in apache

2009-10-14 Thread Chris Withers
Jani Tiainen wrote: >> What am I doing wrong? > > "nothing". Well, it turned out I was editing a backup copy of the apache config file :-( My bad. Once I started editing the right file, things worked as expected ;-) > And if you're using authentication in your app you must provided full > ab

Re: efficiently deleting content based on how old it is

2009-10-20 Thread Chris Withers
buttman wrote: > you could also do it this way: > > http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html url whacking like that is pretty evil... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.

Re: efficiently deleting content based on how old it is

2009-10-20 Thread Chris Withers
Shawn Milochik wrote: > I know this doesn't answer the hard part of your question, but here's > a simple way I delete old stuff from a database via an external script > that's run by cron: > > Item.objects.filter(date_updated__lte = datetime.now() - timedelta > (days = 30)).delete() Yep, th

Re: efficiently deleting content based on how old it is

2009-10-27 Thread Chris Withers
Peter Bengtsson wrote: >> Yep, that's prettymuch what I ended up writing. Wow, Django's ORM >> expressions are ugly compared to SQLAlchemy ;-) >> > Then just > import sqlalchemy Yes, because that obviously provides a drop-in replacement for all users of Django's ORM ;-) > If the db is a legacy

Re: Remote developer opportunity

2009-11-02 Thread Chris Withers
Kenneth Gonsalves wrote: > On Monday 02 Nov 2009 1:17:01 pm Kashif Azeem wrote: >> I am interested. If you can write a little bit about yourself, type of >> work, how to apply? > > please take this offlist It was probably a mistake. Google groups is pretty annoying in the way it sets the Reply

why deliver .csv when you want to be delivering .xls?

2009-11-03 Thread Chris Withers
James Bennett wrote: > On Tue, Nov 3, 2009 at 1:17 AM, Low Kian Seong wrote: >> There is a query page where the start_date and end_date is being sent. >> Then the do_defender_advanced will process it and generate an Excel >> using the template. > > One other thing is that the Django template sys

where can I find good unit test examples?

2010-05-06 Thread Chris Withers
Hi All, Where can I find good examples of django unit tests? I currently just want to test my models and some helper functions, but they will do a .save() on a bunch of model instances. Any help gratefully recieved! Chris -- You received this message because you are subscribed to the Google

more complex queries

2010-05-20 Thread Chris Withers
Hi All, I have a Transaction model with a DecimalField called "amount" and a CharField called "action". How do I sum all the transactions, multipling the amount by -1 when the action is REFUND? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting

Re: more complex queries

2010-05-20 Thread Chris Withers
John M wrote: Sounds like two queries to me, sum all the refunds and then subtract them from all the non-refund amounts. does that work for ya? Not really, that requires two queries. I know this can be done in one query in SQL, just wondering how to express that in Django ORM speak... Chris

filtering by related object causes query to grind to a halt

2010-05-23 Thread Chris Withers
Hi All, I have the following models: class Event(models.Model): name = models.CharField(max_length=100) price = models.DecimalField(max_digits=4,decimal_places=2) class Ticket(models.Model): number = models.IntegerField(db_index=True) event = models.ForeignKey(Event) class Tick

Re: filtering by related object causes query to grind to a halt

2010-05-23 Thread Chris Withers
Okay, so I noticed that it's the following code, and it's only when I filter on user *end* event: Chris Withers wrote: queryset = TicketStatus.objects.filter(active=True) if user_id: queryset = queryset.filter(owner=User.objects.get(id=user_id)) queryset = query

Re: slow filtering by related and local fields, only on sqlite, not on postgres?

2010-05-23 Thread Chris Withers
Chris Withers wrote: queryset = TicketStatus.objects.filter(active=True) if user_id: queryset = queryset.filter(owner=User.objects.get(id=user_id)) queryset = queryset.filter(ticket__event=event) return list_detail.object_list( request, queryset

moving from Postgres to MySQL

2010-10-11 Thread Chris Withers
Hi All, I have an existing Django app with lots of data in it. For reasons beyond my control, this app needs to move from Postgres to MySQL. What's the best way of going doing this? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://w

HTTP load testing tools?

2010-10-13 Thread Chris Withers
Hey all, I hope this is still on topic, but what tool sets do people around here use for doing load testing of Django projects? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this message becaus

Re: HTTP load testing tools?

2010-10-13 Thread Chris Withers
On 13/10/2010 09:17, Chris Withers wrote: I hope this is still on topic, but what tool sets do people around here use for doing load testing of Django projects? Thanks for the answers... ...now to ask the question in a different way again ;-) Anyone recommend any load testing services

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 11/10/2010 14:03, Shawn Milochik wrote: One way would be to use the dumpdata command to export everything, change your settings to point to the new database, then loaddata to restore. Okay, so I'm using buildout and djangorecipe for my deployment. On the postgres-backed server, I did: bin/

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 21/10/2010 14:06, Jeff Green wrote: When I was using loaddata I found out that if I did not have a True or False value for any boolean fields, I would have an issue loading the data. Once, I set the value for any records to True or False I was successfully able to use loaddata. Hope that helps

Re: moving from Postgres to MySQL

2010-10-21 Thread Chris Withers
On 21/10/2010 14:48, David De La Harpe Golden wrote: On 21/10/10 13:31, Chris Withers wrote: ...which is a little odd, given that the file was created by 'dumpdata'. Any ideas? Do you see any genuine wierdness in the format of any stringified datetimes in the dumped json? Yes I k

Re: moving from Postgres to MySQL

2010-10-22 Thread Chris Withers
On 21/10/2010 15:40, ringemup wrote: MySQL has a tool (mysqldump) that will output the contents of an entire database to a SQL file that can then be loaded directly into another database. Does Postgres not have anything analogous? Sure, pg_dumpall. Now, what're the chances of the SQL that spit

{% url admin:index %} generating wrong urls

2009-12-24 Thread Chris Withers
Hi All, My django site is served up with the following in Apache's config: WSGIScriptAlias /studio /django/studio/bin/django.wsgi My urls.py looks like: urlpatterns += patterns( 'django.contrib', (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'auth.views.login'),

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > Can anyone tell me what I'm doing wrong? > > > No idea. I can't recreate by copy & pasting you urlpatterns. Tried on > Django 1.1.1 and current trunk. I've got mod_wsgi 2.3 instead of 2.5 > but I doubt that makes a difference for this -- everything else the same >

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Graham Dumpleton wrote: > > As I told you when you tried to use private email to get me to help on > this, Apologies for that, I was actually trying to use Google's web UI to reply to that thread in context. Their UI obvious sucks more than I realised as it just sent a private mail to you :-(

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Graham Dumpleton wrote: > >> How can I step through execution from the django.wsgi file and see where >> I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the >> django.wsgi file won't do what I want? > > Sort of, but you have to run Apache in single process mode. See > further d

running "httpd -X" on debian/ubuntu

2009-12-26 Thread Chris Withers
Chris Withers wrote: > Graham Dumpleton wrote: >>> How can I step through execution from the django.wsgi file and see where >>> I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the >>> django.wsgi file won't do what I want? >&g

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > On Sat, Dec 26, 2009 at 5:32 PM, Chris Withers <mailto:ch...@simplistix.co.uk>> wrote: > > > If anyone can tell me how to do "httpd -X" on a debian or ubuntu host > I'd be very grateful... > > > /usr/sbin/apach

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Graham Dumpleton wrote: > >> I also added a {{request}} to the base.html of the django >> app. Here's the output of the request's SCRIPT_NAME for various urls: >> >> /studio - u'' >> /studio/ - u'/studio' >> /test - '/test' >> /test/- '/test/' > > Hmmm, that would suggest that it is Dj

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > In my case, environ.get('SCRIPT_URL', u'') and > environ.get('REDIRECT_URL', u'') both return empty. I wonder what SCRIPT_URL is and why it's empty for you but not for me? I wonder if SCRIPT_URL having a value is something that came along with a later version of mod_wsgi?

Re: Is it ok to use double quotes instead of single quotes in Field.choices?

2009-12-27 Thread Chris Withers
Continuation wrote: > Now if I change the single quotes to double quotes, it seems to work: > (1, "I'm looking for..."), Double quotes are absolutely fine and a lot nicer to look at than 'I\'m hard to read'. cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting

Re: local variable 'delta' referenced before assignment

2009-12-29 Thread Chris Withers
neridaj wrote: > I don't see why this error is happening, the var is assigned. > > def moderate_comment(sender, **kwargs): > instance = kwargs['instance'] > if not instance.id: > content = instance.content_object > if isinstance(content, Tweet): > de

Re: {% url admin:index %} generating wrong urls

2009-12-29 Thread Chris Withers
Karen Tracey wrote: > There is at least one bug open on empty PATH_INFO handling: > > http://code.djangoproject.com/ticket/9435 > > though it doesn't sound like it's focused on exactly the same issue, No, I had as thorough a look as I could and could find no issue which directly covered this i

Re: local variable 'delta' referenced before assignment

2009-12-29 Thread Chris Withers
neridaj wrote: > File "/Users/jasonnerida/django-apps/blog/models.py" in > moderate_comment > 142. if delta.days > 30: Okay, now the line numbered code for the whole of the moderate_comment function... Also, check you're not mixing tabs and spaces in that models.py file... Chris --

Re: {% url admin:index %} generating wrong urls

2010-01-12 Thread Chris Withers
davathar wrote: Unfortunately adding the rewrite rule mentioned as a work around hasn't worked for me. Please post the relevant section of your Apache config (including your wsgi *and* rewrite lines), there's no reason the rewrite rule workaround shouldn't work for you... Chris -- Simplist

Re: Send and Receive SMS from a django app

2010-01-17 Thread Chris Withers
Alessandro Ronchi wrote: I cannot use an SMS gateway for my app (I must use a SIM and an hardware modem). Why? This is not a sane requirement for a web app... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You receiv

Re: Send and Receive SMS from a django app

2010-01-22 Thread Chris Withers
Alessandro Ronchi wrote: Because of the number of the SMS I must write. I need a web app that makes intense use of SMS without any external dependences (like Unicef app). If you want to send a *lot* of sms'es then you definitely want to be using a gatway sending service rather than trying t