Re: Model's verbose_name not getting used as field label when specifying a field type in ModelForm

2019-02-01 Thread Michael Corey
dget similar to > what's described at > https://docs.djangoproject.com/en/stable/ref/forms/widgets/ "Or if the > field isn’t declared directly on the form..." > > I think it would be: self.fields['who'].widget = forms.Textarea() > > On Friday, Februar

Model's verbose_name not getting used as field label when specifying a field type in ModelForm

2019-02-01 Thread Michael Corey
I'm having trouble getting the verbose_name attribute of a model field to show up when rendering a ModelForm. instead, the label uses the pretty version of the field name, not the verbose_name. This occurs any time I specify a field type, and works properly (shows the verbose_name) if I don't s

Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2018-12-04 Thread Corey Bishop
ny. I had issues with fcgi that heroku resolved, in addition to all sorts of other things I needed for plotting data on the web. Hopefully this helps you. Let me know if you have other questions. Best wishes, On Sat, Dec 1, 2018 at 09:48 Annchen Knodt wrote: > Hi Corey, > I'm havi

Re: Django newbie

2012-06-20 Thread Corey MacDonald
Its most certainly an issue with your env variables. Double check, reboot. If you still have problems please post the string from your path. On Wed, Jun 20, 2012 at 2:46 AM, lovetoprogram wrote: > I am trying django using the djangobook tutorial. I have Python > experience. However when I'm try

Re: Getting Started with Mac OS X

2012-03-07 Thread Clark Corey
I am typing mine into a shell promptI posted the thread, but I don't know that it has posted yet...here it is: After installing Django I am attempting to start a new project. After creating a directory for this, I tried using the command: "django- admin.py startproject mysite". but I'm getti

Re: A couple question about Feeds and GIS

2011-03-28 Thread Corey Farwell
I have learned that GeoRSSFeed is a feed_type and that there is a current ticket for my latter problem http://code.djangoproject.com/ticket/15707 On Mar 28, 4:30 pm, Corey Farwell wrote: > So i have the impression that django.contrib.gis.feeds.Feed outputs a > georss feed when supplied ge

A couple question about Feeds and GIS

2011-03-28 Thread Corey Farwell
So i have the impression that django.contrib.gis.feeds.Feed outputs a georss feed when supplied geometry. what is the purpose of django.contrib.gis.feeds.GeoRSSFeed? Also is there any reason why gis.feeds.Feed still uses the deprecated syndication.feeds.Feed instead of the new syndication.views.Fe

Re: Auto import files into database

2011-03-19 Thread Corey Farwell
So would it look something along these lines: from app.models import NewModel # parse csv data here meow = NewModel(whatever = parsedData) meow.save() Where should this script live? Is there a general place django developers keep these scripts? If I want this script to run every x minutes, would

Auto import files into database

2011-03-19 Thread Corey Farwell
, just would like to know if there is a simple way to get data into the database. Thanks, and am loving django so far Corey -- 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@googlegrou

Re: label_tag in queryset

2011-02-24 Thread Greg Corey
me know. But it seems to work quite well. Greg On Thu, Feb 24, 2011 at 9:15 AM, Greg Corey wrote: > Pardon the continued confusion, but the problem is that I don't know how to > access the model field to get it's associated label like I can when > rendering a form. I don'

Re: label_tag in queryset

2011-02-24 Thread Greg Corey
he label, I can change it in the model and then I don't have to worry about my templates because they just reference the model (DRY). Thanks for you help. Greg On Wed, Feb 23, 2011 at 5:22 PM, Mike Ramirez wrote: > On Wednesday, February 23, 2011 04:16:51 pm Greg Corey wrote: > >

Re: label_tag in queryset

2011-02-23 Thread Greg Corey
Thanks for your reply. One question. > make sure to reference the model field you want as the label if 'Requester' > isn't it. > Not sure what you mean by this. Do you just mean manually change 'Requester' to whatever I want, or that I really can reference the model field to get the label? Greg

Re: Adding an App to the Admin

