Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-23 Thread Don Onyango
Interested add +254741590670 On Sunday, February 18, 2024 at 7:48:37 PM UTC+3 SURAJ TIWARI wrote: > 🚀 Join Our Django WhatsApp Bulk Messaging Project! > > 👋 Hello everyone, > > Are you looking for an exciting opportunity to gain hands-on experience in > Django development? Do you want to work o

Re: What's the best way to find the number of database accesses being done?

2019-07-24 Thread Don Baldwin
Thanks for the quick response Simon. This looks to be very informative. It will take me a while to digest all of it, but I've already gotten logging working for my queries. Very helpful. Thanks, Don On Tue, Jul 23, 2019 at 11:38 AM Simon Charette wrote: > Hello Don, > > D

Re: What's the best way to update multiple entries in a database based on key/value pairs

2019-07-24 Thread Don Baldwin
Thanks for the quick response Simon. Worked like a charm. -Don On Tue, Jul 23, 2019 at 11:29 AM Simon Charette wrote: > Hello Don, > > If you're on Django 2.2+ you should use bulk_update for this purpose[0] > > TestThing.objects.bulk_update(( > TestThing(id=id, val

What's the best way to find the number of database accesses being done?

2019-07-23 Thread Don Baldwin
I have a function that runs some database queries and updates. In the test code for that function, I'd like to check out many times the database is actually being hit. Does Django provide a way to get that information? Thanks, Don -- You received this message because you are subscrib

What's the best way to update multiple entries in a database based on key/value pairs

2019-07-23 Thread Don Baldwin
loop through each entry and update each entry individually, but this seems really inefficient, so I think there must be a better way to do this. Also, my table may have entries that aren't represented in my dictionary, so I don't think I can do the following: TestThing.objects.a

Re: M2M relationship not behaving as I would expect

2019-07-23 Thread Don Baldwin
of indirection caused the query to lose the constraints of the one-to-many relationships between user and bridge and between thing and bridge, although I don't fully understand it. Thanks for your response Mike. -Don On Sunday, July 21, 2019 at 3:58:03 PM UTC-7, Mike Dewhirst wrote: >

M2M relationship not behaving as I would expect

