MaxValueValidator and small floats

2020-04-28 Thread Marshall Sutton
er 0.02 or 0.02, I Geta validation error - Ensure this value is greater than or equal to 0.02. My guess is that this has to do with floating point equality issues. Has anyone experienced this behavior before, and how do I fix it? Marshall -- You received this message because you are subscri

Re: Must be my and and can't be my code -- tracing back a URL pattern type mismatch

2019-04-03 Thread Josh Marshall
OK, I've gotten time to touch the code again, applied your suggestion, but there is no apparent change in behavior. For the sake of argument, I'm including the stack trace again. I'm not sure where my good debugging entry point is here. -- You received this message because you are subscribed

Re: Must be my and and can't be my code -- tracing back a URL pattern type mismatch

2019-04-01 Thread Josh Marshall
.. > > On Sunday, 31 March 2019 04:31:42 UTC+2, Josh Marshall wrote: >> >> I'm helping out on a project, but am running into a paradox of a bug must >> existing in the code, but no project code is called. Not sure how to deal >> with this one. It looks

Re: Must be my and and can't be my code -- tracing back a URL pattern type mismatch

2019-03-31 Thread Josh Marshall
Identical behavior. On Sunday, March 31, 2019 at 12:42:17 AM UTC-4, jlgimeno71 wrote: > > > On Sat, Mar 30, 2019 at 7:31 PM Josh Marshall > wrote: > >> I'm helping out on a project, but am running into a paradox of a bug must >> existing in the code, but no proje

Must be my and and can't be my code -- tracing back a URL pattern type mismatch

2019-03-30 Thread Josh Marshall
I'm helping out on a project, but am running into a paradox of a bug must existing in the code, but no project code is called. Not sure how to deal with this one. It looks related to URL setup and the urls.py file is practically identical to the examples. Can anyone make sense of this stack

Re: Django ignoring Create_DB setting on test

2019-02-18 Thread Carl Marshall
I'll note that "CREATE_DB" is slightly misleading, and would be more accurately called "CREATE_SEPARATE_TEST_DB_IN_ORACLE". The error I'm getting is somewhat misleading also as there's nothing wrong with the ALWAYS keyword, the problem is that the test script is trying to create a table in a da

Django ignoring Create_DB setting on test

2019-02-18 Thread Carl Marshall
Hi all, I think I've found a bug here - or certainly I have some behaviour that I don't expect and don't want. My django (2.1.7) project is providing a query/read interface to some existing legacy databases. These are Oracle based (and that brings its own challenges, as they're not current Ora

Re: No module named "newsimage" app

2018-09-25 Thread Tatenda Marshall
Did you run any migrations "The world is just for a moment so make it a moment of obedience" On Tue, Sep 25, 2018 at 1:05 PM Melissa Malala wrote: > My project is giving me an error called "No Module named "newsimage" app > (2 Screenshots attached) whenever I run the server using: > python3.6

Re: Admin options are just ignored

2014-08-10 Thread Adrian Marshall
Think I found the problem. You're not registering the new Admin model classes you have made. change: admin.site.register(Resguard) to this: admin.site.register(Resguard,ResguardAdmin) do the same with the rest of your admin.site.register() functions That should work! Hope that help

Re: Django - Login from Android

2014-08-05 Thread Adrian Marshall
propriately by the "client". The fact > that the client is a browser or an Android phone doesn't matter. > > Yours, > Russ Magee %-) > > > On Tue, Aug 5, 2014 at 8:18 AM, Adrian Marshall > wrote: > >> I have a Django app up and running and It's more m

Re: deploying django

2014-08-04 Thread Adrian Marshall
I've went through a few different ways. If your set on using apache, Configure Apache with Mod-WSGI on a server. Here's a Good Tutorial: http://thecodeship.com/deployment/deploy-django-apache-virtualenv-and-mod_wsgi/ If you're having trouble with that and your app isn't too demanding you can e

Django - Login from Android

2014-08-04 Thread Adrian Marshall
I have a Django app up and running and It's more mobile based than a web app. I'm new to development with both Django and Android. I've setup an API using Django-Tasty pie and I can get JSON data from my models,including the user model that comes with Django. I've implemented logging in function