2011-01-28 Thread Corey Richardson
On 01/28/2011 08:43 AM, Jonas Geiregat wrote: >>> >>> Are you logged in as a user with permission to change models in that app? >>> It >>> won't appear if not. > > I once changed my admin.py file and after reloading nothing had changed. > What did solve this issue was restarting the server or ha

Re: Adding an App to the Admin

2011-01-28 Thread Corey Richardson
; server. Any hints? The appropriate files that I was instructed to modify >> can be seen at [2]. Request more information and I can provide it. >> >> Thank you! >> ~Corey >> >> [1] - http://docs.djangoproject.com/en/1.2/intro/tutorial02/ >> [2] - http://bp

Re: Adding an App to the Admin

2011-01-28 Thread Corey Richardson
On 01/28/2011 03:43 AM, Jonas Geiregat wrote: > > Op 28-jan-2011, om 04:09 heeft Corey Richardson het volgende geschreven: > >> I'm following the tutorial at [1]. I'm trying to add the app to the >> admin site. I've run manage.py syncdb, and I've re

Adding an App to the Admin

2011-01-27 Thread Corey Richardson
I'm following the tutorial at [1]. I'm trying to add the app to the admin site. I've run manage.py syncdb, and I've restarted the dev server. Any hints? The appropriate files that I was instructed to modify can be seen at [2]. Request more information and I can provide it. T

Creating Custom User Row In Custom Table with Django.auth.register

2010-12-01 Thread Corey
I am using Django registration platform and was trying to figure out how to create a row in my CustomUser table for my custom user when a user registers using the django registration platform. I derived a CustomUser class from the django.contrib.auth.User class and added many fields I wanted to get

Building Privacy Options Like Facebook with Django

2010-11-25 Thread Corey
I was trying to build a website that would be a good idea to have privacy options to hide certain data such as Facebook does with personal info. I am a somewhat newbie to Django and website building in general. So Im trying to wrap my head around how to work on this. I have indeed tried to look on

Serving media files with Django/Apache/Nginx

2010-06-01 Thread Corey
I am a Django newbie and Im using Django to build an application. Im using Apache/mod_wsgi and Nginx as a proxy server to serve static files.I am running Nginx on port 80 and have all the Django pages forwarded to Apache. I have my media folder in the application root folder named media1. I cannot

Re: Empty [] using objects.all() on legacy database

2009-06-23 Thread Greg Corey
hes wrote: > >> >> On Mon, Jun 22, 2009 at 12:52 PM, Greg Corey wrote: >> > Karen, the double % ( i.e. 'discount%%') worked. Is this a big enough >> bug >> > that it should be reported? I'm not sure what is a bug and what is just >> my &g

Re: Empty [] using objects.all() on legacy database

2009-06-22 Thread Greg Corey
I figured it wasn't a bug and I just had to do the right escape sequence, but Karen mentioned that it might be a bug. Guess not. Hope this helps someone else in the future. Greg On Mon, Jun 22, 2009 at 12:19 PM, Erik Vorhes wrote: > > On Mon, Jun 22, 2009 at 12:52 PM, Greg

Re: Empty [] using objects.all() on legacy database

2009-06-22 Thread Greg Corey
Karen, the double % ( i.e. 'discount%%') worked. Is this a big enough bug that it should be reported? I'm not sure what is a bug and what is just my ignorance. Thank you sooo much for the help. Greg On Fri, Jun 19, 2009 at 8:09 PM, Greg Corey wrote: > I will try that tomorro

Re: Empty [] using objects.all() on legacy database

2009-06-19 Thread Greg Corey
I will try that tomorrow and let you know. The DB is an old Microsoft Access database that was then migrated to MySQL. It was designed by a definite novice so it has quirks, but it still pumps along. It is a DB of testing results for our small laboratory. Greg On Fri, Jun 19, 2009 at 8:00 PM, Ka

Re: apache prefork or worker? other settings

2008-03-03 Thread Corey Oordt
fixed everything. Corey On Feb 28, 2008, at 5:04 AM, Aljosa Mohorovic wrote: > > i'm interested in apache/mod_python/memcached settings for django > site. > > do you use apache prefork or worker? what configuration options work > best for you? > > please share your set

Re: Deploying django framework with site

