Re: PUNTARE CON DJANGO SU BILANCIATORE ORACLE ATTRAVERSO IL TSNAME

2011-10-18 Thread Ian
me viene richiesto dal file setting.py potete aiutarmi If you don't have a TNS name, you can identify the database by hostname, listener port, and SID. See the second example at: https://docs.djangoproject.com/en/1.3/ref/databases/#id11 Cheers, Ian -- You received this message because

Re: PayPal Adaptive Payments

2011-10-09 Thread Ian
So I got the basic merchant functionality working, but I can't figure out the best way to automatically split the payment 3 ways... advice? On Oct 9, 3:02 pm, Ian <icinna...@gmail.com> wrote: > Thanks, Markus! That looks perfect! > > Shawn, I was more curious if this is even

Re: PayPal Adaptive Payments

2011-10-09 Thread Ian
Thanks, Markus! That looks perfect! Shawn, I was more curious if this is even possible to do with django. I was just doing research and wanted to know if there was a better payment system tailored for django (the 'merchant' project looks perfect) thanks guys! On Oct 8, 4:26 pm, Markus Gattol

PayPal Adaptive Payments

2011-10-08 Thread Ian
I've been looking at this: https://www.x.com/docs/DOC-3084 but I'm trying to set it up with Adaptive Payments. Basically, I need a payment to be split between a few users... so if I purchase something from seller A: seller A gets 90% person B gets 5% person C gets 5% This is easy to do with

Re: Django image upload

2011-10-06 Thread Ian
y if it's a valid > image, if I understand it correctly. > > > > > > > > On Thu, Oct 6, 2011 at 6:21 PM, Ian <icinna...@gmail.com> wrote: > > Ah! Got it working! How do I make sure the files are only images?  Is > > there a way to check the extension

Re: Django image upload

2011-10-06 Thread Ian
y if it's a valid > image, if I understand it correctly. > > > > > > > > On Thu, Oct 6, 2011 at 6:21 PM, Ian <icinna...@gmail.com> wrote: > > Ah! Got it working! How do I make sure the files are only images?  Is > > there a way to check the extension

Re: Django image upload

2011-10-06 Thread Ian
at the file gets stored here: > > > /Users/storefiles/pluginfiles/2011/10/06/02/38/somefile.zip > > > So, you must have at least one of those set and the path must be fully > > write enabled for whatever process is running your Django app. For my > > testing, I just mad

Re: Django image upload

2011-10-06 Thread Ian
> http://www.sebastienbillion.com/<http://www.sebastienbillion.com/> > > Le 06/10/2011 05:22, Ian a �crit : > > > > > > > > > Hey Everyone, > > > I'm new to django, but I love it so far! > > > I'm trying to figure out how to upload an image (restrict it

Django image upload

