Re: manage.py not able to run any commands

2019-12-18 Thread Ian Githungo
First you have to check if you have activated your Visual environment which you have installed Django On Tue, Dec 17, 2019, 2:36 PM Phil Yang wrote: > Hi, > All of a sudden, when I tried to run manage.py runserver, it didn't > produce any output, and it didn't do anything. In fact, the manage.py

Re: manage.py can't run any commands

2019-12-18 Thread Ian Githungo
have you checked the virtual environment which you have installed the version of Django you are currently using? On Tue, Dec 17, 2019 at 2:36 PM Phil Yang wrote: > Hi, > The manage.py script for all my projects has suddenly stopped working. It > can't run any commands, such as runserver or star

Deleting a record exactly once

2019-08-01 Thread Ian Hoffman
ty. Wondering if anyone has suggestions around how to handle race conditions like this one. This can't be an uncommon problem, can it? Any feedback is very much appreciated! Thanks, Ian -- You received this message because you are subscribed to the Google Groups "Django users"

AttributeError: 'Settings' object has no attribute 'SATIC_ROOT'

2017-09-21 Thread Ian Likono
Iam following up a tuitorial on Django https://www.youtube.com/watch?v=9Wbfk16jEOk&t=192s. I have followed everything up as he has instructed but after running server i get the error: (tryTen) root@likono:~/Desktop/tryTen/tryten# python manage.py runserver Performing system checks... Unhandled

Re: Running django on demand via my PyQt4 Standalone app

2016-10-26 Thread Dam ian
yeah you are right with the WoW effect :) and i know this framework but its to complex for me :P i prefere to use PyQt4, for example you have something like QT Designer where you can graphically deploy and customize the whole UI and then convert to pure python, what make me my work easier. If ki

Re: Running django on demand via my PyQt4 Standalone app

2016-10-25 Thread Dam ian
Hi again, and thanks for the answer and Tips @Mario R. Osorio >I cannot understand is why would you need django for admin, but use some other standalone (desktop?) application for everything else. You should try and stay either on the django or on the standalone application. i think i must

Running django on demand via my PyQt4 Standalone app

2016-10-24 Thread Dam ian
Hi, I work on some Smart Home UI / Controlling system using PyQt4, now I'm in the point where i need a Web Server to share a "Admin Page" to let the user change some Smart Home settings (via web page of course :p ). I searched the internet for a answer / idea and I think that the django server

Subscribe / unsubscribe to data streams over websocket channel

2016-09-30 Thread Ian Danforth
m consumer, but any examples / insights into this pattern would be greatly appreciated. Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to d

Re: Tutorial missing import: Http404

2015-04-10 Thread John Matthew Ian Davis
On Friday, April 10, 2015 at 3:33:36 PM UTC-7, Ramiro Morales wrote: > > On Fri, Apr 10, 2015 at 6:31 PM, John Matthew Ian Davis < > johnmatth...@gmail.com > wrote: > >> obviously one needs to change: >> >> from django.http import HttpResponse, >> >&g

Tutorial missing import: Http404

2015-04-10 Thread John Matthew Ian Davis
obviously one needs to change: from django.http import HttpResponse, to from django.http import HttpResponse, Http404 but that's a speed-bump that should not be in the tutorial. NameError at /polls/34/ global name 'Http404' is not defined Request Method: GET Request URL: http://localhost

Stopping request when exception occurs (admin interface)

2014-11-26 Thread ian . k
Hi there, Hopefully an easy question. I've overridden save_model() in my admin page, and I'm wrapping my obj.save() call in a try/catch so that I can catch a RecordModifiedError. def save_model(self, request, obj, form, change): from concurrency.exceptions import Reco

Has anyone successfully used django-concurrency?

2014-11-21 Thread ian . k
dname return obj._concurrencymeta._field.attname AttributeError: 'Configuration' object has no attribute '_concurrencymeta' [21/Nov/2014 20:29:51] "GET /test/common/configuration/ HTTP/1.1" 500 368613 I also changed {{ obj.pk }} to {{ obj|identity }} in delete_se

django-locking