2008-02-08 Thread Corey Oordt
oject and /site-packages on the python path. Corey On Feb 8, 2008, at 7:43 AM, Tim Sawyer wrote: > > Folks, > > Has anyone got any documentation on deploying the django framework > as part of > the site? I'm considering using django for an app at work (on > Oracl

Re: Unicode error

2008-02-06 Thread Corey Oordt
Kristian, I had a similar problem when I needed to send some ASCII emails. I have a snippet at does a translation of unicode characters to close ASCII approximations if it is helpful: http://www.djangosnippets.org/snippets/588/ Corey On Feb 5, 2008, at 3:48 PM, Kristian Øllegaard wrote

Re: how to handle django static files(css js etc) properly.the views.static.serve or apache's SetHandler None just too eerie

2008-01-23 Thread Corey Oordt
A_ROOT} ), 4. In your settings file add: import os SETTINGS_FILE_FOLDER = os.path.dirname(__file__) MEDIA_ROOT = os.path.join(SETTINGS_FILE_FOLDER, 'static') 5. I use it on all my projects so I can see the static files and modify them locally, but it seamlessly lets Apache s

Re: CSS & Media files

2008-01-16 Thread Corey Oordt
ut in: ( r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT} ), Then in the apache site config you put: Alias /static "/home/myproject/static" SetHandler None I

Re: Street address normalisation