Model object can be created in the admin, but cannot be edited after saving?

2012-01-27 Thread marshall
I've got a model that serves as a front-end to spawn celery tasks called LaryerImportTask. I want the admin user to be able to create LayerImportTask objects in the admin, but I don't want them to be able to change it in the admin after it's been created. Any ideas on how I could do this? -- You

Multiple DB in django 1.2

2010-02-25 Thread Roach, Marshall (MROACH)
everything to both machines. I¹m running postgresql and having issues trying to get my router right and didn¹t know if anyone else has done this before. Thanks, Marshall -- Marshall Roach mro...@arinc.com - This e-mail (including any attachments) is intended only for the

Re: raise ValidationError has no effect

2009-04-08 Thread Alistair Marshall
2009/4/8 brian : > > I think I'm having the same issue.  Did you ever find a solution? > Yea, Karen Tracey was right in my case: > On Feb 14, 5:06 pm, Karen Tracey wrote: >> On Sat, Feb 14, 2009 at 11:07 AM, Alistair Marshall < >> this is covered here: >&g

Re: raise ValidationError has no effect

2009-02-15 Thread Alistair Marshall
On Feb 15, 12:06 am, Karen Tracey wrote: > The previous paragraph means that if you are overriding Form.clean(), you > should iterate through self.cleaned_data.items(), possibly considering the > _errors dictionary attribute on the form as well. In this way, you will > already know which fields h

raise ValidationError has no effect

2009-02-14 Thread Alistair Marshall
I have been trying to create a custom field that allows the user to enter a flowrate and clean the data back to kg/s or mol/s. I though I had everything sorted, when I type '10 tones/year', it correctly did the conversion however when I type something that does not validate such as 'twenty' or '5

Re: move/change database type

2009-01-21 Thread Alistair Marshall
On Jan 21, 7:54 pm, joshuajonah wrote: > A normal manage.py dump to fixture doesn't work? > I had missed that one, didn't know it was an option. my bad Thanks Alistair --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

move/change database type

2009-01-21 Thread Alistair Marshall
Hi folks, I have been developing a project on my desktop using sqlite, I have just attempted to move it onto a 'proper' server and was hoping to use mysql. The thing is I have some data in the database from some beta users and was hoping to take the data over with the move. I had planned on usi

drawing diagrams in django?

2009-01-10 Thread Alistair Marshall
hi folks, I am currently trying to create an app which allows the user to generate flowsheets (of a chemical plant) So far I have created all the basics and allow the user to enter information about the individual unitsw chemicals etc and the user can even run a simulation. what I now want to d

Re: inlineformset_factory KeyError after updating

2009-01-06 Thread Alistair Marshall
d to neaten the form. Silly really. Thanks for that Alistair -- Alistair Marshall www.thatscottishengineer.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: inlineformset_factory KeyError after updating

2009-01-06 Thread Alistair Marshall
feed unit the system works fine. However if you go and edit an existing feed unit, an error gets thrown when saving the form. I think that's covered most things - any suggestions/comments welcome Thanks Alistair [1] http://www.thatscottishengineer.co.uk/code/impress.zip -- Alistai

Re: inlineformset_factory KeyError after updating

2009-01-05 Thread Alistair Marshall
2009/1/5 Alistair Marshall : Upgraded to 1.0.2 I'll try and create a cut down version-that may take some time (it is getting to be a large project) Thanks -- Alistair Marshall www.thatscottishengineer.co.uk --~--~-~--~~~---~--~~ You received this me

Re: inlineformset_factory KeyError after updating

2009-01-05 Thread Alistair Marshall
t, but updating an old one gives the error mentioned in my first email. What other information is needed? thanks -- Alistair Marshall www.thatscottishengineer.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

inlineformset_factory KeyError after updating

2009-01-05 Thread Alistair Marshall
I appear to be having the same trouble as explained in a previous thread [1] (and for some reason cant find the button to reply to the last thread ???) The other thread points to a bug that was fixed before django 1.0 (which is what I am running) I am not (intentionally) doing anything funny wit