2014-11-21 Thread ian . k
Hi everyone, I'm posting new message because I have a different question. Has anyone had any luck using django-locking (https://github.com/RobCombs/django-locking) with a modern version of Django's admin interface? I've got it mostly working with my project. Basically Django is set up to add

Re: Trying to use django-locking (I know it's old)

2014-11-20 Thread ian . k
ation item in my project. Do you know what could be causing this? The other parts of the added code seem to be located just fine. Thanks! Ian On Thursday, November 20, 2014 11:02:29 AM UTC-7, ia...@me.com wrote: > > Hi there, > > I'd like to try and add django-locking ( > ht

Trying to use django-locking (I know it's old)

2014-11-20 Thread ian . k
lf._wrapped, name) AttributeError: 'Settings' object has no attribute 'ADMIN_URL' Please help if you can. Thanks! - Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Problems connecting to an oracle legacy db

2014-06-04 Thread Ian
On Wednesday, June 4, 2014 2:38:34 AM UTC-6, Vittorio wrote: > > #models.py > ... > class magazzino_vista_lista(models.Model): > id_ordine = models.IntegerField(null=False, blank=False, > db_column='ID_ORDINE') > cod_magazzino_galileo = models.CharField(max_length=48, > db_col

Re: can't compare datetime.datetime to datetime.date

2014-01-27 Thread ian
You're comparing pub_date, which is a datetime.date, to timezone.now(), which is a datetime.datetime. Check the docs at http://docs.python.org/2/library/datetime.html for more. In order to convert timezone.now() to a date, just call timezone.now().date(), like: In [1]: from django.utils import

Storages API modified_time() and timezones.

2013-10-18 Thread Ian Lewis
C or some other timezone and need to be converted. -- Ian http://www.ianlewis.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubsc

PyCon APAC CFP

2013-07-03 Thread Ian Lewis
.com/event/2704/ Thanks! If anyone has questions I'll do my best to answer them. Hope to see you in Tokyo! -- Ian http://www.ianlewis.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: internal server error not sending message notification

2013-05-04 Thread Ian Lewis
_false'], 'class': 'django.utils.log.AdminEmailHandler' } }, 'loggers': { 'django.request': { 'handlers': ['mail_admins'], 'level': 'ERROR', 'p

Re: FW:

2013-05-04 Thread Ian Foote
Sorry for this everyone. My password wasn't strong enough. I've updated it now. Ian On 04/05/13 03:36, Kurtis Mullins wrote: Phishing Web Site (SPAM) On Sat, Apr 6, 2013 at 9:10 PM, Ian Foote mailto:i...@feete.org>> wrote: Snip -- You received this message

FW:

2013-05-03 Thread Ian Foote
http://kyokushin-aoki.sakura.ne.jp/www/tvojdi.php -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this grou

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Saturday, April 13, 2013 10:40:10 AM UTC-6, Ian wrote: > > On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: >> >> Thank you for the reply, >> >> The field is defined in the Django model as: >> location_description = models.TextField

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: > > Thank you for the reply, > > The field is defined in the Django model as: > location_description = models.TextField(_('additional route information'), > blank=True) > > Data length for the corresponding column in the database

Re: Setting Django to not quote table names

2013-03-06 Thread Ian Kelly
On Wed, Mar 6, 2013 at 1:38 AM, Ian wrote: > In the meanwhile, the commonly used workaround for this is to include the > schema in the db_table declaration like so: The other workaround which is mentioned in the ticket I linked but which I completely neglected to include in my reply, and w

Re: Setting Django to not quote table names

2013-03-06 Thread Ian
On Tuesday, March 5, 2013 2:14:04 PM UTC-7, Steven Githens wrote: > > Hello Django Users, > > I have an app that uses Oracle and cx_Oracle for the db, and I've made the > models from an existing schema with inspectdb. > > The database schema also contains a number of sub-schemas, so they must be

Re: blank and null with Oracle

2013-02-28 Thread Ian
On Wednesday, February 27, 2013 3:31:20 PM UTC-7, Skylar Saveland wrote: > > Some odd behavior with Oracle involving blank and null. > > blank is True on this field: > my_auto = models.AutoField(blank=False, null=False, primary_key=True) > > null is True on this field: > uncles = models.ManyToManyF

Re: charField null=false not enforced for table creation in oracle

2013-02-23 Thread Ian
On Friday, February 22, 2013 11:27:59 PM UTC-7, Skylar Saveland wrote: > > This is still a good question :) > The answer is that there is no way to instruct Django that you really, truly want this CharField to be NOT NULL even on Oracle, and that is unlikely to change. Part of the philosophy in