2019-07-21 Thread Don Baldwin
{'user__user_data': 'user', 'thing_data': 'thing 2', 'user__testbridge__bridge_data': 'bridge 2'} What I expect: {'user__user_data': 'user', 'thing_data': 'thing 1', 'user__testbridge

Re: How to: Django development and debugging

2016-10-23 Thread Don Thilaka Jayamanne
or debugging other Python libraries tied to your Django >application e.g. Lettuce BDD tests, Unit Tests e.t.c > > It's definitely worth a try as you can get a lot from the Community Edition > > Regards > > On Thursday, October 20, 2016 at 8:30:45 PM UTC-4, Don Thil

Re: How to: Django development and debugging

2016-10-23 Thread Don Thilaka Jayamanne
jango > application e.g. Lettuce BDD tests, Unit Tests e.t.c > > > > It's definitely worth a try as you can get a lot from the Community > Edition > > Regards > > On Thursday, October 20, 2016 at 8:30:45 PM UTC-4, Don Thilaka Jayamanne > wrote: > >> > &

Re: How to: Django development and debugging

2016-10-23 Thread Don Thilaka Jayamanne
@Derek, yes VS Code Editor is available on Linux platforms. Have a look here: https://code.visualstudio.com/Download On Monday, 24 October 2016 00:20:26 UTC+11, Derek wrote: > > Is VS Code Editor available on Linux platforms? > > On Friday, 21 October 2016 02:30:45 UTC+2, Don Thila

Re: How to: Django development and debugging

2016-10-23 Thread Don Thilaka Jayamanne
Unit Tests e.t.c > > > > It's definitely worth a try as you can get a lot from the Community > Edition > > Regards > > On Thursday, October 20, 2016 at 8:30:45 PM UTC-4, Don Thilaka Jayamanne > wrote: > >> > >> Hi Everyone, I'm the author

Re: How to: Django development and debugging

2016-10-23 Thread Don Thilaka Jayamanne
@Derek, yes VS Code Editor is available on Linux platforms. Have a look here: https://code.visualstudio.com/Download On Mon, Oct 24, 2016 at 12:20 AM, Derek wrote: > Is VS Code Editor available on Linux platforms? > > On Friday, 21 October 2016 02:30:45 UTC+2, Don Thilaka Jayama

Re: How to: Django development and debugging

2016-10-23 Thread Don Thilaka Jayamanne
your Django >application e.g. Lettuce BDD tests, Unit Tests e.t.c > > It's definitely worth a try as you can get a lot from the Community Edition > > Regards > > On Thursday, October 20, 2016 at 8:30:45 PM UTC-4, Don Thilaka Jayamanne > wrote: >> >> Hi Eve

How to: Django development and debugging

2016-10-20 Thread Don Thilaka Jayamanne
Hi Everyone, I'm the author of a Python plugin for the VS Code editor (https://github.com/DonJayamanne/pythonVSCode). Basically it provides intellisense, code navigation, debugging (django, multi threads, etc), data science and the like. When it comes to debugging django applications, today the

Issue with "Creating forms from Modules"

2014-07-10 Thread Don Fox
While typing in the code in https://docs.djangoproject.com/en/1.7/topics/forms/modelforms/ I get a a Name Error that doesn't seem related to any omitted import module. I'm running this is the shell that has the settings* './manage.py shell' * where I have a project reflecting this particular t

Re: Some creating Forms from models snags.

2014-07-10 Thread Don Fox
Problem went away after PyCharm indicated that two imports be removed? Not really sure whet the problem was! On Wednesday, July 9, 2014 12:09:40 AM UTC-4, Lachlan Musicman wrote: > > On 9 July 2014 13:19, Don Fox > wrote: > > > > > > I should have mentioned that I

Re: Some creating Forms from models snags.

2014-07-08 Thread Don Fox
odels.TextField() > author = models.ForeignKey(Author) > > That should help. > > cheers > L. > > On 9 July 2014 11:31, Don Fox > wrote: > > In the Creating forms from Models documentation > > https://docs.djangoproject.com/en/1.6/topics/forms/modelform

Some creating Forms from models snags.

2014-07-08 Thread Don Fox
In the Creating forms from Models documentation *https://docs.djangoproject.com/en/1.6/topics/forms/modelforms/ *I'm having some problems. First I'm placing the code from the first block (green section), where the class ArticleForms is defined in the shell in a *forms.py *file in a myapp app o

Simple User login not working.

2014-03-19 Thread Don Fox
My project has two superusers who have access to the Django Administration and who manually add about 15 Users who should then be able to login and use the site to do data entry. I'm using the standard code in my views *def auth_view(request):* *username = request.POST.get('username',' ')*

Re: How to migrate a project from one DB to another

2014-01-09 Thread Don Fox
Thanks for responding. Regarding the small project, I initial tried it but it appeared to no go well with sqlite3. I need to move over to postgresql soon but first need to resolve a couple of other issues first. Thanks again for the response. Don On Sun, Dec 29, 2013 at 3:53 AM, Timothy W

Accessing database table

2014-01-08 Thread Don Fox
In my manage.py shell I can load the following module: *from userprofile.models import NPIdata* However inside a file of utility functions located in the userprofile app the same import statement yields *ImportError:* 'No module named userprofile.models' I'm mystified! Any hints or help welc

How to migrate a project from one DB to another

2013-12-28 Thread Don Fox
I've started a small project and would like to change from sqlite to postgresql. Is there any established systematic method to carry this out? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

Python shell displays Segmentation Fault: 11 after upgrade to Mavericks OS

2013-10-24 Thread Don Fox
python manage.py shell Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from polls.models import Poll, Choice >>> Poll.objects

Current session lost when redirecting via facebook oauth2

2013-10-01 Thread Don Graham
go_session`.`session_data`, `django_session`.`expire_date` FROM `django_session` WHERE `django_session`.`session_key` = 'vguth05jxwih234x0dwi8vao7xpw7s7r' ", u'time': u'0.001'}, {u'sql': u"SELECT `django_session`.`session_key`, `django_session`.`sess

Validation of generic relation from a GenericInlineModelAdmin

2013-06-05 Thread Calin Don
Hi, I don't know if this is a bug or expected behavior, but when I'm trying to create a new generic relation object from a GenericInlineModelAdmin form, the object's validation methods (eg. clean or validate_unique) don't have object_id and content_type fields set. When the generic relation objec

Aggregate on part of a date field?

2010-09-07 Thread Don
I need to create a query that aggregates values by the year of a date field. I have not been able to discover a way to do this yet, perhaps someone can help. I can issue the following raw query, which gives the results I want: cursor.execute("""SELECT year(oac_date) as year, month(oac_date) as mon

MySQLdb problem in conjunction with MAMP

2009-12-27 Thread Don Fox
sal.egg/_mysql.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/donfox1/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): Library not loaded: /usr/local/mysql/lib/libmysqlclient_r.16.dylib Referenced from: /Users/donfox1/.python-eggs/MySQL_python-1.

ModelChoiceField Work around or danger

2009-10-14 Thread Don Guernsey
I was struggling to find a solution to the ModelChoiceField looking up 100,000 students every time I wanted to add an RtI so I did the following. Can anyone find problems with this, or have an alternate solution...This does work though Instead of using an id I used a student_number as an IntegerFie

Re: dates() and annotate()

2009-06-08 Thread Don Spaulding
On Jun 8, 3:54 pm, Alex Gaynor wrote: > On Mon, Jun 8, 2009 at 3:42 PM, Don Spaulding wrote: > > > > > > > Hi there, > > > While playing around with the aggregation support in trunk, I came up > > with the need for the following SQL query: > > &g

dates() and annotate()

2009-06-08 Thread Don Spaulding
Hi there, While playing around with the aggregation support in trunk, I came up with the need for the following SQL query: SELECT DATE_TRUNC('day', datestamp) AS rec_day, COUNT(id) AS count FROM stats_record GROUP BY rec_day How would I construct this same query via the ORM? My

Re: annotate() + order_by() == aborted transaction?

2009-06-03 Thread Don Spaulding
On Jun 3, 7:11 pm, Don Spaulding wrote: > On Jun 3, 5:59 pm, Don Spaulding wrote: > > > > > On Jun 3, 5:22 pm, Don Spaulding wrote: > > > > On Jun 3, 3:05 pm, Alex Gaynor wrote: > > > > > On Wed, Jun 3, 2009 at 3:03 PM, Don Spaulding > >

Re: annotate() + order_by() == aborted transaction?

2009-06-03 Thread Don Spaulding
On Jun 3, 5:59 pm, Don Spaulding wrote: > On Jun 3, 5:22 pm, Don Spaulding wrote: > > > > > On Jun 3, 3:05 pm, Alex Gaynor wrote: > > > > On Wed, Jun 3, 2009 at 3:03 PM, Don Spaulding > > > wrote: > > > > > bump. > > > > >

Re: annotate() + order_by() == aborted transaction?

2009-06-03 Thread Don Spaulding
On Jun 3, 5:22 pm, Don Spaulding wrote: > On Jun 3, 3:05 pm, Alex Gaynor wrote: > > > > > On Wed, Jun 3, 2009 at 3:03 PM, Don Spaulding > > wrote: > > > > bump. > > > > Can anyone tell me if this looks like a bug in Django? > > >

Re: annotate() + order_by() == aborted transaction?

2009-06-03 Thread Don Spaulding
On Jun 3, 3:05 pm, Alex Gaynor wrote: > On Wed, Jun 3, 2009 at 3:03 PM, Don Spaulding wrote: > > > > > > > bump. > > > Can anyone tell me if this looks like a bug in Django? > > > On Jun 1, 6:12 pm, Don Spaulding wrote: > > > Hi all, > &g

Re: annotate() + order_by() == aborted transaction?

2009-06-03 Thread Don Spaulding
bump. Can anyone tell me if this looks like a bug in Django? On Jun 1, 6:12 pm, Don Spaulding wrote: > Hi all, > > I've got a quick use case that I think should work according to the > docs, but it's not.  In this case, Domain objects have a reverse fkey > relation

annotate() + order_by() == aborted transaction?

2009-06-01 Thread Don Spaulding
Hi all, I've got a quick use case that I think should work according to the docs, but it's not. In this case, Domain objects have a reverse fkey relation named "reports", and the Report model has an "updated" field. I'd like to annotate and order Domains by the max value of "updated" for all re

Re: How to count objects for each date in django.views.generic.date_based.archive_index?

2009-05-22 Thread Don Spaulding
On May 22, 8:16 pm, Don Spaulding wrote: > On May 22, 1:13 pm, Laurent Meunier wrote: > > > > > Hi list! > > > I'm looking for a way to have the number of objects for each date in > > the date_list object for the generic view date_based.archive_index. >

Re: How to count objects for each date in django.views.generic.date_based.archive_index?

2009-05-22 Thread Don Spaulding
On May 22, 1:13 pm, Laurent Meunier wrote: > Hi list! > > I'm looking for a way to have the number of objects for each date in > the date_list object for the generic view date_based.archive_index. > > For example: > - 2009: 12 objects > - 2008: 10 objects > > I saw that the generic view is usin

strange problem in uploading image file

2009-05-13 Thread don ilicis
hi all: I was trying to rewrite the clean_XX() method like this: 1def clean_media(self): 2 3 # save from a upload file 4 data = self.cleaned_data['media'] 5 tmp = open('img.jpg','wr') 6 tmp.write(data.read()) 7 tmp.close() 8 9 # open it 10

Re: Django in Linux

2009-04-21 Thread don ilicis
2009/4/21 galileo > > How we use Django in Linux? > > > > http://docs.djangoproject.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@googl

Re: Your IDE of choice

2009-01-07 Thread don ilicis
2009/1/7 Kenneth Gonsalves > > On Tuesday 06 Jan 2009 5:18:57 pm HB wrote: > > What is your favorite IDE for coding Django projects? > > geany > > -- > regards > KG > http://lawgon.livejournal.com > > > > me too and also gedit / vim --~--~-~--~~~---~--~~ You recei

Re: Multi table inheritance and admin

2008-09-19 Thread Don
Admin) More info on inlines available here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects Take care, Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

one-to-many vs. many-to-one in admin

2008-09-19 Thread Don Jennings
cturer has no ForeignKey to Product error.) Or is there another way to design the models? Thanks! Take care, Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Queryset-refactor branch has been merged into trunk

2008-04-28 Thread Don Spaulding II
Malcolm Tredinnick wrote: > I merged queryset-refactor into trunk just now. This was changeset > r7477. Thanks for all of your effort on this, Malcolm. Malcolm's Amazon Wishlist: http://www.amazon.com/gp/registry/registry.html?ie=UTF8&type=wishlist&id=1VB5A16R2KV0T

Re: mod_python or fcgi

2008-04-24 Thread Don Spaulding
note that fastcgi makes a nice separation between app and web server for my needs. I hated having to restart apache to restart my app, and fastcgi on lighttpd made app deployment stupidly easy (not that apache/mod_python is rocket science). Don Spaulding --~--~-~--~~~-

Re: Calling self.related_object.save() from self.save() ???

2008-04-24 Thread Don Spaulding
On Apr 23, 7:23 pm, "Jorge Vargas" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 23, 2008 at 11:09 AM, Don Spaulding > > <[EMAIL PROTECTED]> wrote: > > > On Apr 22, 11:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > > wrote: > >

Re: Calling self.related_object.save() from self.save() ???

2008-04-23 Thread Don Spaulding
On Apr 22, 11:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-22 at 13:47 -0700, Don Spaulding wrote: > > [...] > > > I try to do something like this: > > > order = Order() > > order.save() > > order.items.create(price=Decimal

Calling self.related_object.save() from self.save() ???

2008-04-22 Thread Don Spaulding
27;ve saved the item before calling order.save(), the order objects still doesn't know that the new item is related to it. Anybody know if this is expected behavior? Thanks, Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

too see free softare notes

2008-02-09 Thread don
earnac.blogspot.com/g933052 --~--~-~--~~~---~--~~ 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 [EMAI

Re: Street address normalisation

2007-11-20 Thread Don Arbow
a nice library, Geo-StreetAddress, that does some parsing and normalization. I looked at porting it to Python, but it has some crazy regex code in it. You should be able to call it from Django. The page below has some other options (like scraping the US Postal Service website). http://sea

Re: spam

2007-11-07 Thread Don Arbow
> On Nov 7, 2007, at 4:45 PM, Don Arbow wrote: >> >> I usually go to the Google Groups web site for this and the dev >> group. There is a link in each message that you can use to report >> it as spam. I find that Google seems to be pretty quick to ban a >>

Re: spam

2007-11-07 Thread Don Arbow
here is a link in each message that you can use to report it as spam. I find that Google seems to be pretty quick to ban a specific user who is spam bombing groups. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: python script

2007-10-03 Thread Don Arbow
> > Thanks a lot, > Xan. Everything you wanted to know about running Django from a script: http://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/ Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: create_or_update() shortcut

2007-08-02 Thread Don Arbow
;s called save(). http://www.djangoproject.com/documentation/db-api/#how-django-knows- to-update-vs-insert Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Flex integration, best practices?

2007-07-12 Thread Don Arbow
a compact binary format that allows you to send serialized objects. DjangoAMF allows you to convert these binary objects to/from Python objects. Using AMF eliminates the XML parsing required in the client. Don --~--~-~--~~~---~--~~ You received this message b

Re: Returning a javascript command

2007-07-09 Thread Don Spaulding II
I think you meant to escape those single-quotes in your js call: return render_to_response('javascript:AjaxTabs.OpenTab(getUniqueId("tab_page"),"Success","html/ test.html",true,\'\')', {'generic': file }) Rishtastic wrote: > Right now I am trying; > ... > return > render_to_response('javascript

Re: Rendering a template to the browser on the fly using an iterator?

2007-07-04 Thread Don Arbow
browse_frm/thread/ 328685ac73959701/7cf4a6f68fffc3e5?lnk=gst&q=template+rendering+as +iteration&rnum=1#7cf4a6f68fffc3e5 It was fixed in changeset 5482 but then backed out in 5511, while they check for side-effect bugs. Don --~--~-~--~~~---~--~~ You rece

Re: Including [django-users] in subject line?

2007-06-11 Thread Don Arbow
s based on subject text. This post is now no longer connected to the original thread (or wasn't until I edited it). Others that wish to reply to a post and keep it in the original thread need to edit the subject line prior to sending. It may be "workable" for you, but y

Re: Django Deployment Headache (Apache Permissions?)

2007-06-06 Thread Don Arbow
uot;/"django_project" Well, then, there's your problem. You need to point to your project folder, according to what you wrote above, "TheBest" is your project folder, not "alpha1". PythonPath should be: PythonPath "['/home/thebest/TheBest/alpha1/Th

Re: Django Deployment Headache (Apache Permissions?)

2007-06-06 Thread Don Arbow
hat the module was not found. Your top level folder "TheBest" contains no __init__.py file, so Python doesn't know it's a module. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Running tests - minor problem with fixtures

2007-05-31 Thread Don Arbow
o use "SELECT setval()" for my elderly version of Postgres, so all is well. Don --~--~-~--~~~---~--~~ 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: Running tests - minor problem with fixtures

2007-05-29 Thread Don Arbow
reset() use "SELECT setval()" but get_sql_flush() uses "ALTER SEQUENCE"? I've been using setval() in Postgres for so long, I wasn't even aware that they added ALTER SEQUENCE, :-). I'll do some more hacking on this when I get to work tomorrow and try loaddat

Re: string index out of range

2007-05-12 Thread Don Arbow
with the immediate data you have (traceback) and work your way backwards to the true cause. Don On May 12, 2007, at 9:09 AM, Mark Phillips wrote: > > > On May 11, 2007, at 9:40 PM, Malcolm Tredinnick wrote: > >> More information is definitely needed here. You've just don

Re: Flex + django

2007-05-07 Thread Don Arbow
Cairngorm framework, which makes it easier to handle asynchronous calls within the Flex app. Note also there is some AMF middleware available to enable Flash Remoting. I haven't used it though: http://djangoamf.sourceforge.jp/index.php?DjangoAMF_en Don On May 7, 2007, at 1:14 AM, [

Re: Deos Django have Java Servlet's Listener like thing?

2007-05-05 Thread Don Arbow
Django's equivalent are signals. Here's a few links: http://code.djangoproject.com/wiki/Signals http://www.mercurytide.com/whitepapers/django-signals/ http://feh.holsman.net/articles/2006/06/13/django-signals Don On May 4, 2007, at 9:06 PM, Mambaragi wrote: > > I need to sta

Re: development server

2007-03-29 Thread Don Arbow
does not auto-reload the file. I have to Ctrl-C and restart > it manually. A restart though is trivial: Ctrl-C, up arrow, return and you're back in business. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Threaded versus forked how can I tell?

2007-02-15 Thread Don Arbow
you start the server and test for that in your code. Don --~--~-~--~~~---~--~~ 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 unsubsc

Re: "Best" way of using templates

2007-02-14 Thread Don Arbow
at for some of my models where this would be the most "natural" way of displaying the value. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Open Book Platform demo site is up

2007-02-12 Thread Don Arbow
;s images on your site (you took a cover image of an Apress book and put a title on it to look as if there is an Apress book that is related to your site). You claim copyright for yourself, and yet you appropriate other's work. Don --~--~-~--~~~---~--~~ Y

Re: Related "order by" problems

2007-02-04 Thread Don Arbow
model can work without having to specify it. So in your site model you'd have class Meta: ordering = ('pagerank',) Then in your query, if you order by your site foreign key, you get that fk's default ordering, no need to specify the pagerank in the query. Don

Re: Get domain name

2007-02-02 Thread Don Arbow
u the domain name that was specified. You can use the get_host() method in django.http as a shortcut. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: manager.get_or_create() issue

2007-01-30 Thread Don Arbow
se value as a unique key, you could store them as strings or integers (remove the decimal point by multiplying by 10,000). Of course, you'll then have to convert values when you query the database. Here's more on how Python handles floating point: http://

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread Don Arbow
that case, perhaps an email to that person would be in order. Don --~--~-~--~~~---~--~~ 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

Re: QuerySet generating wrong SQL

2007-01-29 Thread Don Arbow
On Jan 29, 2007, at 4:22 AM, innervision wrote: > > How can I tell the queryset to use an OR operator between the 'where' > clause and the conditions set-up in the Q object? http://www.djangoproject.com/documentation/mode

Re: Debugging Django: print statements?

2007-01-27 Thread Don Arbow
is like figuring out what is wrong with your car by listening for weird noises. Using a debugger is like opening the hood and tweaking the engine with tools. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

Re: How to remove the dependencies on the project directory from the python code.

2007-01-23 Thread Don Arbow
yhow > what I'd like to do is to understand how to remove the dependencies on > the project directory from the python code. Go to Google groups and search this list for a thread last week entitled "Project organization and decoupling". Don --~--~-~--~~

Re: translations...

2007-01-22 Thread Don Arbow
On Jan 22, 2007, at 12:22 PM, ashwoods wrote: > > hmm... i guess everybody is tired of translation discussions :) You might have better luck in the Django internationalization group: http://groups.google.com/group/django-I18n

Re: What can be done about all the spam in django-users?

2007-01-19 Thread Don Arbow
then click the "Report Abuse" link. Google is very good at removing these messages and banning users who send it. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: ANN: Upgrading code.djangoproject.com

2007-01-17 Thread Don Arbow
when mousing over the titles!!!! Thanks, Jacob. Don --~--~-~--~~~---~--~~ 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 unsubscrib

Re: For Loops

2007-01-16 Thread Don Arbow
tion of how the above works: http://groups.google.com/group/django-users/msg/858e38a7b440b294 Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Complex Data Models.

2006-12-27 Thread Don Arbow
avoid duplicating a query in more than one view. In that case you could just create a Python file containing SQL queries and import them where you need them. MY_BIG_QUERY = """SELECT * FROM table WHERE ...""" MY_BIG_QUERY_2 = """SELECT

Re: 'function' object has no attribute 'rindex'

2006-12-26 Thread Don Arbow
On Dec 26, 2006, at 7:46 PM, Adrian Holovaty wrote: On 12/26/06, Don Arbow <[EMAIL PROTECTED]> wrote: Read the comments in chapter 3 where it says "Let's edit this file to expose our current_datetime view:". According to people that have commented, there's a small

Re: 'function' object has no attribute 'rindex'

2006-12-26 Thread Don Arbow
versions of Django (such as from svn), but not with 0.95. There is an explanation in the comments there that tell how to fix it. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Types of projects Django is not well suited for?

2006-12-25 Thread Don Arbow
ango is the knowledge and experience of the developer. Don --~--~-~--~~~---~--~~ 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: startswith a range

2006-12-22 Thread Don Arbow
elieve you could do this: list = Model.objects.filter(any([Q(name__startswith=letter) for letter in 'abc'])) Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Screencast: Django + Aspen = Stephane (was Re: pure-HTTP deployment?)

2006-12-21 Thread Don Arbow
On Dec 21, 2006, at 10:35 AM, Jeremy Dunck wrote: Where does one find this tiny shim? Well, the url is in the screencast: http://aspen-commons.googlecode.com/svn/stephane/ Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: CSS Basics

2006-12-19 Thread Don Arbow
use of your available resources. Note that what James wrote is not just a Django thing. This same holds true for any sort of server environment that delivers dynamic content including PHP, Rails, .NET, mod_perl and others. Don --~--~-~--~~~---~--~~ You

Re: Bugs in Django apps : why not throw exceptions when being in debug mode ?

2006-12-19 Thread Don Arbow
ask, why would anybody rely on a non-existent variable in their template? Think of the {% if xxx %} tag. If you want a section of html to display, you set the variable, if not, you don't need to set anything. The above paragraph is from: http://www.djangoproject.com/documentation/temp

Re: Any web control panel project on Django

2006-12-17 Thread Don Arbow
//code.google.com/p/zmaj/ Don --~--~-~--~~~---~--~~ 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: Why is IPAddressField a char(15) instead of an int?

2006-12-17 Thread Don Arbow
thin a subnet): select * from table where inet '192.168.1/24' >> ip_column; If you need that functionality, you could post a ticket and/or a suggested fix. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: null ordering in mysql

2006-12-14 Thread Don Arbow
n columns unless all column values are null, so this behavior is not consistent with its column sorting routines. I think If you want minimum or maximum values in your tables, they should be explicitly coded. Don --~--~-~--~~~---~--~~ You received thi

Re: manage.py - "test" not a known action - how do I do unittests?

2006-12-11 Thread Don Arbow
t; > I'm running Django 0.95 with Python 2.4 on Windows XP SP2. What revision are you running? The test option was added in 3660, 0.95 is rev 3491. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: Template extending problem

2006-12-09 Thread Don Arbow
On Dec 9, 2006, at 10:56 AM, mezhaka wrote: > > try > {% extends "/blog/base.html" %} > instead of > {% extends "/blog/base" %} In addition, he should remove the leading '/' from the path in the extends clause. If you code a leading slash, os.

Re: Optimizing Templates

2006-12-07 Thread Don Arbow
r not. The page doesn't look too exotic, but it is big, I did notice a regroup call in there, which may take some time depending on the data it has to process. If the timing is a problem, have you looked into caching? Don --~--~-~--~~~---~--~~ You rec

Re: Retrieve Password

2006-11-29 Thread Don Arbow
cannot recover the password once it is hashed. If you need to send the password back to the user, you need to store it somewhere yourself. Note that this is not recommended and defeats the purpose of hashed passwords. Don --~--~-~--~~~---~--~~ You received t

Re: Debugging emails

2006-11-27 Thread Don Arbow
. > > Still nothing. mail_admins() is called from the get_response() routine in django/ core/handlers/base.py. There is a parameter, fail_silently, that is set to True. Set that to False and see what happens. Any error that happens when sending the email should trigger an exception. Do

Re: Debugging emails

2006-11-27 Thread Don Arbow
mething like this in your settings file: EMAIL_HOST='smtp.myisp.com' Don --~--~-~--~~~---~--~~ 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: Submission rejected as potential spam (Akismet says content is spam)

2006-11-27 Thread Don Arbow
and enter your information? Once you do that, you should be able to modify tickets. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: What is __init__.py for?

2006-11-19 Thread Don Arbow
want another namespace level inside your module. See for example, django/http. There is nothing in there except an __init__.py that has initialization code as well as numerous class definitions and utility functions. Don --~--~-~--~~~---~--~~ You received th

Re: How to find out the id of the last record in a table?

2006-11-16 Thread Don Arbow
last inserted id is to create an object, save it, then read its id directly. If you need the maximum inserted id, use select max(id) from table. Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

  1   2   3   >