Re: PUNTARE CON DJANGO SU BILANCIATORE ORACLE ATTRAVERSO IL TSNAME

2011-10-18 Thread Ian
e 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 you are subscribed to the Googl

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 wrote: > Thanks, Markus! That looks perfect! > > Shawn, I was more curious if this is even possible to do with django

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 wr

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 PayP

Re: Django image upload

2011-10-06 Thread Ian
> image, if I understand it correctly. > > > > > > > > On Thu, Oct 6, 2011 at 6:21 PM, Ian wrote: > > Ah! Got it working! How do I make sure the files are only images?  Is > > there a way to check the extension?  Also, how would I rename the > > file

Re: Django image upload

2011-10-06 Thread Ian
> image, if I understand it correctly. > > > > > > > > On Thu, Oct 6, 2011 at 6:21 PM, Ian wrote: > > Ah! Got it working! How do I make sure the files are only images?  Is > > there a way to check the extension?  Also, how would I rename the > > file

Re: Django image upload

2011-10-06 Thread Ian
then, is that 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 j

Re: Django image upload

2011-10-06 Thread Ian
p://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 to images > >

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 it

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 and clobbers my worki

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 my server. That comman

Re: Platform system with Django?

2011-09-26 Thread Ian
m, jmontoya 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, 6:18 am, Ian wrote: >

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 subdoma

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

2011-08-08 Thread Ian Clelland
r render() method is 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_h

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

2011-08-08 Thread Ian Clelland
>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() > > > >Ian >

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

2011-08-08 Thread Ian Clelland
so that the 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 i

Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
On Wed, Jul 27, 2011 at 9:29 AM, Ian Clelland 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" related to another >

Re: object value distinct for ForeignKey

2011-07-27 Thread Ian Clelland
nct to see why you might want to be writing testDB.objects.order_by().values('country').distinct() ) > > thanks in advance, > > Alfredo > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post

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

2011-07-25 Thread Ian Clelland
th "manage.py loaddata", or by using fixtures in tests. 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, a

Re: 'settings' referenced before assignment

2011-07-20 Thread Ian Clelland
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 -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

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

2011-07-04 Thread Ian Clelland
eived 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 more

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

2011-07-04 Thread Ian Clelland
eived 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 more o

Re: Strip_tags and non english char issue

2011-06-26 Thread Ian Clelland
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 posting those answers here, and someone mig

Re: Inconsistent keyword filtering on FK

2011-06-23 Thread Ian Clelland
ere's any practical 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

Re: Unit-Testing Dilemma

2011-06-21 Thread Ian Clelland
e the tests without touching the > actual view 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 f

Re: Possible bug in form validation

2011-06-20 Thread Ian Clelland
here, 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 -- You received this

Re: Unit-Testing Dilemma

2011-06-20 Thread Ian Clelland
t; 3. Break up your API calling code into more testable units to truly > > isolate your independent code from the API calling code. It'll be much > > easier to catch problems in the API integration code. > > -- > You received this message because you are subscribed to the

Re: storing django object into javascript variable/array

2011-06-15 Thread Ian Clelland
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 questi

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

2011-06-13 Thread Ian Clelland
ieval) 4. If you can get the right data out of the database 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 th

Re: forms messing up css, help?

2011-06-11 Thread Ian Clelland
eponse( '/var/djcode/oneadmin/templates/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 wrote: > I also noticed

Re: storing django object into javascript array

2011-06-10 Thread Ian Clelland
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 a properly

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

2011-06-10 Thread Ian Clelland
, and its accompanying META attribute. Check to see if that's the case, and rename your list() view if it is. -- Regards, Ian Clelland -- 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: 'ValuesListQuerySet' object has no attribute 'META'

2011-06-09 Thread Ian Clelland
tring "META" 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

Re: Trouble with simple aggregation

2011-06-08 Thread Ian Clelland
ticle.objects.values('category').annotate(count=models.Count('id')) ? The 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,

Re: SystemError from django.conf.settings

2011-05-30 Thread Ian Clelland
0.9.7.2), but I don't want to mess > around with the production environment too much, or risk breaking the > live sites. > If the error is in one of the python core modules, then it may have been fixed recently; but I haven't seen any reports of failures in tupleobject.c other th

Re: json serialization question

2011-05-27 Thread Ian Clelland
from django.utils import simplejson as json ... records = models.Residents.objects.extra( where=[], params=[...]) data = json.dumps(records.values('fname','lname','pt')) return HttpResponse(data, mimetype='application/json') records.values

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
ailMessage, set 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 -- Rega

Re: Encrpting urls to hide PKs

2011-05-12 Thread Ian Clelland
omes 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 * By looking at the database IDs, people can gauge how heavily the system is being used, or if they s

Re: Decimal * Float problem

2011-05-11 Thread Ian Clelland
k* into a float; you should use .quantize() instead. -- Regards, Ian Clelland -- 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: 500 message with POST

2011-05-02 Thread Ian Clelland
sts. I believe that Django will issue the redirect 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: $

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 require

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 LD_LIBRARY_PATH is fine at this poin

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 will need to copy your en

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', 'bar', 'xyz')) >     cursor

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/ > /usr/lib> sudo ln /opt/

Re: compressing uploaded file

2011-04-20 Thread Ian Clelland
to them to compress 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&

Re: Debugging a unittest

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

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