Re: Pluggable Q&A Django App

2013-01-10 Thread ian
Hi Natasha, I'm looking for the same thing you are, that's how I found your post! Did you find anything that can be plugged or wrote your own? On Tuesday, August 7, 2012 1:53:03 PM UTC-4, natash...@utoronto.ca wrote: > > Hi All, > > I'm looking to implement a Stack Overflow style Q&A feed on my

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Ian Kelly
On Wed, Jan 9, 2013 at 11:40 PM, Jani Tiainen wrote: > If we just force using force_unicode everything works except in older > versions of cx_Oracle (our server had 5.0.4 or something) connection strings > can't be unicode for some reason. Sure, that's why the check exists in the first place. Pr

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Ian Kelly
On Wed, Jan 9, 2013 at 3:55 AM, Jani Tiainen wrote: > Server is running Oracle Database 10g Release 10.2.0.5.0 - 64bit Production. > (EE edition) > > and charset info: > NLS_CHARACTERSETWE8ISO8859P1 > NLS_NCHAR_CHARACTERSET AL16UTF16 Sorry, I meant your web server setup. -- You receive

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Ian
On Wednesday, January 9, 2013 12:38:28 AM UTC-7, Jani Tiainen wrote: > > Tested against latest master. Same behaviour. > > In Oracle backend base.py is following piece of code: > > # Check whether cx_Oracle was compiled with the WITH_UNICODE option. > This will > # also be True in Python 3.0.

Re: Stuck

2012-12-26 Thread Ian Foote
Others have commented on your indentation. You also have a typo: votes = models.IntergerField() should be: votes = models.IntegerField() Regards, Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Authenticate User with Django 1.5

2012-12-15 Thread Ian Foote
Django 1.5 ? Have you tried changing USERNAME_FIELD to 'email'? 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

Re: IntegerField and SmallIntegerFields maps to the same db type on Oracle.

2012-12-13 Thread Ian
On Thursday, December 13, 2012 4:29:30 AM UTC-7, Michał Nowotka wrote: > > Does anyone knows the reason why IntegerField and SmallIntegerFields both > map to NUMBER(11,0) in Orcale? > I would expect SmallIntegerFiled map to something smaller ;) > Beats me. Although note that Oracle itself equate

Re: Django 1.6.0 over python 3: mysql?

2012-12-06 Thread Ian Clelland
port [2] [1] https://github.com/petehunt/PyMySQL [2] http://mysql-python.blogspot.ca/2012/09/a-brief-history-of-mysqldb.html -- Regards, Ian Clelland -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: reading raw binary data from clob columns using oracle backend

2012-11-08 Thread Ian
On Wednesday, November 7, 2012 6:16:23 AM UTC-7, Michał Nowotka wrote: > > Hello, > I'm working with oracle legacy DB and need to read and write binary data > (png images, and and MDL *Molfiles*). > Django's inspectdb command generated text fields for these columns, saying > that's only a guess.

django registration custom backend

2012-10-27 Thread Ian Foote
s because I'm not calling authenticate before login, but authenticate (https://docs.djangoproject.com/en/1.4/topics/auth/#django.contrib.auth.authenticate) requires a password, which I don't want to set at this stage. I want the user to be logged in when they are redirected to the set_p

Email new users account details

2012-10-09 Thread Ian Foote
(email address) and email the user a random password which they change when they first log in. Is this a sensible approach, and how can I do this? Thanks, Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Disabling CSRF is not working.

2012-10-05 Thread Ian Clelland
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. > > --

Re: Django on legacy Postgres database with encoding WIN1252

2012-10-04 Thread Ian Clelland
de it. Is there any other info you can provide about the error message? It may end up that you just have to clean the data in the database to be able to use it. Ian On Thu, Oct 4, 2012 at 9:57 AM, Janeskil1525 wrote: > Hi all > > I'm new Django user. I have a legacy system based on