2007-11-29 Thread Corey Oordt
I ported part of the Geo Street Address from the perl module: address_regex.py from geocode.address_dicts import * STREET_TYPE_REGEX = "|".join(STREET_TYPES.keys()) + "|" + "|".join(STREET_TYPES.values()) STATE_REGEX = "|".join(STATE_CODES.values()) DIRECTIONS_REGEX = "|".join(DIRECTI

Anyone attending the Web 2.0 Conference?

2007-04-10 Thread Corey Oordt
I see that Adrian is going to be at Web 2.0 next week. Anyone else going to be in town for a Birds of a Feather? Thanks, Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Left Joins / Inheritance / Plugins ...whatever...

2007-03-30 Thread Corey Oordt
patron = ForeignKey(Patron) auditioner = ForeignKey(Auditioner) ticketpurchase = ForeignKey(TicketPurchse) ... But these are just off the top of my head. Hope they could help. Corey On Mar 29, 2007, at Thu Mar 29, 8:35 PM, Michael Cuddy wrote: > > >

Re: Is this bug in Django

2007-01-22 Thread Corey Oordt
What exact command did you type? On Jan 22, 2007, at 5:44 AM, [EMAIL PROTECTED] wrote: > > Traceback (most recent call last): > File "manage.py", line 11, in ? > execute_manager(settings) > File > "/usr/local/lib/python2.4/site-packages/django/core/management.py", > line 1447, in execute

Re: Ho do your Django applications fit in your projects?

2007-01-16 Thread Corey Oordt
ndependent. If you post more description of your project, I'd be happy to give you some suggestions. Corey On Jan 16, 2007, at 4:56 AM, [EMAIL PROTECTED] wrote: Hi community, Been playing with Django for a while now, but I am still confused about the separation of applications wi

Re: DB caching - how does Django handle external changes to the DB

2006-10-16 Thread Corey Oordt
Stefan, In my apps I do TONS of offline processing, but an able to have users tweak things using the Admin interface. I haven't had any issues with caching or outdated data. Good luck! Corey Oordt On Oct 16, 2006, at 11:19 AM, Stefán Freyr Stefánsson wrote: > Hello. > > I h

Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread Corey Oordt
Thanks for the tip, I am using os.path.splitext() ! I think somehow the problem lies with psycopg and it's "auto-quoting" feature. I'm not sure how it figures out what needs to be quoted and what doesn't. Thanks for the help, RajeshD! Corey On Oct 12, 2006,

Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread Corey Oordt
..pdf,"submitted"='2006-10-12 12:43:24',"received"='2006-10-12 12:57:12.155 598' WHERE "id"=8 As you can see in the UPDATE statement, it is relative to the MEDIA_ROOT folder, and it is not quoted. (I don't know why it has two peri

Manually setting an ImageField gives a SQL error

2006-10-12 Thread Corey
t, ... What is the proper method to set this field? Thanks, Corey --~--~-~--~~~---~--~~ 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.c

Re: long-running process. how to do it?

2006-10-06 Thread Corey Oordt
ends. The daemonize process, full detaches itself from the spawning process so it can survive after the spawning process ends. Corey On Oct 6, 2006, at 2:39 AM, Holger Schurig wrote: > >> I wrote a daemonize method that can be called by the view to >> spawn a new process tha

Re: long-running process. how to do it?

2006-10-05 Thread Corey Oordt
I wrote a daemonize method that can be called by the view to spawn a new process that executes your code.It is part of this thread:http://groups.google.com/group/django-users/browse_frm/thread/b36f4ca10a424161/c5131410e5d548b1?lnk=gst&q=daemonize&rnum=2#c5131410e5d548b1I'm happy to give you any oth

Re: Custom Manager in a separate file gives strange error

2006-10-02 Thread Corey
Never mind, I figured it out. I put the import inside the class instead of outside the class. I need more caffeine. Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Custom Manager in a separate file gives strange error

2006-10-02 Thread Corey
error when I add the manager class to the model file. If I import the manager in the shell, and instantiate it, it works fine. Any thoughts? Thanks, Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: HTTP response-code for missing querystring?

2006-09-24 Thread Corey Oordt
I see your point. In your example, if the query string is left off, I would just show a blank form, unless there is some overriding reason that they couldn't fill in one or more of the fields. But I guess sometimes you have to deviate from the rules. Corey On Sep 22, 2006, at 3:

Re: HTTP response-code for missing querystring?

2006-09-22 Thread Corey Oordt
with that in mind, I would recommend that you show a page with empty results, such as "No results were found." Corey On Sep 22, 2006, at 9:28 AM, Gábor Farkas wrote: > > hi, > > imagine that you have a view function, that requires a parameter in > the > querystr

Re: How to correct this error?

2006-09-06 Thread Corey Oordt
clicking to get into the tables and see the collations. I don't know how to do it from the command line, as I have always used PHPMyAdmin to do it. Wish I could be of more help, Corey On Sep 6, 2006, at 4:16 AM, PythonistL wrote: > > Corey, > Thank you for your reply. > Th

Re: Restrict amount of text in a TextField form

2006-09-05 Thread Corey Oordt
cyberco: If you want to do it in the interface, you will have to use some javascript. Here is a page that shows how to do it: http://www.felgall.com/ jstip20.htm Corey On Sep 5, 2006, at 8:50 AM, cyberco wrote: > > How can I set a maximum for the amount of text a user enter

Re: How to correct this error?

2006-09-05 Thread Corey Oordt
probably will also be able to do it with the MySQL Admin tool that they have as a download. Corey On Sep 5, 2006, at 10:18 AM, PythonistL wrote: > > Thank you for the reply > I still use Django 0.91 and I could not find > django/db/backends/mysql/base.py > > I found only C:\Python23

Re: Advanced Admin Customization

2006-09-05 Thread Corey Oordt
mthorley: I think you just need to override the save() method of your model. You can do all the processing you need before it's saved. Corey On Sep 5, 2006, at 10:21 AM, mthorley wrote: > > Thanks for the tip Nate! > > Does any one know what method receives the data from

Re: Directional Many-to-many

2006-08-29 Thread Corey Oordt
Take a look at: http://www.djangoproject.com/documentation/models/m2m_and_m2o/CoreyOn Aug 29, 2006, at 12:15 PM, Siah wrote:Hello,Given this model:class Person(models.Model):    name = models.CharField(maxlength=200)    children = models.ManyToManyField('self')I can do:    FatherObj.children.add(Ch

Re: Creating new apps

2006-08-29 Thread Corey Oordt
Charles,I've always seen a Project as a Site. Although there are situations that that may not be true, for most of us, it probably is.I've seen an App as a grouping of functionality. Examples would be Blog, Forums, News, Gallery, etc.Good design practices should keep as much internal within each Ap

Re: Sending an html email

2006-08-27 Thread Corey Oordt
I've never done it before, but here are some places to look:http://code.djangoproject.com/ticket/1541http://www.rossp.org/blog/2006/jul/11/sending-e-mails-templates/CoreyOn Aug 26, 2006, at 8:59 PM, The Rem wrote:Hi,I am using the template to build the email content.  I included linksin it but the

Re: generic views for ajax ?

2006-08-26 Thread Corey Oordt
Dirk, I think that it's a great option. It doesn't advocate a specific framework or method even. AJAX views will be very similar to html views and I agree that having some generic views for AJAX is a great addition to the Django community, even if it doesn't get added to the

Re: included templates to load own objects

2006-08-25 Thread Corey Oordt
Mae, I think it may be because we're not sure of what you are asking for. I know it didn't really make sense to me when I red it the first time. What exactly are you trying to accomplish? Corey On Aug 25, 2006, at 10:35 AM, Mae wrote: > > Nobody? Is it because I asked th

Re: Multiple rows in a form

2006-08-22 Thread Corey Oordt
Stewart:Take a look at http://www.djangoproject.com/documentation/forms/ for more on creating forms, and simplifying the process.You will need to have to figure out how you want to handle the item listings. You will either have to have a static set of items or use some fancy _javascript_/DHTML to d

Re: limit_choices_to Users in a Group

2006-08-21 Thread Corey Oordt
I think you need to include django.core.exceptions And I think that the exception is ObjectDoesNotExist Corey On Aug 21, 2006, at 4:24 PM, Waylan Limberg wrote: > > I figured this out, thanks to a suggestion in another thread. It seems > I was misunderstanding something

Re: NULL for TextField

2006-08-21 Thread Corey Oordt
Why don't you: {% if form.myText.text %} My text: {{form.myText }} {% else %} No text yet. {% endif %} That will get a myText field passed in the post/get parameter. Corey On Aug 21, 2006, at 5:39 PM, cyberco wrote: > > Give

Re: Process forking issues

2006-08-21 Thread Corey Oordt
I wrote some code that might help you out: it in the thread:http://groups.google.com/group/django-users/browse_frm/thread/b36f4ca10a424161/c5131410e5d548b1Depending on how you spawn a process, it can either wait for each, or become a child process.Calling the daemonize method with the appropriate p

Re: Process forking issues

2006-08-17 Thread Corey Oordt
closing it, and then creating a new one for each query, assuming you are doing some custom querying. I wish I could be of more help... Corey On Aug 17, 2006, at 7:23 AM, tomass wrote: > > Hi Folks, > > I know this topic has been brought up a few times, but I have a > slightly

Re: showing future events only?

2006-08-16 Thread Corey Oordt
I thought a change was made in the generic date views to show only future events. It is the allow_future parameter, I believe. Corey On Aug 16, 2006, at 1:38 PM, [EMAIL PROTECTED] wrote: > > I've got an app for user events, using the generic list view to > display > them.

Re: OT: Sort messages by thread in OS X Mail

2006-08-16 Thread Corey Oordt
I was sorting by subject and it was doing an ok job. Thanks for pointing this out. I always feel stupid when there is such an obvious feature that I never noticed... Corey On Aug 15, 2006, at 10:04 PM, Sean Schertell wrote: > > Hey guys, > > I hope I'm not the only sch

Re: geographic targeting with django

2006-08-15 Thread Corey Oordt
Ian,Try: http://www.maxmind.com/app/geolitecityCoreyOn Aug 15, 2006, at 8:17 PM, Ian Holsman wrote:Hi. does anyone know of a python module/interface to allow me to determine what state a given IP# is in? (Open source preferably) -- Ian Holsman [EMAIL PROTECTED] http://VC-chat.com It's what the VC'

Re: How do I store project in subversion?

2006-08-15 Thread Corey Oordt
Don't store your .pyc in the repository. Create a settings.default.py and store it in the repository. Each user can then maintain slightly different settings On Aug 15, 2006, at 6:50 PM, alex kessinger wrote: > > I want to thank you for all your anwsers it has been very helpfull. I > also hav

Re: How do I store project in subversion?

2006-08-15 Thread Corey Oordt
I'm probably not the best person to be answering this, but I do have an internal subversion repository.If you don't have a working subversion server, follow the instructions at: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html(Since it's an internal machine, I just use basic authe

Where to put Admin functions for users?

2006-08-15 Thread Corey
the built-in admin? Thanks, Corey --~--~-~--~~~---~--~~ 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: Where to store large SQL queries code

2006-08-11 Thread Corey Oordt
One idea is to create a package that would contain files of your queries. Each file could just be have an assignment : QUERY = """ """ You could then import them, like : from queries import update_this and access it by update_this.QUERY Corey On Aug 11, 2006

Re: Searching in admin doesn't search -- returns everything

2006-08-11 Thread Corey Oordt
code-carrier route.I hope I've given you enough information, and I really hope I just made a silly mistake somewhere. :)Thanks for the attention,CoreyOn Aug 11, 2006, at 11:01 AM, Adrian Holovaty wrote:On 8/10/06, Corey <[EMAIL PROTECTED]> wrote: I have a model with several foreign keys

Re: How to log ALL queries

2006-08-11 Thread Corey Oordt
David,Not sure if this helps, but the only way I found (using postgresql) was to turn on query logging in postgresql. Then you truly see everything that is passed to the database.I'm not familiar with Oracle at all, but I'm sure it has a way to do that.Corey OordtOn Aug 11, 2006, at 8:38 AM, Hancoc

Searching in admin doesn't search -- returns everything

2006-08-10 Thread Corey
I get a programming error: FROM-clause is missing, relating to the foreign key I just removed from the search_fields. This same foreign key is in the ordering list. Thanks, Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Django developer wanted in Baltimore area

2006-08-09 Thread Corey
I've posted a job listing at: http://gypsyjobs.com/job/maryland-pennysaver/10/ It's in the Baltimore, MD area. Thanks, Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: show many2many data as comma-separated-text. fast/optimal solution?

2006-08-07 Thread Corey Oordt
re how you would add that in, but I'm sure there is a way. Otherwise raw SQL works, too. Corey On Aug 4, 2006, at 5:07 PM, gabor wrote: > > hi, > > i have a problem with a certain web-application, and wonder if someone > has an idea how to solve it the best way >

Re: Code to spawn a new, independent process

2006-08-06 Thread Corey Oordt
Martina, Mostly because I'm new to python and in my research no one mentioned it! You are right, this does look like a better fit. Live and learn! Corey On Aug 6, 2006, at 12:40 PM, oefe wrote: > > > Corey wrote: >> Hey everyone, >> >> I've seen refer

Code to spawn a new, independent process

2006-08-04 Thread Corey
putting it out there to get some further testing and hope it is useful for someone else. Usage is after the file. Corey daemonize.py: #! /usr/bin/env python import sys, os, time, tempfile from signal import SIGTERM def daemonize(stdout='/dev/null', stderr=None, stdin='/dev/null

Re: Ajax and Django example application

2006-08-04 Thread Corey Oordt
Istvan, Thanks for the code. I can't wait to dive into it. Corey On Aug 4, 2006, at 12:12 AM, Istvan Albert wrote: > > Hello All, > > For those interested here is an AJAX based demo application using > django, developed with two different javascript libraries: Prototype

Re: editable=False and "Could not find Formfield or InlineObjectCollection named ..."

2006-07-31 Thread Corey
Malcolm, Thanks for the info. By modifying the fields attribute, I meant to say that I merely added a fields attribute to the admin class. It would be nice to have disabled fields showing, but I understand that there are probably some more pressing issues. Thanks, Corey

editable=False and "Could not find Formfield or InlineObjectCollection named ..."

2006-07-30 Thread Corey
When I set editable=False in a model and modify the "fields" attribute of the Admin class, a "Could not find Formfield or InlineObjectCollection named ..." is generated. Removing the editable=False makes it work again. Is this a bug, or working as it is supposed

Re: get many from multiple levels of one-to-many relations

2006-07-19 Thread Corey Oordt
Thanks, Andy. I'll give that a try! Corey On Jul 18, 2006, at 9:35 PM, Andrew wrote: > > Here's how I did it for a similar situation I had. > > class MyCategory(models.Model): > category = models.CharField(maxlength=50) > parent_category = models.F

get many from multiple levels of one-to-many relations

2006-07-18 Thread Corey
= models.ForeignKey(Publication, null=True) class Address(models.Model): route = models.ForeignKey(Route) delivery_seq = models.IntegerField(blank=False, null=False) Given a publication object, how can I get all the Addresses that belong to it? Thanks for the help! Corey

Re: More than one ForeignKey referencing the same model?

2006-07-18 Thread Corey Oordt
Take a look at this page for a start:http://www.djangoproject.com/documentation/models/m2o_recursive2/It's for one-to-many, but it might work...CoreyOn Jul 18, 2006, at 3:20 PM, Guillaume Pratte wrote:Hello,I have an error with a model and would like to know if it is something impossible to do in D

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
Man I hate silly errors! Thanks so much Rajesh! (It happens to be my first view, the generic views got me spoiled!) Corey On Jun 22, 2006, at 9:10 PM, [EMAIL PROTECTED] wrote: > > Ah..I should've noticed this earlier, but you are missing the > mandatory > first argument

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
Nope, I get the same thing with: def select_date_for_pub(pub=None, template_name=None): But, interestingly, if I switch the arguments to: def select_date_for_pub(template_name=None, pub=None): I get the same error, but with template_name instead of pub! Any ideas? Thanks, Corey On Jun

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
Here is the view: def select_date_for_pub(pub, template_name=None): """ Given a publication code, generate a view of a calendar with dates that can be selected """ date_list = Publication.objects.get (code=pub).reservation_set.filter(pub_date__gte=datetime.dateti

Re: 'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
It doesn't happen in the view. That's the strange thing. Here is the full error:Request Method:  GETRequest URL: http://localhost:8000/reservations/pubs/42/Exception Type: TypeErrorException Value: select_date_for_pub() got multiple values for keyword argument 'pub'Exception Location: /opt/loc

'got multiple values for keyword argument' error

2006-06-22 Thread Corey Oordt
s {'template_name': 'select_date.html', 'pub': '42'} The urls.py (simplified): urlpatterns = patterns('', (r'^pubs/(?P\d{1,2})/$', 'reservations.views.select_date_for_pub',

Re: A template tag contribution

2006-06-16 Thread Corey Oordt
Thanks Malcolm,It's done and there!http://code.djangoproject.com/wiki/ColumnizeTagCoreyOn Jun 16, 2006, at 9:42 AM, Malcolm Tredinnick wrote:Hi Corey,On Fri, 2006-06-16 at 09:07 -0400, Corey Oordt wrote: I have no idea if this is the right place to post such a thing, but  in an effort to

A template tag contribution

2006-06-16 Thread Corey Oordt
I have no idea if this is the right place to post such a thing, but in an effort to give something back to the community, I would like to post a template tag I developed: Comments are appreciated, Thanks, Corey -- "Tags used b

Re: Custom template tags not loading

2006-06-15 Thread Corey Oordt
I'm going to bow my head in shame I was SURE that I put it there! Thanks for making me look ivan! Corey On Jun 15, 2006, at 5:19 PM, [EMAIL PROTECTED] wrote: > > make sure your application exists in the project's settings file

Re: Custom template tags not loading

2006-06-15 Thread Corey Oordt
, 2006, at 5:57 PM, Don Arbow wrote:On Jun 15, 2006, at 2:05 PM, Corey wrote: Hi All!I've written a custom template tag, but I get the error:'reservationtags' is not a valid tag library: Could not load templatelibrary from django.templatetags.reservationtags, No module namedreservat

Custom template tags not loading

2006-06-15 Thread Corey
Hi All! I've written a custom template tag, but I get the error: 'reservationtags' is not a valid tag library: Could not load template library from django.templatetags.reservationtags, No module named reservationtags I've looked in the archives and have tried everything I know so far: 1. templa

Re: Django on Intel mac?

2006-06-07 Thread Corey Oordt
I have MacBook, and although it was a challenge to get everything up and running, I ended up using darwinports to install apache 2, mysql 5 and python 2.4. Everything is working really well now Corey Oordt On Jun 6, 2006, at 9:36 PM, Greg Harman wrote: > > > Oliver Kiess