Combine model form with a formset

2008-12-08 Thread Alistair Marshall
I have been hunting around but can't find a solution to this problem: It is probably best described with an example Example: class Author(models.Model): name= models.CharField() location = models.CharField() class Book(models.Model): name= models.CharField()

Re: model inheritance - getting data from child objects

2008-11-07 Thread Alistair Marshall
cts.get(id=self.id) except: return self class SubItem(Item): #- Thanks Alistair -- Alistair Marshall www.thatscottishengineer.co.uk --~--~-~--~~~---~--~~ You received this message because yo

Re: model inheritance - getting data from child objects

2008-11-06 Thread Alistair Marshall
On Nov 6, 2:22 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > If all worker classes (cook, waiter, ...) are subclassed from Worker, > something like this should work: Worker.objects.filter(workplace=...) > Unfortunately the function that each child will run is a bit more complicated than just l

model inheritance - getting data from child objects

2008-11-06 Thread Alistair Marshall
Using the example in the django writing models documentation [1] I wish to get a list of all the places, then calculate a value that depends on what the type of place it is. Say in my restraunt I have a function get_workforce() which returns a list of all the people that work in the restaraunt. T

Re: Splitting models.py won't install models

2008-11-01 Thread Alistair Marshall
Marshall http://www.thatscottishengineer.co.uk --~--~-~--~~~---~--~~ 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 g

Re: Splitting models.py won't install models

2008-10-29 Thread Alistair Marshall
Ok, perhaps this is a pinax issue? I would not have thought that it would have made a difference but I'll try asking on the pinax list. Thanks for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Splitting models.py won't install models

2008-10-28 Thread Alistair Marshall
On Oct 28, 1:43 pm, patrickk <[EMAIL PROTECTED]> wrote: > you could try changing the import in __init__.py to someting like > this: > from app_name.models.model_file import Model1, Model2, ... > e.g. > from library.models.material import Material, MaterialImage > > ... might work. > Thanks for you

Splitting models.py won't install models

2008-10-28 Thread Alistair Marshall
I have been trying to split my models.py file into several smaller more manageable files. I have created a folder named models, an in there, created a __init__.py file which contains: from other import * from streams import * from units import * I have then split my models into the three files m

Re: Kate syntax highlighting for django html templates.