Re: Can't Find libclntsh.so.11.1 With Oracle Backend

2012-09-10 Thread Ian
rocess's environment variables when Apache is started. Or as a third option, use ldconfig to make the Oracle library path globally visible. Cheers, Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the w

Re: Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-31 Thread Ian Kelly
On Fri, Aug 31, 2012 at 10:03 PM, Jon Blake wrote: > Querying column timestamp of view user_objects for tables, sequences and > triggers appears to confirm my understanding of what base.py does. I'll drop > and recreate my user account, and try again. I'll advise how this goes. Does > the Django d

Re: Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-31 Thread Ian
On Friday, August 31, 2012 12:10:54 AM UTC-6, Amyth wrote: > > Hey Jon, > > I guess this is because of a bug in django. Django already has a open > ticket for this bug. Check it out > here > . > > As described in that ticket, the reason for the proble

Catch or raise exception designissue

2012-07-31 Thread Ian Clelland
should never deliberately be creating 500 errors. The only responsible thing to do when a 500 is seen in the logs is to track down the source of it and fix the bug. -- Regards, Ian Clelland > -- Regards, Ian Clelland -- You received this message because you are subscribed to the

Re: Ignore apostrophes using django-postgresql

2012-07-20 Thread Ian Clelland
The queryset's extra() method can help you with that: MyModel.objects.extra(where=["replace(db_column_name, '''', '') = %s"], params=["rockn burger"]) (Be careful if you're typing that in manually -- there are lots of single-quo

Re: Oracle error when filtering on one2many related TextField (nclob)

2012-07-13 Thread Ian
the code patch in that ticket and see if it clears up the error. Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/f0pTxq1QBwkJ. To post to

Re: model translationissue

2012-07-12 Thread Ian Clelland
tally, I'm sure): once as the first argument, and again as a named parameter. If the argument "_('name')" is supposed to be the field label, then you should pass it explicitly as that keyword art, like this: name = forms.CharField(label=_('name'), max_length=1

Re: Catching Oracle Errors

2012-07-11 Thread Ian
On Tuesday, July 10, 2012 7:45:58 AM UTC-6, Dan Gentry wrote: > > My Django app runs on an Oracle database. > > A few times a year, the database is unavailable because of a scheduled > process or unplanned downtime. However, I can't see how to catch the error > and give a useful message back to t

Re: 'CSRF verification failed." from django.contrib.comments. can you help solve it? django 1.3

2012-06-28 Thread Ian Clelland
t; No, if you have the CSRFViewMiddleware installed, then you don't need this line at all. -- 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@googlegro

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-21 Thread Ian
On Thursday, June 21, 2012 4:37:35 AM UTC-6, Melvyn Sopacua wrote: > > Which is /exactly/ why I mention it. If the default value is inserted > instead of an empty string, you can pre-insert the default value and > have it linked to an invalid entry. Any attempts to insert the default > value on

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-21 Thread Ian
On Wednesday, June 20, 2012 1:38:45 PM UTC-6, André Pang wrote: > > 1. In Oracle's case, what if you have a model with a primary key that's > a CharField? I suspect that Oracle backend will coerce that to be > null=True, so now you have a primary key field that could have NULL. > Primary keys

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Ian Kelly
workplace, many of the tables that Django deals with are actually updatable views, which are obviously not produced by syncdb. 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-use

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-19 Thread Ian
uppose a CHECK constraint would be required. Cheers, Ian * Of course with any backend there is the option of writing custom DDL and running it instead of or in addition to syncdb. -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-18 Thread Ian
e the empty string as a possible value, and it can be stored like that in any of the other backends; it's just not accepted by the admin site. In this case it's mainly a cross-compatibility issue -- if an app stores the empty string on a blank=False field in Postgres, it should be ab

Re: Getting at Oracle ROWID

2012-06-13 Thread Ian
On Wednesday, June 13, 2012 5:48:07 AM UTC-6, rahajiyev wrote: > > DatabaseError at / > > ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP > BY, etc. > > > Unfortunately Django doesn't show the precise statement that caused the > error. > The query it generates is: S

Re: more than 1 level of belongsTo

2012-06-12 Thread Ian
I thought I'd rewrite this simple app in Django while learning it > at the same time. But Django doesn't really allow me to use such > virtual fields easily. Ian gave me a solution to my problem here: > > http://groups.google.com/group/django-users/browse_thread/thread/

Re: Getting at Oracle ROWID

2012-06-12 Thread Ian
es isn't acceptable, you should be able to write a custom Field class for rowids and add that to your models with primary_key=True. It will probably break syncdb (but I assume this is a pre-existing table anyway if you need to use rowids). https://docs.djangoproject.com/en/dev/howto/c

Re: Getting at Oracle ROWID

2012-06-07 Thread Ian
> a PK with a few restrictions. But it's a LOB, so a cast to string is > normally required to fetch it: SELECT ROWID || '' > Writing this expression a piece of cake for CakePHP and its > virtualFields. Can Django do the same? MyModel.objects.extra(select={'

Re: Oracle schema not working

2012-06-04 Thread Ian
= 'foo' # Django will take foo and change it to "FOO", which is how Oracle interprets foo not: db_table = '"foo"' # Since this is already quoted, I think Django won't change it, and then Oracle won't be able to find the table because it is explicit

Re: What is Django's behavior when a request is interrupted?

2012-05-29 Thread Ian Clelland
server fails because the other end of the connection is closed. In django 1.4, http response is lazy, as well, so even writing directly to it will probably not raise an exception until the view has returned, anyway. Ian > Cheers, > > John > > -- > You received this message bec

django-ical - iCalendar generation

2012-05-06 Thread Ian Lewis
-ical Code: https://bitbucket.org/IanLewis/django-ical/overview Docs: http://readthedocs.org/docs/django-ics/en/latest/ Thanks, Ian -- Ian http://www.ianlewis.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: HELP with unicode!!!!!

2012-05-01 Thread Ian Clelland
t handle Unicode well. In fact, it's one of the first things mentioned in the docs: http://docs.python.org/library/csv.html Further down that page, though, is a snippet of code that you should be able to use (search the page for "unicode_csv_reader") If that doesn't work,

Re: HttpResponse_is_string is removed Django 1.4

2012-04-06 Thread Ian Clelland
jangoproject.com/ticket/16494, and you can see the changes that were made for 1.4 here: https://code.djangoproject.com/changeset/16829) -- Regards, Ian Clelland -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Questions about UnicodeDecodeError

2012-04-03 Thread Ian Clelland
oerce it into the ASCII range before you put it in the database. As long as you remember to encode the data on save, and decode it (once!) before displaying it, you should be able to get it to work. Ian > I may be forced into doing that it seems > to make django even work. I tried t

Re: Storing many to many fields

2012-03-18 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.ianlewis.org/

Re: internationalization makemessage don't work

2012-02-27 Thread Ian Clelland
our INSTALLED_APPS setting contain the apps that should be translated? -- 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

Re: Using query set in views.py

2012-02-26 Thread Ian Clelland
name attribute. That is why you are getting None when you try to retrieve it from the POST dictionary -- the browser never sent it to the server. I'm certain that you have additional issues with your view function, but this is the reason for the error that you are seeing right now. Ian > *

Re: internationalization makemessage don't work

2012-02-26 Thread Ian Clelland
django-admin.py, rather than manage.py? manage.py knows how to fund your settings files, and import all of your apps and check all of your template dirs. Try first running "manage.py makemessages -l fr" (since I suspect that your site is already in French, you won't have to actually do

Re: django 1.1: nonexistent URLs display 500.html instead of 404.html

2012-02-22 Thread Ian Clelland
to upgrade. Django 1.3 is almost a year old, and is still the current version -- if you can wait a couple of weeks, you'll see 1.4 released as well. > With the commas missing, all requests to nonexistent URLs returned a > 500 error. > > > On Feb 22, 12:31 am, Ian Clelland wrote:

Re: django 1.1: nonexistent URLs display 500.html instead of 404.html

2012-02-21 Thread Ian Clelland
to the handling of the 500 error template, or possibly indicates another error in your application settings. Ian On Tue, Feb 21, 2012 at 10:36 AM, rabousha wrote: > I am using django 1.1, with DEBUG = False, and > TEMPLATE_CONTEXT_PROCESSORS is missing commas, all nonexistent URLs > dis

Re: django get value from oracle function

2012-01-27 Thread Ian
p://cx-oracle.sourceforge.net/html/cursor.html#Cursor.callfunc 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 unsubscribe from this group, send email t

Re: saving in a view

2012-01-27 Thread Ian Clelland
k that you are going to need some lines that actually update the 'this' and 'customer' object. You would do that like this: this.number = this.number + 1 or customer.reference = number Then, when you save the objects (and just use "customer.save()", the force_update=True i

Re: Please help with complex aggregation/annotation issue

2012-01-19 Thread Ian Clelland
7;], MessierMarathon.objects.filter(messier_number=x['messier_number'], nominations=x['nominations'])[0].image) for x in highest_counts) You might be better off writing raw SQL for it, though; you could probably get it all with one (convoluted) query. -- Regards, Ian Clell

Re: Django orm and no primary key

2012-01-10 Thread Ian Clelland
filter() rather than get, if you can't ever assume uniqueness - Similarly, if you have to update records, use update() rather than save(). It sounds like you want to use aggregate queries on this table anyway, so you (hopefully) shouldn't run into any issues. Oh, and don't r

Re: Can I escape or delimit the "{{ }}" template braces?

2011-12-19 Thread Ian Clelland
On Monday, December 19, 2011, J. Marc Edwards < marc.edwa...@nimbisservices.com> wrote: > I'd like to write a paragraph on my page that describes the {{ }} syntax, but the template interpreter is interpreting the braces. I think what you need is the {% templatetag %} tag -- it outputs template tag

Re: Django 1.2.1 strange problem

2011-12-15 Thread Ian Clelland
transaction will be committed to the database, and if the view raises error, the transaction will be rolled back automatically. In almost every case, this behaviour will be exactly what you want. -- Regards, Ian Clelland -- You received this message because you are subscribed to the Google Groups &

Re: Can a template extend a template?

2011-12-13 Thread Ian Clelland
html", RequestContext({"base_template": base_template...})) Template: (my_template.html) {% extends base_template %} (In a real app, I would use a base class for the view which would set the base template for every request automatically, or I would do it in a context proces

Re: Query with no-correspondence results

2011-12-08 Thread Ian Clelland
On Thu, Dec 8, 2011 at 12:45 PM, wgis wrote: > Ian Clelland, it worked! Thanks a lot for your perseverance > > Tom's secret sauce it's not working, unfortunately =( > Just (Carrots, Flavour, 3.0) > I guess since some 'contexts' don't have an associated th

Re: Django E-Commerce Framework

2011-12-08 Thread Ian Clelland
modular. > > -- > 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.c

Re: Django E-Commerce Framework

2011-12-08 Thread Ian Clelland
modular. > > -- > 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.c

Re: Query with no-correspondence results

2011-12-07 Thread Ian Clelland
e WHEREs (not filtering by user or thing), it still > presents without nulls (or 0.0) > Is there other way you can see? > Again, thanks > On 6 Dez, 21:48, Ian Clelland wrote: > > On Tue, Dec 6, 2011 at 1:35 PM, Reinout van Rees >wrote: > > > > > Ah! Now I get

Re: Query with no-correspondence results

2011-12-06 Thread Ian Clelland
0) from mydatabase_votecontext left join mydatabase_vote on (mydatabase_vote.context_id = mydatabase_votecontext.id) where thing='Carrot' and user='Me' There still might be a way to do it with the ORM; but you can definitely use raw sql for this. -- Regards, Ian Clelland -- You received this messa

Re: models.Q raising exception

2011-12-01 Thread Ian Clelland
ango_models ... GameProfile.objects.get( django_models.Q(nick=nick) | django_models.Q(user=self.user), world=self.world, ) to see if the problem goes away. If it does, it's almost definitely a redefined name. -- Regards, Ian Clelland -- You

Re: unit tests and 'system' tests with history

2011-11-30 Thread Ian Clelland
(ab, Bees with Machine Guns, etc) that will tell you how your site performs under load. Host-based testing should be there to tell you that your site behaves predictably and correctly under normal operation. Ian > > > As you can see from my previous questions I'm used to 'non-atomic&#

Re: Retrieve object model admin userid & password?

2011-11-30 Thread Ian Clelland
; Yes, yes and yes. If you have console access, you can also do this: manage.py changepassword username_goes_here That will allow you to reset anybody's password; superuser or otherwise. -- Regards, Ian Clelland -- You received this message because you are subscribed to the Google Grou

Re: Boolean test on queryset

2011-11-28 Thread Ian Clelland
u 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://groups.google.co

Re: django.conf.urls import question

2011-11-28 Thread Ian Clelland
ing the tutorial for the development version. (There used to be a big warning about this at the top of all every page in the development docs, but it seems to have disappeared.) Try following the tutorial starting at https://docs.djangoproject.com/en/1.3/intro/tutorial01/ instead, and see how far you

Re: string indices must be integers, not str

2011-11-21 Thread Ian Clelland
ttings.DEFAULT_FROM_EMAIL[settings.CONTACT_EMAIL_TO]" looks like you're trying to use a string to index into another string variable. Ian -- Regards, Ian Clelland -- You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Forbiden 403 error

2011-11-16 Thread Ian Clelland
on out of CSRF protection, then you can do that too -- it's not baked into Django that deeply. You will need to change your settings, and remove the CSRF middleware from MIDDLEWARE_CLASSES. That will completely remove this feature from your project. (and, of course, remove all of the security benef

Re: How can I serve static files while requiring Django-based access permissions?

2011-11-08 Thread Ian Clelland
pp, and you can do whatever access checks that you want to before serving it. Look up X-SENDFILE for Apache, or X-Accel-Redirect for nginx for the details. Ian > Ideally the resulting website will be fast, but I also want to hear > options that might be low performance. > > Thank you,

Using the same storage backend for media and static files.

2011-11-05 Thread Ian Lewis
using the same class but with different settings. -- Ian http://www.ianlewis.org/ -- 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, se

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Ian Clelland
ated, or you might end up with 70M objects, or anywhere in between. Again: odd, undocumented, and potentially surprising behaviour, and I'd recommend explicit over implicit, especially in this case. -- Regards, Ian Clelland -- You received this message because you are subscribed

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Ian Clelland
On Wed, Nov 2, 2011 at 10:46 AM, Tom Evans wrote: > On Wed, Nov 2, 2011 at 5:30 PM, Ian Clelland wrote: > > On Wed, Nov 2, 2011 at 8:25 AM, Thomas Guettler wrote: > >> > >> # This is my current solution > >> if get_special_objects().filter(pk=obj.pk).c

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Ian Clelland
# yes, it is special I believe that in some cases, the exists() query can be optimized to return faster than a count() aggregation, and I think that the intent of the code appears more clearly. Ian -- Regards, Ian Clelland -- You received this message because you are subscribed to the Goog

Re: Long usernames in auth_user?

2011-10-28 Thread Ian Clelland
g, even though they are rarely encountered. 320 characters suffices for any valid email address. -- 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@go

Re: Database management commands

2011-10-28 Thread Ian Clelland
;, and you can see the engine used by all of your tables. -- 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

Re: Using .filter() on a constant expression

2011-10-21 Thread Ian Clelland
)) )) | ( Q(dob_year_max=alive_y2+1) & ( Q(dob_month=1) & ( Q(dob_day=None) | Q(dob_day__lt=1) )) )) -- Regards, Ian Clelland -- You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: django.db.models import Q help!

2011-10-21 Thread Ian Clelland
f another object, then just use that! Try something like fi = request.user.get_profile().financial_institution txn = Transaction.objects.extra( where=['(tpin=%s or teller_no=%s or identifier=%s) AND financial_institution_id=%s'], params=[value, str(value), value, fi.id]) --

Re: PUNTARE CON DJANGO SU BILANCIATORE ORACLE ATTRAVERSO IL TSNAME

2011-10-18 Thread Ian
On Oct 18, 5:17 am, Maksymus007 wrote: > englishoo speakino list only. That was rude and uncalled for. -- 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

  1   2   3   4   5   6   7   >