2011-04-20 Thread Ian Clelland
.filter(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 Cl

Re: Unidirectional relations

2011-04-20 Thread Ian Clelland
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 the tables and reconstructs the l

Re: Using composition in Django

2011-04-16 Thread Ian Clelland
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 -- You received this

Re: Nested admin command problem

2011-04-07 Thread Ian Clelland
#x27; out of the options dictionary? def handle(self, *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 -- You received this message

Re: Using ifnotequal with a list object not working

2011-04-07 Thread Ian Clelland
ude" %} ... {% endifnotequal %} should work. -- Regards, Ian Clelland -- 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 ema

Re: select_related() changes type of DecimalField?

2011-04-04 Thread Ian
gt; 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 post to thi

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
ither: "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." that South sees

Re: Repetition in urls.py

2011-03-24 Thread Ian Clelland
ate_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 -- You received this message because you are s

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
e couldn'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

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 cx_Oracle 5.1 myself,

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

2011-03-14 Thread Ian Clelland
d, but more reusable way to do it would be to write your 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 -- You received this message because you

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 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. > > It's pretty weird that it

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 "/usr/lib/python2.6/site-packages/flup-1.0.3.

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

2011-02-28 Thread Ian
rectly, 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 the Google Groups "Djang

Re: How to check if string is in Hebrew

2011-02-28 Thread Ian Clelland
nd then test all of the characters 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 -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: User Profiles?

2011-02-15 Thread Ian Clelland
user object is different 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 update

Re: images

2011-02-15 Thread Ian McDowall
configured 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 thi

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

2011-02-11 Thread Ian Clelland
% for obj in my_raw_queryset %} {{ obj.visible_choice }} {% endfor %} -- Regards, Ian Clelland -- 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

Re: FormPreview with file upload problems

2011-02-10 Thread Ian Stokes-Rees
to the 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 "Dj

FormPreview with file upload problems

2011-02-10 Thread Ian Stokes-Rees
g 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 su

upload_to chicken and egg problem

2011-02-10 Thread Ian Stokes-Rees
ss def). 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 t

FormPreview and ModelForms

2011-02-10 Thread Ian Stokes-Rees
if request.FILES.has_key('mtz_fp'): WSMRTaskForm(request.POST, request.FILES).save() return HttpResponseRedirect(reverse('success')) else: return HttpResponseRedirect(reverse('missing_files')) TIA, Ian -- You received this messa

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

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

Re: csrf cookie security

2011-02-10 Thread Ian Clelland
ername/password) 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 o

Re: csrf cookie security

2011-02-09 Thread Ian Clelland
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)

Re: csrf cookie security

2011-02-09 Thread Ian Clelland
or not. (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 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

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 following code demonstrates t

Re: Slow performance with Django when connected to Oracle

2011-02-08 Thread Ian
uest? 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-users@googlegroups.com. To unsubscr

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-08 Thread Ian Stokes-Rees
Otherwise, its a series 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 -- Yo

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. > >

Re: read-only Form.as_* views

2011-02-07 Thread Ian Stokes-Rees
e }} 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:

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
o I don't see why 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 dja

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@goo

Re: Including apps for inherited models in INSTALLED_APPS

2011-02-07 Thread Ian Stokes-Rees
d reason why 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...@googl

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
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 because you are s

Re: working django with existing database

2011-01-31 Thread Ian
idation. 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 email to django

Re: Django and Oracle XE - Empty models file

2011-01-27 Thread Ian
eated 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 describes you

Re: Django form(s) for intermediary models

2011-01-26 Thread Ian Lewis
To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Ian http://www.ia

Re: URLField strange error

2011-01-19 Thread Ian Clelland
ough a ModelForm, or are you saving the model manually? Regards, Ian Clelland -- 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 thi

Re: URLField strange error

2011-01-19 Thread Ian Clelland
URL Validator. Without some more info, this is all speculation anyway, though. Regards, Ian Clelland -- 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: South introspection doesn't get registrered

2011-01-17 Thread Ian Clelland
MyFieldsDontWork > > Does 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

Re: Query Set involving Model Method

2011-01-16 Thread Ian Clelland
se 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 >

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

2011-01-14 Thread Ian Clelland
ice from it should get you 120 bits of pure random goodness. -- Regards, Ian Clelland -- 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,

Re: QuerySetManager breakage with r14389

2011-01-12 Thread Ian Clelland
On Wed, Jan 12, 2011 at 6:23 AM, Russell Keith-Magee wrote: > On Thu, Jan 6, 2011 at 5:29 AM, Ian Clelland wrote: >> Hi, >> >> I've been using Simon Willison's QuerySetManager[1] pattern for a >> while now, and since upgrading to Django 1.2.4, it has been br

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

2011-01-06 Thread Ian
fferent. For example: serial = 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

Re: Ordering columns in from clause

2011-01-06 Thread Ian Clelland
his 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 excluding the or

QuerySetManager breakage with r14389

2011-01-05 Thread Ian Clelland
presuming 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: fro

Re: Building app on already existing set of DB tables

2010-12-22 Thread Ian
ms 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 unsubscribe from this grou

Re: ORA-01425

2010-12-03 Thread Ian
>  > ((1,),) Nuts. What if you remove the first TRANSLATE call, i.e. cursor.execute(r"SELECT 1 FROM DUAL WHERE 'A' LIKE TRANSLATE('A' USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)") If that also doesn't trigger the error, then maybe we

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 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 spent in helping resolve this. > Is there any Cy

<    1   2   3   4   5   6   7   >