2006-09-23 Thread Matthew Marshall
I'd be glad to maintain it for kate! I just uploaded a new version. It highlights mismatched block/for/if/etc tags as errors. (Something I tend to do a lot.) I also changed the priority to 9, so that it doesn't compete for the html extention. (Sorry it took me so long to reply... I've been pr

Kate syntax highlighting for django html templates.

2006-08-26 Thread Matthew Marshall
I got sick of kate highlighting my django template vars/tags as errors, so I put this together. It highlights tags, vars, filters, and comments. You can also use Ctrl+[Shift+]D to [un]comment using {% comment %}{% endcomment %}. It's really pretty simple, but I thought it was worth sharing. Ge

Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall
> I'd advise you to drop the symlink and use the PYTHONPATH variable, > but that's just my hunch based on no empirical data. Okay, I just deleted /usr/lib/python2.4/site-packages/django (which was the symlink), and added to the PYTHONPATH environment variable the actual django directory, and if f

Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall
> This is very strangely worded. You installed Ubuntu completely on top > of Debian and then installed Django from SVN again? You're not being > explicit enough. Sorry for being unclear. I had debian sarge installed, and I installed django from svn at that point. Then I wiped my machine entirely,

Re: ImportError: No module named django

2006-06-30 Thread Craig Marshall
> I downloaded the svn version of django a couple of weeks ago, and had > it working fine within Debian. I installed Ubuntu 6.06 today, and my > django install has stopped working. > > I can run python interactively and type "import django" and get no > errors, but when I go into our project direc

Re: ImportError: No module named django

2006-06-28 Thread Craig Marshall
> It sounds like you might have two versions of Python installed. You > should confirm that the shebang line in ./manage.py is for the right > version. Alternatively, running 'python manage.py syncdb' should work. The shebang says "#!/usr/bin/env python", which returns 2.4.3 when asked. (So does

ImportError: No module named django

2006-06-28 Thread Craig Marshall
Hi, I downloaded the svn version of django a couple of weeks ago, and had it working fine within Debian. I installed Ubuntu 6.06 today, and my django install has stopped working. I can run python interactively and type "import django" and get no errors, but when I go into our project directory a

Re: Konqueor 3.5 beta bug with admin screens

2005-09-23 Thread Matthew Marshall
On Saturday 24 September 2005 12:25 am, [EMAIL PROTECTED] wrote: > A warning for other Konqueror users: > > In the just-released KDE 3.5 beta (KDE 3.4.91), the Django admin > screens that have datetime fields and calendars cause KHTML to freeze. > This didn't happen in 3.4.0, and I'm hoping it wil

Re: Money or Currency data type

2005-09-16 Thread Matthew Marshall
On Saturday 17 September 2005 01:00 am, Eric Walstad wrote: > Hi, > > I didn't find any reference to money or currency data types in the > django source, nor in the list archives. My app needs to store US > Dollars. > > What are you all using to store currency data? > > Any tips on how best to wr

Re: problem with ImageField

2005-09-14 Thread Matthew Marshall
On Wednesday 14 September 2005 08:25 am, lawgon wrote: > File > "/usr/local/lib/python2.4/site-packages/django/core/meta/fields.py", > line 320, in get_db_prep_save > value = value.strftime('%Y-%m-%d') > > AttributeError: 'str' object has no attribute 'strftime' > > i realise that this has so

Re: New document: How to write custom template libraries

2005-09-06 Thread Matthew Marshall
Whoa! That's quite a hefty piece of documentation. Thanks! MWM On Tuesday 06 September 2005 03:16 am, Adrian Holovaty wrote: > I just added this new document: > > The Django template language: For Python programmers > http://www.djangoproject.com/documentation/templates_python/ > > Comments,

Re: Help on M2MField

2005-09-01 Thread Matthew Marshall
On Thursday 01 September 2005 06:13 am, Leo wrote: > class People(Model): > first_name = ManyToManyField (Name) > last_name = ManyToManyField (Name) I might be misunderstanding the situation, but why are you using ManyToManyField instead of ForeignKey? (Sorry I don't know the answer to

Re: M2M crossing apps?

2005-08-31 Thread Matthew Marshall
On Thursday 01 September 2005 02:11 am, Adrian Holovaty wrote: > I added that to the model docs a couple of days ago: > http://www.djangoproject.com/documentation/model_api/#models-across-files > > If it's not sufficient, I can definitely improve it. How does it look? Oh, I hadn't seen that. (I

Re: M2M crossing apps?

2005-08-31 Thread Matthew Marshall
On Thursday 01 September 2005 12:50 am, Adrian Holovaty wrote: > Hmmm...Could you make a test case for this? We use many-to-many > relationships to core.Site all the time and don't have problems. How disgusting! While working on a test case, (and tweaking the test framework to accomodate a seco

M2M crossing apps?

2005-08-31 Thread Matthew Marshall
Is anyone using M2M fields that cross apps? I am trying to do so, but am getting strange results. I have two models: categories.Category and items.Item. Item has a M2M link to Category. Everything seems to work fine, except that the 'get_related_list' methods seem to be messed up. From loo

Re: Concurrent applications

2005-08-18 Thread Matthew Marshall
On Wednesday 17 August 2005 12:49 pm, Andy Shaw wrote: > Is there any easy way to have two or more applications run > simultaneously? Having created one fully-working application, which > provides content for part of my site, I now want to construct another > which will provide site-global menus a

Re: Limiting database connections?

2005-08-12 Thread Matthew Marshall
On Friday 12 August 2005 08:14 pm, Jacob Kaplan-Moss wrote: > I just today ran across sqlrelay (http://sqlrelay.sourceforge.net/) > which looks *extremely* promising for this type of use. Does anyone > have any experience with it, and is there any interest in me writing > a sqlrelay backend? > >