2011-10-05 Thread Ian
Hey Everyone, I'm new to django, but I love it so far! I'm trying to figure out how to upload an image (restrict it to images only) and resave it as a different name. Eventually, I'll want to upload it to S3, but for now, I'm just testing it on my computer with runserver (so I'm not sure where

Re: Randomly clearing database tables

2011-10-05 Thread Ian Kelly
On Tue, Oct 4, 2011 at 2:28 PM, msbuck wrote: > Below is the settings. I am fairly new to python unit testing so my > understanding of things could be better. But right now, if I select > Run As -> Python Unit Test will my project is selected, it runs all of > my Django tests

Re: Randomly clearing database tables

2011-10-04 Thread Ian
On Oct 4, 10:30 am, msbuck wrote: > Good news! Yesterday, I was repeatedly starting the development server > from Eclipse which is on the Run As  -> menu which cascades to Run > Server or Run Python Unit Test. I must have accidently clicked that we > I really wanted to start

Re: Platform system with Django?

2011-09-26 Thread Ian
 am, jmontoya <gugli...@gmail.com> wrote: > You can use pinax is based in django and it has a lots of "website > templates", intranet, blog, social etc > You can easly customized it ... > > http://pinaxproject.com/ > > Regards, > > Julio > > On Sep 26

Platform system with Django?

2011-09-25 Thread Ian
I'm new to django, and at this point all I've done is the tutorial. But my end goal is to create a website that serves as a platform system. I want users to go to my site, create an account, edit some settings/ preferences, and a subdomain (can you do this with django?). Then within each

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Ian Clelland
s going to compute some value, probably a list of Entry instances in this case, and then it will create a new context variable, with the statement; context[self.related_entries] = And that is what is going to create the context variable {{related_entries}}, or {{cheeseburger_hotel}}, or whatever th

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Ian Clelland
be, given the current context. > > > >The example at > https://docs.djangoproject.com/en/1.3/howto/custom-template-tags/#passing->template-variables-to-the-tag > shows how it should be done. Construct a Variable object in > >node.__init__(), and use variable.resolve(context) in node.render()

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Ian Clelland
template framework actually determines what the contents of that variable should be, given the current context. The example at https://docs.djangoproject.com/en/1.3/howto/custom-template-tags/#passing-template-variables-to-the-tag shows how it should be done. Construct a Variable object in node.__init__()

Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
On Wed, Jul 27, 2011 at 9:29 AM, Ian Clelland <clell...@gmail.com> wrote: > > > On Mon, Jul 25, 2011 at 11:29 AM, Alfredo Alessandrini < > alfreal...@gmail.com> wrote: > >> Hi, >> >> I've a model testDB with a foreignkey "country" r

Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
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 more options, visit this group at > http

Re: in my model, how can I tell when I'm saving a new item

2011-07-25 Thread Ian Clelland
. If there is code that absolutely has to run when a new object is created, (or code that needs to run on update, but absolutely cannot run on new objects before insertion), then you may be better off using a post-save signal handler, and checking the "created" argument that gets passed

Re: 'settings' referenced before assignment

2011-07-20 Thread Ian Clelland
overwrite it), or remove the assignment to the 'settings' variable (if you don't), or change the name of the variable you assign to (if it was an accident). -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Djang

Re: Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Ian Clelland
> http://groups.google.com/group/django-users?hl=en. > > Are you loading the template tag library in the template that extends the base? -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "D

Re: Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Ian Clelland
ge 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 more options, visit this group at &g

Re: Strip_tags and non english char issue

2011-06-26 Thread Ian Clelland
in the html header that specifies unicode. If those aren't there, then your browser will have to guess the document encoding, and might be guessing wrong. Hopefully that should get you enough visibility on the problem to see what is happening. If none of that provides any clarity, then try

Re: Inconsistent keyword filtering on FK

2011-06-23 Thread Ian Clelland
ical difference in performance -- I would hope that any decent SQL query optimizer should be able to change select payee.* from payee join person on (payee.person_id = person.id) where person.id = 26 into select payee.* from payee where person_id = 26 -- Regards, Ian Clelland <clell...@gmail.c

Re: Unit-Testing Dilemma

2011-06-21 Thread Ian Clelland
logic, so testing what the API receives makes the most > sense to me. > If this is all for a refactoring, then you're probably on the right track there -- instrument the existing object for testing, rather than restructuring the view first. Get the code into a state where you can trust it, and the

Re: Possible bug in form validation

2011-06-20 Thread Ian Clelland
lsewhere, but it is not used internally by the form machinery. > > However, this is looking like a legitimate bug to me. > > http://dpaste.com/hold/556603/ > > I've updated with a working example, as http://dpaste.com/hold/556805/ -- Regards, Ian Clelland <clell...@gmai

Re: Unit-Testing Dilemma

2011-06-20 Thread Ian Clelland
ou 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 more options, visit this group at > h

Re: storing django object into javascript variable/array

2011-06-15 Thread Ian Clelland
y that you know JavaScript, so what you're going to have to do is come up with a sample of what you'd *like* to see as the template output, and hopefully we can help you with the Django template code to produce that output. [Also, it really doesn't help to be posting and reposting the same question, just hou

Re: Could not decode to UTF-8 column 'cpostal'

2011-06-13 Thread Ian Clelland
base in the python shell, then can you save it from there as well? If everything above works, then try doing this: > object_from_database.save() and see if you get the same error. If so, posting a traceback from that might help pinpoint the problem. -- Regards, Ian Clelland <clell...@gmail.com&g

Re: forms messing up css, help?

2011-06-11 Thread Ian Clelland
plates/oneadmissions/contact.html', {'form': form}, context_instance=RequestContext(request) ) That should give you a functioning template. Ian On Fri, Jun 10, 2011 at 9:27 PM, raj <nano.ri...@gmail.com> wrote: > I also noticed one more thing, in general, all htm

Re: storing django object into javascript array

2011-06-10 Thread Ian Clelland
do something like this: from django.utils.simplejson import dumps ... school_list = dumps([school.name for school in city.school_set.all()]) and then add school_list to the context variables that are passed to the template. Then in the template, you can just use {{ school_list }}, and it will be

Re: 'ValuesListQuerySet' object has no attribute 'META'

2011-06-10 Thread Ian Clelland
ying META attribute. Check to see if that's the case, and rename your list() view if it is. -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 'ValuesListQuerySet' object has no attribute 'META'

2011-06-09 Thread Ian Clelland
; doesn't even occur in the db package, so I can't imagine how simply wrapping a QuerySet in a list() call could trigger an exception like that. Can you post the rest of the code around this, or at least more of a traceback, unless that is really all that there is? And if it is, then I'd really lik

Re: Trouble with simple aggregation

2011-06-08 Thread Ian Clelland
idea being that you group the objects by category, and then count the number of distinct ids within each category. The docs mention that the default ordering can get in the way of this sometimes, so you probably want to clear it first, like this: Article.objects.values('category').annotate(

Re: SystemError from django.conf.settings

2011-05-30 Thread Ian Clelland
turned up. See if there are any other compiled modules in the system that you can update first. -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: json serialization question

2011-05-27 Thread Ian Clelland
... records = models.Residents.objects.extra( where=[], params=[...]) data = json.dumps(records.values('fname','lname','pt')) return HttpResponse(data, mimetype='application/json') records.values(...) should return just the dictionary that you want to use. json.dumps(...) will

Selecting distinct months from a QuerySet

2011-05-18 Thread Ian Turner
Hi, I would like to get a distinct list of months from a datetime field on an already defined QuerySet. SQL that I would use manually to get distinct from all records on the model. SELECT DISTINCT MONTH(`some_datetime_field`) as `month` FROM `some_model` ORDER BY `month` I don't need the year

Re: Email app is breaking long lines, any fix?

2011-05-17 Thread Ian Clelland
the headers yourself, and call send() on it. (Also, 'text/us-ascii' is not a registered MIME type; you probably want to say something like 'text/plain; charset=us-ascii') [1] http://docs.djangoproject.com/en/1.3/topics/email/#the-emailmessage-class -- Regards, Ian Clelland <clell...@gmail.com>

Re: Encrpting urls to hide PKs

2011-05-12 Thread Ian Clelland
ser comes back to the confirmation view. If your tokens are actually random, and large enough (say, 64 bits), then anybody trying to guess them will be wasting their time. -- Regards, Ian Clelland <clell...@gmail.com> * By looking at the database IDs, people can gauge how heavily the system is

Re: Decimal * Float problem

2011-05-11 Thread Ian Clelland
value *back* into a float; you should use .quantize() instead. -- Regards, Ian Clelland <clell...@gmail.com> -- 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. T

Re: 500 message with POST

2011-05-02 Thread Ian Clelland
direct anyway, buy the user agent is *not* supposed to just blindly post the data to the new URL without some sort of user interaction. To eliminate this as a possible error source, try putting the trailing "/" on the URL in the command line: $ wget --post-data 'data=Something' http://localhos

Accessing ImageField temporary file to dynamically change upload_to storage path

2011-04-26 Thread Ian Turner
I'm in need of direction to access the temporary file that is stored in memory or on disk from an ImageField/FileField so that I can read it before it gets moved to its final location. The topics I've found all deal with only modifying the storage path based on other fields in a model. My

Re: cx_Oracle error: ImproperlyConfigured

2011-04-24 Thread Ian
On Apr 23, 12:29 pm, kamal sharma wrote: > No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in app.wsgi > as mentioned below and when I print the os.environ in the beginning of > views.py then it shows that newly added value. It's clear that your

Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread Ian
On Apr 21, 11:40 pm, kamal sharma wrote: > When i try the same code from python Shell then it is working fine. Okay, so it does sound to me like it's your web server blocking access to the entire ORACLE_HOME directory. Is it running under a chroot jail? If so, then you

Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread Ian
On Apr 21, 11:03 am, kamal sharma wrote: > Error while trying to retrieve text for error ORA-01804 > > Here is my code to fetch the data from database. > > def cases(request, dbname, prnum=None, message=''): > >     connection = cx_Oracle.Connection("%s/%s@%s" % ('foo',

Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread Ian
On Apr 21, 9:39 am, kamal sharma wrote: > Here is the error I am getting now: > > cd /usr/local/lib > > /usr/local/lib> sudo ln > /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1 > ln: ./libclntsh.so.10.1 is on a different file system > > /usr/local/lib> cd /usr/lib/

Re: compressing uploaded file

2011-04-20 Thread Ian Clelland
ess it. > > When I try to do this: > > file.write(zlib.compress(file.read())) Don't do that -- I'm pretty sure that writing a file that you already have open for reading will produce undefined results. (Also, I'd try to stay away from using 'file' as a variable name -- it just hides t

Re: Debugging a unittest

2011-04-20 Thread Ian Clelland
g And only the one test that you specify will actually be run. -- Regards, Ian Clelland <clell...@gmail.com> -- 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

Re: how to call user-defined database functions through the Django query syntax?

2011-04-20 Thread Ian Clelland
(title__icontains="test").extra(where='oe_matches(structure.smiles, "[C;!H0]")') You could encapsulate the extra() call in a function call that annotates a QuerySet that you pass to it, but it's 'outside' of the ORM at that point. -- Regards, Ian Clelland <clell...@

Re: Unidirectional relations

2011-04-20 Thread Ian Clelland
) would give a child a reference to their parent, without the parent having a child_set attribute. I think Mike has the right idea; using a separate 1:many table to avoid explicit fields on the child model, but, of course, SQL being what it is, it is still possible to construct a query that joins

Re: Using composition in Django

2011-04-16 Thread Ian Clelland
ll generate SQL like this: CREATE TABLE "employee_employee" ( "id" serial NOT NULL PRIMARY KEY, "person_id" integer NOT NULL, "address_id" integer NOT NULL ) ; which is probably closer to what you're expecting. -- Regards, Ian Clelland <clell...@gm

Re: Nested admin command problem

2011-04-07 Thread Ian Clelland
lf, *args, **options): self.host = options.pop('host') # 'host' isn't in options anymore # do some more stuff call_command('test', *args, **options) -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups

Re: Using ifnotequal with a list object not working

2011-04-07 Thread Ian Clelland
fnotequal thetypes.0 "Nothing dude" %} ... {% endifnotequal %} should work. -- Regards, Ian Clelland <clell...@gmail.com> -- 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: select_related() changes type of DecimalField?

2011-04-04 Thread Ian
ght be overlooking something > obvious...) Yes, this appears to be a bug. If you would, please create a ticket for it in the Django Trac so that we don't forget about it. Thanks, Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Seeking Django Counsel when adding a new model using South and a custom field for my ProtectedFileField subclass

2011-03-27 Thread Ian Clelland
tion_rules call to either: "student_portal\.fields\.ProtectedFileField" -- removing the "^" so that it can match anywhere within the string, or "^classcomm\.student_portal\.fields\.ProtectedFileField" -- preserving the "^", but adding the "classcomm.&quo

Re: Repetition in urls.py

2011-03-24 Thread Ian Clelland
e_by': > 10} Can you not set your info_dict just like that, and then rewrite it like this: YearArchiveView.as_view(**info_dict),name='blog_archive_year'), url(r'(?P\d{4})/(?P[a-z]{3})/$', -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subs

decorators and generic views

2011-03-24 Thread Ian Stokes-Rees
s_view(...) but not having any luck. Advice on how properly map from urls.py to a function in the wrapped view would be appreciated. My current best attempt is below Cheers, Ian urls.py BEFORE: from gridportal.wsmr.models import WSMRTask from gridportal.wsmr.views

Configuring common site URL paths for use in templates

2011-03-23 Thread Ian Stokes-Rees
ldn't find that page. Maybe it has moved -- why not look in the Site Directory? If it seems like an error, please contact us. {% endblock %} Can anyone suggest a good way of doing this? TIA, Ian -- You received this message because you are subscribed to the Google Groups "Django users

Re: DatabaseError: ORA-03127: no new operations allowed until the active operation ends

2011-03-22 Thread Ian
On Mar 22, 5:38 am, Paolo Corti wrote: > I have solved this by downgrading the cx_Oracle library from 5.1 to > 5.0.1 > I am using Oracle 11.2 > Now works well both on Django 1.2.5 and 1.3 RC with Python 2.6 > best regards > P Thanks for letting us know. I haven't yet tried

Re: How make CSRF middleware emit html4 rather than xhtml1.0 (closing tags issue) so will validate?

2011-03-14 Thread Ian Clelland
our own template tag (it's really simple, you can use the CSRF-token code in django/template/defaulttags.py as a starting point) which would render whatever markup you need. -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Group

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-03-01 Thread Ian
On Mar 1, 10:26 am, Ian <ian.g.ke...@gmail.com> wrote: > It appears that the error is actually from the previous (working) > request when Django subsequently tries to close the database > connections and fails, and since the error goes uncaught, it kills the > server. >

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-03-01 Thread Ian
On Mar 1, 4:23 am, lipt0n wrote: > Django 1.2.3 > python 2.6 > cx_oracle 5.0.4 > oracle 10 XE > > $ cat /var/log/nginx/localhost.error_log > 2011/02/28 16:52:39 [error] 11159#0: *47 FastCGI sent in stderr: > "Traceback (most recent call last): >   File

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-02-28 Thread Ian
viroment vars are set correctly, what can I do to fix this? Could you post the full traceback? That may be helpful in figuring out what is happening. Also, what versions of Django, Oracle, and cx_Oracle are you using? Thanks, Ian -- You received this message because you are subscribed to

Re: How to check if string is in Hebrew

2011-02-28 Thread Ian Clelland
ers in the string, either with if any(map(char_is_hebrew, lang_string)): or if all(map(char_is_hebrew, lang_string)): -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: User Profiles?

2011-02-15 Thread Ian Clelland
erent from saving the profile object. (user.save() just updates a row in the auth_user table, which doesn't affect the accounts_userprofile table at all.) The way I would do it is this: profile = user.get_profile() profile.age = 34 profile.save() Try that, and see if it updates the database. -- Regar

Re: images

2011-02-15 Thread Ian McDowall
figured template path. Static files are served by your web server according to its configuration. If you are using the development web server then you need to configure Django as Praveen suggests to set the media path. if you are serving any other static content then you have already done this. As

Re: TemplateSyntaxError at /polls/updatepath/ Caught AttributeError while rendering: 'RawQuerySet' object has no attribute 'all'

2011-02-11 Thread Ian Clelland
like this: {% for obj in my_raw_queryset %} {{ obj.visible_choice }} {% endfor %} -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: FormPreview with file upload problems

2011-02-10 Thread Ian Stokes-Rees
he form object before saving it. If there are other alternatives, I'd love to know what they are. 1. and 3. seem like the best plans. I feel like I should move forward with 1. Comments welcome. Ian -- You received this message because you are subscribed to the Google Groups "Django users

FormPreview with file upload problems

2011-02-10 Thread Ian Stokes-Rees
the uploaded form, with the "preview" step returning an error stating: - This field is required. Even when the file has been supplied. Can someone advise how I can modify/manage FormPreview to handle uploaded files? Thanks, Ian -- You received this message because you are

upload_to chicken and egg problem

2011-02-10 Thread Ian Stokes-Rees
Any good suggestions about how I can do this *other* than the obvious option of creating a separate module of functions that support the specific class? That is *so* not OO, but I'll do it if it is the only option. Ian -- You received this message because you are subscribed to the Goog

FormPreview and ModelForms

2011-02-10 Thread Ian Stokes-Rees
'): WSMRTaskForm(request.POST, request.FILES).save() return HttpResponseRedirect(reverse('success')) else: return HttpResponseRedirect(reverse('missing_files')) TIA, Ian -- You received this message because you are subscribed to the Google Groups "Django

Re: TemplateSyntaxError at /polls/updatepath/ Caught AttributeError while rendering: 'RawQuerySet' object has no attribute 'all'

2011-02-10 Thread Ian Clelland
ups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: csrf cookie security

2011-02-10 Thread Ian Clelland
) are never sent in the clear, that your session cookie is never sent in the clear, and that essentially your whole site is protected by SSL, such that a request coming in over plain HTTP, even if properly authenticated, is still rejected. Once you have this in place, the secure flag on the CSRF coo

Re: csrf cookie security

2011-02-09 Thread Ian Clelland
er plain HTTP -- but the site is already HTTPS-only, so there shouldn't be any form-handling code listening on that port. Does this threat model correspond to what you're thinking? If so, I don't see away around the CSRF protection (at least, not one that involves the victim's browser) -- Regards,

Re: csrf cookie security

2011-02-09 Thread Ian Clelland
(SSL wouldn't even help; he could construct an https:// link just as easily.) That's not how it's supposed to be set up, though. -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Slow performance with Django when connected to Oracle

2011-02-08 Thread Ian
On Feb 8, 3:15 pm, dw314159 wrote: > I am observing the same behavior in the Django shell. Here the actual > query runtime is about the same between Oracle and PostgreSQL back- > ends, but the total turnaround time is about 18 times longer with > Oracle. I believe the

Re: Slow performance with Django when connected to Oracle

2011-02-08 Thread Ian
he code during a request? It would be helpful to have at least a general idea of where it's spending so much time. Cheers, 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-user

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-08 Thread Ian Stokes-Rees
of $MAGIC working out what apps/DB tables are > required, and $MAGIC is never good - might as well be using rails. feels fairly arbitrary -- the whole point of a web framework like Django is that "magic happens", and stuff "just works". Ian -- You received this me

Re: read-only Form.as_* views

2011-02-07 Thread Ian Stokes-Rees
On 2/7/11 5:29 PM, Ian Stokes-Rees wrote: > This sounds good. Form Preview could be useful, but right now I just > want to be able to use Generic Views (DetailView.as_view()) to render > the default context object using "as_table()", but I'm failing to do that. > > {{ o

Re: read-only Form.as_* views

2011-02-07 Thread Ian Stokes-Rees
etc. works just fine. I don't understand why object.as_table wouldn't work. Below are some code fragments. Cheers, Ian urls.py: (r'task/(?P\d+)/?$' , DetailView.as_view(model=WSMRTask)), to templates/wsmr/wsmrtask_detail.html: {{ objec

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
hy it can't also be smart enough to then figure out that "BaseModel" needs to be included for ORM automatically. 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.co

read-only Form.as_* views

2011-02-07 Thread Ian Stokes-Rees
fields displayed just as table entries or textareas which can't be edited. In other words, no or tags. TIA. Ian Stokes-Rees -- 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@googlegr

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
hy it can't be 1. Thanks, 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 from this group, send email to django-users+unsubscr...@googlegroups.co

Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
django.db.models.Model and consequently create the necessary tables for MyBaseModel. Or have I just misunderstood why it was necessary for me to include "base" in order to get the tables created properly by "manage.py syncdb"? TIA, Ian Stokes-Rees -- You received this mess

Re: working django with existing database

2011-01-31 Thread Ian
g the models is going to be too laborious, then you should probably look at a different ORM. I don't know whether SQLAlchemy will do a better job introspecting your database, but it's worth a shot and can be used in conjunction with TurboGears or Pylons. Cheers, Ian -- You received this message becau

Re: working django with existing database

2011-01-31 Thread Ian
the DecimalField validation. I'll make a note of this. At the very least, there should be a more descriptive error message for when this comes up. Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Django and Oracle XE - Empty models file

2011-01-27 Thread Ian
abase the models table is created correctly. > > Does anyone have any suggestions on resolving this problem? Hi Nathanael, inspectdb on Oracle will only find tables in the Django user's schema. It doesn't inspect views or synonyms or tables in other schemas. I would guess that one of these

Re: Django form(s) for intermediary models

2011-01-26 Thread Ian Lewis
> 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. > > -- Ian http://www.ianlewis.org/ -- You received this message because you are subs

Re: URLField strange error

2011-01-19 Thread Ian Clelland
d through a ModelForm, or are you saving the model manually? Regards, Ian Clelland <clell...@gmail.com> -- 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 un

Re: URLField strange error

2011-01-19 Thread Ian Clelland
ght in the URL Validator. Without some more info, this is all speculation anyway, though. Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: South introspection doesn't get registrered

2011-01-17 Thread Ian Clelland
es anybody know why? Try changing the last line of your introspection rule, from > ["^core/.models/.lib.thumbs.ImageWithThumbsField",]) to something like ["^lib.thumbs.ImageWithThumbsField",]) It looks like South is not recognizing your field type, as it is using a different package name th

Re: Query Set involving Model Method

2011-01-16 Thread Ian Clelland
ubscribed 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 more options, visit this group at > http:/

Re: Generate a unique username for django.contrib.auth

2011-01-14 Thread Ian Clelland
aking any 30-character slice from it should get you 120 bits of pure random goodness. -- Regards, Ian Clelland <clell...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: QuerySetManager breakage with r14389

2011-01-12 Thread Ian Clelland
On Wed, Jan 12, 2011 at 6:23 AM, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Thu, Jan 6, 2011 at 5:29 AM, Ian Clelland <clell...@gmail.com> wrote: >> Hi, >> >> I've been using Simon Willison's QuerySetManager[1] pattern for a >> while now, and

Re: Retrieving data from Oracle DB table with column name containing special character

2011-01-06 Thread Ian
= models.DecimalField(null=True, max_digits=10, decimal_places=2, blank=True, db_column='serial#') Cheers, 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-us...@googlegroups

Re: Ordering columns in from clause

2011-01-06 Thread Ian Clelland
antage that comes from this kind of query. It is not valid SQL to order by a column that is not in the result set. MySQL allows you to do that, but that is a MySQL-specific feature. PostgreSQL, certainly, does not allow this, and there is no real advantage gained (aside from a slightly smaller response) by e

QuerySetManager breakage with r14389

2011-01-05 Thread Ian Clelland
that the change to Django's related.py is correct, and that the QuerySetManager code just needs to be updated to properly support Multi-db, but I don't know where to start fixing it. Thanks, Ian The simplest test case I can get to reproduce this problem looks like this: from django.db import models

Re: Building app on already existing set of DB tables

2010-12-22 Thread Ian
tdb will not work for synonyms or views in Oracle, so you will need to write the models by hand. Cheers, 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-us...@googlegroups.com. To

Re: ORA-01425

2010-12-03 Thread Ian
Please try this also: cursor.execute(r"SELECT 1 FROM DUAL WHERE DUMMY LIKE TRANSLATE('X' USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)") Thanks, Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-02 Thread Ian Kelly
On Thu, Dec 2, 2010 at 5:52 PM, Anurag Chourasia <anurag.choura...@gmail.com> wrote: > Hi Ian, > Can't tell you how much this helps :-) > Setting the variable using ctypes before the import of cx_Oracle does the > trick for me. > Appreciate the time you spe

<    1   2   3   4   5   6   7   >