Re: How to access gmail

2023-08-27 Thread Carl Karsten
Assuming the question is: "How do I send mail using my gmail account?" ret = connection.send_messages([email]) https://github.com/CarlFK/veyepar/blob/master/dj/scripts/email_ab.py#L140 In my local_settings.py: EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587

google auth and context

2023-05-18 Thread Carl Karsten
; like it starts on https://veyepar.nextdayvideo.com/main/show_parameters/441/ 441 is the client.id - which would be handy to know when I get a token back. Carl Karsten -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

goog auth and context

2023-05-18 Thread Carl Karsten
it starts on https://veyepar.nextdayvideo.com/main/show_parameters/441/ 441 is the client.id - which would be handy to know when I get a token back. So I know what client this token is for. Carl Karsten -- You received this message because you are subscribed to the Google Groups "Django

named admin url w filter

2010-09-16 Thread Carl Karsten
Is there a better way to do: {% url admin:main_episode_changelist %}?show__id__exact={{show.id}} I tried: {% url admin:main_episode_changelist show__id__exact=show.id %} Caught NoReverseMatch while rendering: Reverse for 'main_episode_changelist' with arguments '()' and keyword arguments

who owns djangocon.blip.tv?

2009-09-14 Thread Carl Karsten
http://djangocon.blip.tv/ has no posts, and no contact info. Anyone know who's it is? seems like a good place to put the djangocon videos. http://django.blip.tv/ is taken too, with some odd test vids. Maybe http://ponycon.blip.tv/ ? -- Carl K

Re: offline population of django auth user table

2009-05-02 Thread Carl Karsten
On Sat, May 2, 2009 at 11:09 AM, Jeff wrote: > > I'm using Django's authentication.  I would like to add several users > through a command-line script (not through code executed via the > website).  Something like manage.py createsuperuser but for normal > users and not

extending flatpages

2008-07-03 Thread Carl Karsten
I need to add some fields to flatpage model. (like header image) is there a clean way to do this? I saw it come up before, and one comment was "model subclassing is not supported." So now that it is supported... I am going to learn that it wont help me with this problem? Carl K

Re: blankiing an ImageField

2008-06-21 Thread Carl Karsten
Amit Ramon wrote: > * Carl Karsten <[EMAIL PROTECTED]> [2008-05-25 17:25 -0500]: >> In the admin UI, is there any way to blank out a foo = >> model.ImageField(...) ? >> >> Carl K > > > foo = model.ImageFields(..., editable=False) > No. (unless

"intro to django" script -

2008-06-09 Thread Carl Karsten
I want to make a http://showmedo.com "Getting started with Django" I expect it to be about 5 min long. The goal is not show someone how to be productive, but how easy it is to get started. At most 1 min on install python, install django, make sure you can do python -c "import django" without

blankiing an ImageField

2008-05-25 Thread Carl Karsten
In the admin UI, is there any way to blank out a foo = model.ImageField(...) ? Carl K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: loaddata .. columns app_label, model are not unique

2008-05-17 Thread Carl Karsten
patch submitted: http://code.djangoproject.com/ticket/7254 Carl K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Russell Keith-Magee wrote: > On Fri, May 16, 2008 at 8:13 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Russell Keith-Magee wrote: > >>>> 2. should I leave in --debug? I really meant it for debugging, but I can >>>> see it >>>> being handy

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Russell Keith-Magee wrote: > On Fri, May 16, 2008 at 3:47 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Russell Keith-Magee wrote: >>> On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>>> Russell Keith-Magee wrote: >>&

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Just saving someone the trouble of telling me to spell multiple correctly. > make_option('-e', '--exclude', dest='exclude', action='append', > help='App to exclude (use mutiple --exclude to exclude mutiple apps).'), help='App to exclude (use multiple --exclude to exclude multiple apps).'),

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Carl Karsten wrote: > Russell Keith-Magee wrote: >> On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> Russell Keith-Magee wrote: >>>> On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> What ar

Re: MySQL Boolean vs. PostgresQL Boolean

2008-05-15 Thread Carl Karsten
Szaijan wrote: > Hi, I developed my first Django app on my mapbook using PostgreSQL and > have recently moved it to a production site which uses MySQL. > PostgreSQL stores boolean values and True and False, just like Python > and JS, while MySQL uses 1 and 0. Where are you seeing this? I think

Re: loaddata .. columns app_label, model are not unique

2008-05-15 Thread Carl Karsten
Russell Keith-Magee wrote: > On Wed, May 14, 2008 at 1:20 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Russell Keith-Magee wrote: >>> On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> What are the chances of getting a dumpdata hack t

Re: loaddata .. columns app_label, model are not unique

2008-05-13 Thread Carl Karsten
Russell Keith-Magee wrote: > On Wed, May 14, 2008 at 1:09 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED]:~/dev/sites/ridgemoor$ ./manage.py loaddata rm.json >> Installing json fixture 'rm' from absolute path. >> Problem installing fixture 'rm.json

loaddata .. columns app_label, model are not unique

2008-05-13 Thread Carl Karsten
[EMAIL PROTECTED]:~/dev/sites/ridgemoor$ ./manage.py loaddata rm.json Installing json fixture 'rm' from absolute path. Problem installing fixture 'rm.json': columns app_label, model are not unique How do I debug this? Carl K --~--~-~--~~~---~--~~ You received

Re: [Django Code] #7101: ordering ForeignKey(self) =FieldError: Infinite loop caused by ordering.

2008-04-28 Thread Carl Karsten
Malcolm Tredinnick wrote: > > On Sun, 2008-04-27 at 23:19 -0500, Carl Karsten wrote: > [...] >> order_by('parent_id') doesn't do anything for the Admin UI, which is where I >> 'need' this. > > I made a typo. It should be 'parent__id' there (double underscore). >

Re: [Django Code] #7101: ordering ForeignKey(self) =FieldError: Infinite loop caused by ordering.

2008-04-27 Thread Carl Karsten
Django Code wrote: > #7101: ordering ForeignKey(self) =FieldError: Infinite loop caused by > ordering. > -+-- > Reporter: Carl Karsten <[EMAIL PROTECTED]> |Owner: > nobody

"duplicate key" loading dumpdata

2008-03-27 Thread Carl Karsten
same code on both boxes: [EMAIL PROTECTED]:~/ridgemoor$ ../django/bin/django-admin.py dumpdata >ridgemoor.json [EMAIL PROTECTED]:~/ridgemoor$ django-admin.py loaddata ridgemoor.json Installing json fixture 'ridgemoor' from absolute path. Problem installing fixture 'ridgemoor.json': ERROR:

Re: allow user to update his record

2008-02-02 Thread Carl Karsten
Carl Karsten wrote: > Carl Karsten wrote: >> Is there a built in way for users to update their own user record? >> >> I currently have a page that displays user data to any other user. I was >> hoping >> to re-use that for allowing a user to edit his own.

Re: allow user to update his record

2008-02-01 Thread Carl Karsten
Carl Karsten wrote: > Is there a built in way for users to update their own user record? > > I currently have a page that displays user data to any other user. I was > hoping > to re-use that for allowing a user to edit his own. > > If it matters, I am useing a user

allow user to update his record

2008-01-31 Thread Carl Karsten
Is there a built in way for users to update their own user record? I currently have a page that displays user data to any other user. I was hoping to re-use that for allowing a user to edit his own. If it matters, I am useing a user_profile as described:

Re: form for display, not edit

2008-01-31 Thread Carl Karsten
[EMAIL PROTECTED] wrote: > Using SVN you could SVN use modelforms, on .96 use the form_for > helpers. but modelforms still puts everything in tags, right? Carl K > > On Jan 31, 6:34 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: >> newforms is great for creating forms.

form for display, not edit

2008-01-31 Thread Carl Karsten
newforms is great for creating forms. I need something similar to generate a display form from a model. I looked at subclassing form, but what I would need to override is in the widgets. which is probably why my hope isn't a good one. but for what I need, I only am using char fields, so I

keep children from running away

2008-01-30 Thread Carl Karsten
OK, I think my data is going away because of my choice of blank and core. Ideally, I don't care if the record stays around even if it is 100% blank. either way, this is the only case I want it deleted. If there is any data in it, I do not want to loose it. but the way I have it currently the

Re: why did admin delete my data?

2008-01-30 Thread Carl Karsten
James Bennett wrote: > On Jan 30, 2008 2:22 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> title = models.CharField("Title", core=True, max_length=80, blank=True, >> null=True) >> surname = models.CharField("Surname", max_length=65, core=T

why did admin delete my data?

2008-01-30 Thread Carl Karsten
I did this: http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ wrote a data migration.py to convert data. I browse to the django admin ui, and I can see the data. if I edit it, or not edit it, then hit Save, it deletes the User Profile record. I hit history, and

Re: Accessor clashes related field

2008-01-22 Thread Carl Karsten
Karen Tracey wrote: > On Jan 22, 2008 3:00 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: > >> # core/models.py >> from django.db import models >> from django.contrib.auth.models import User >> import ridgemoor.msg.models >> from time import

Re: differences between runserver and apache

2008-01-22 Thread Carl Karsten
Graham Dumpleton wrote: > On Jan 22, 6:18 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Carl Karsten wrote: >>> symlinks. I use them. I bet the default is for Apache not to follow them. >>> that >>> could be my problem. or at least one of them. >

Re: differences between runserver and apache

2008-01-22 Thread Carl Karsten
p back then, so not sure why you are > having trouble now. ;-) > > Graham > > On Jan 22, 6:51 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: >> On Jan 22, 6:18 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: >> >>> Carl Karsten wrote: >>>

Accessor clashes related field

2008-01-22 Thread Carl Karsten
# core/models.py from django.db import models from django.contrib.auth.models import User import ridgemoor.msg.models from time import strftime class Message(models.Model): to = models.ForeignKey(User, related_name = "messages_received") sender = models.ForeignKey(User, related_name =

Re: differences between runserver and apache

2008-01-21 Thread Carl Karsten
Carl Karsten wrote: > symlinks. I use them. I bet the default is for Apache not to follow them. > that > could be my problem. or at least one of them. > > That is enough to start a wiki page. > > I am going to divide it into rumors and confirmed rumors. Anyone have

Re: differences between runserver and apache

2008-01-21 Thread Carl Karsten
gt; PythonPath "['/home/testrmcom/django-svn/django', '/home/testrmcom', > '/home/testrmcom/ridgemoor'] + sys.path" > > Ie., to setup same path as inbuilt server, you need both the directory > the settings.py file is in and the parent of that directory. > > Graham &

Re: differences between runserver and apache

2008-01-21 Thread Carl Karsten
ys use forward slashes, even on Windows. > # Don't forget to use absolute paths, not relative paths. > ) > > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'djang

Re: differences between runserver and apache

2008-01-21 Thread Carl Karsten
James Bennett wrote: > On Jan 21, 2008 8:43 AM, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Exception Type: ViewDoesNotExist at /admin/ >> Exception Value: Tried new_message in module ridgemoor.core.views. Error was: >> 'module' object has no attribute 'ne

Re: differences between runserver and apache

2008-01-21 Thread Carl Karsten
r apache. everything (including conf files) are under svn, so I could show diffs, but I checked in about 15 or so revisions as I got this and that working. Carl K > > Graham > > On Jan 21, 6:22 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: >> I developed a s

differences between runserver and apache

2008-01-20 Thread Carl Karsten
I developed a site using ./mmanage.py runserver for testing. I try to run it under apache and it errors. I hear runserver adds things to sys.path (installed apps) and when you run from apache that doesn't happen. sure enough, I can fix it by adding things to PythonPath. Now I am having 2

postgresql create db script

2008-01-18 Thread Carl Karsten
I am trying to write a shell script that do whatever needs to be done between sudo apt-get install postgresql python-psycopg and manage.py syncdb for MySql, I use this to generate somehting I can pipe into the CLI: print """ DROP DATABASE IF EXISTS %(db)s; CREATE DATABASE %(db)s; GRANT ALL

static on separate what?

2007-12-08 Thread Carl Karsten
I this text, does "separate Web server" contingent on a 2nd box? If it is only one box, the same Apache instance would be preferred, right? http://www.djangoproject.com/documentation/modpython/ === quote === Django doesn’t serve media files itself; it leaves that job to whichever Web server

Re: design Q: where to put peoples names

2007-11-16 Thread Carl Karsten
Marty Alchin wrote: > My first question would be: Are you absolutely certain that none of > those 1000 other people will ever need a login? anything is possible. I would think at some point it isn't a good idea to use the User table. What if it was 1,000,000 names, like if I was publishing a

design Q: where to put peoples names

2007-11-16 Thread Carl Karsten
The user table has first/last name. great. I need to manage about 1500 people, and only 500 will have any need for a site login. So where should I store the 1000 names that don't need to be a user record? I can think of: Everyone gets a User record. (given this is the easiest, what

Re: query set from ModelMultipleChoice

2007-11-08 Thread Carl Karsten
Carl Karsten wrote: > This works, but there has to be a better way: > > class blastSettings(forms.Form): >users = forms.ModelMultipleChoiceField(queryset=User.objects.all() > > u=x.cleaned_data['users'] > users = User.objects.filter(id__in=[x.id for x in u]).values

query set from ModelMultipleChoice

2007-11-07 Thread Carl Karsten
: c=Context(detail) body = body_template.render(c) Carl Karsten --~--~-~--~~~---~--~~ 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@google

streaming status

2007-11-04 Thread Carl Karsten
A view has a loop - each iteration may take 3 seconds, and it will loop 20+ times, so 1 min of processing. Is there some way to dump stuff to the browser page each loop? Right now I am printing to the console, which is fine, but not cool. It's more for testing, wich will happen 100's of

Re: keeping SECRET_KEY secret

2007-11-03 Thread Carl Karsten
birkin wrote: > This issue of how to best organize private and local django settings > came up at a recent hackfest I attended. Some googling revealed > postings by Adrian and others that essentially noted that it's > reasonable to assume that different programmers will choose to handle > this

Re: keeping SECRET_KEY secret

2007-11-02 Thread Carl Karsten
Malcolm Tredinnick wrote: > On Thu, 2007-11-01 at 23:02 -0500, Carl Karsten wrote: > [...] >> Support for the local_settings file is there, I just think it should be >> changed >> from an "If it exists" to assuming it exists, and seed it with the values

Re: keeping SECRET_KEY secret

2007-11-02 Thread Carl Karsten
James Bennett wrote: > On 11/1/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> The generated settings.py contains things that are perfectly normal "source >> code" like things that should be treated as such. How does one only commit >> part >> of a

Re: keeping SECRET_KEY secret

2007-11-01 Thread Carl Karsten
James Bennett wrote: > On 11/1/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> View the whole settings file as something you don't just release >> casually and then only post the bits you feel safe doing so. That is >> absolutely normal configuration file practice. The generated settings.py

Re: keeping SECRET_KEY secret

2007-11-01 Thread Carl Karsten
James Bennett wrote: > On 11/1/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Given that some settings.py files get shared/posted/uploaded to code.google, >> etc. it seems this should not be in there by default: >> >> # Make this unique, and don't share it w

Re: MS SQL and Django - Any current info?

2007-11-01 Thread Carl Karsten
Peter Bailey wrote: > Can anyone tell me if there is any current news about MS SQL support? > I am looking at frameworks for a client, and my preference is really > to go the Django route. The plan will be to migrate over time from an > asp environment with an MS SQL back end. So basically I am

Re: keeping SECRET_KEY secret

2007-11-01 Thread Carl Karsten
Todd O'Bryan wrote: > I then point to production_settings as my DJANGO_SETTINGS_MODULE for > mod_python and the production settings overwrite the settings that I > use for production. > > Of course, the last word should be "development," not "production." Good idea. What's funny is I do

keeping SECRET_KEY secret

2007-11-01 Thread Carl Karsten
Given that some settings.py files get shared/posted/uploaded to code.google, etc. it seems this should not be in there by default: # Make this unique, and don't share it with anybody. SECRET_KEY = 'foo!' I am sure there are already a dozen or so good solutions to this problem, plus mine:

email example

2007-10-31 Thread Carl Karsten
I need to send email to a set of users. for now, let's assume all. What I have in mind: class MessageTemplate(models.Model): subject = models.CharField(maxlength=60, blank=False) body = models.TextField() User enters subject and body, hits "Save/Send" and some view code spins through

Re: ImageField via admin

2007-08-22 Thread Carl Karsten
Grigory Fateyev wrote: > Hello Carl Karsten! > On Tue, 21 Aug 2007 10:21:06 -0500 you wrote: > >> Grigory Fateyev wrote: >>> Hello Carl Karsten! >>> On Mon, 20 Aug 2007 14:07:39 -0500 you wrote: >>> >>>>> settings.py:MEDIA_ROOT = BASE

Re: ImageField via admin

2007-08-21 Thread Carl Karsten
Grigory Fateyev wrote: > Hello Carl Karsten! > On Mon, 20 Aug 2007 14:07:39 -0500 you wrote: > >>> settings.py:MEDIA_ROOT = BASE_DIR+'/media/' >>> settings.py:MEDIA_URL = '/site_media/' >>> urls.py:(r'^site_media/(?P.*)$', >>>

Re: ImageField via admin

2007-08-20 Thread Carl Karsten
Grigory Fateyev wrote: > Hello Carl Karsten! > On Sun, 19 Aug 2007 21:39:31 -0500 you wrote: > >> Grigory Fateyev wrote: >>> Hello! >>> >>> I have simple class with ImageField, but cann't add any object: >>> >>> class Book(models.Model)

Re: ImageField via admin

2007-08-19 Thread Carl Karsten
Grigory Fateyev wrote: > Hello! > > I have simple class with ImageField, but cann't add any object: > > class Book(models.Model): > name = models.CharField(_('Book Title'), maxlength=200) > book_number = models.IntegerField() > image = models.ImageField(upload_to='%Y/%m/%d/',

Re: Filter on related model problem...

2007-08-14 Thread Carl Karsten
Collin Grady wrote: > Regroup generates a list of dicts with two keys - grouper (the value > of the field you're grouping by) and list (the list of objects that > match that) > > So in this case, you get entries like {'grouper': , > 'list': [, , ...]} :) > > why is it call regroup and not

Re: Access db module

2007-08-14 Thread Carl Karsten
Tim Chase wrote: >> Someone wants to create a browser UI for an access db. can't change the db, >> even though A) access can talk to other engines via odbc and B) it will cost >> someone else more. >> >> python does odbc, there is already a MsSql_oledb for django module, so all I >> need to

Re: Access db module

2007-08-14 Thread Carl Karsten
arter.me.uk/computing/python/ado.html > > Graham > > Carl Karsten wrote: >> Someone wants to create a browser UI for an access db. can't change the db, >> even though A) access can talk to other engines via odbc and B) it will cost >> someone else more. >

Re: Filter on related model problem...

2007-08-13 Thread Carl Karsten
Collin Grady wrote: > view: > > poems = > Poem.objects.filter(approved=True).select_related().order_by('auth_user.username') > > template: > > {% regroup poems by user as grouped %} > {% for group in grouped %} > {{ group.grouper }} > {% for poem in group.list %} > {{ poem.title }} > {% endfor

Re: SQL problem : how to use id thats autoincremented in statement

2007-08-13 Thread Carl Karsten
[EMAIL PROTECTED] wrote: > hi all, > > i have a problem with the current project i am working on.actual thr's > a table X with a field ID(autoincrement) and a field named HASH.which > is md5 of the id.now should i have to make two queries ..first one to > find out whats going to be next id and

Re: Proper way to extend contrib.auth

2007-08-13 Thread Carl Karsten
Grégoire wrote: > Hello, > > I would like to extend some functionnalities of contrib.auth, > especially in the User model. > > The objective is to do something clean without hacking django's source > code. My first idea was to create a new auth application (e.g. myauth) > and create a new User

Re: Best Practices to Make your Apps Portable

2007-07-26 Thread Carl Karsten
Sebastian Macias wrote: > Thanks a lot for the feedback everyone. > > I have come up a perfect setup and folder structure (at least > perfect for my needs) that will allow me to work on generic apps and > project specific apps efficiently and just wanted to share it with > everyone in case it

Re: There's got to be a better way

2007-07-26 Thread Carl Karsten
Tim Chase wrote: >> In my view, I have: >> future_events = Event.objects.filter(start_date__gte=now) >> pacific_events = future_events.filter(club__region='Pacific') >> rocky_mountain_events = future_events.filter(club__region='Rocky >> Mountain') >> southwest_events =

Re: from settings import *, non-django python script Error

2007-07-24 Thread Carl Karsten
johnny wrote: > import re > from BeautifulSoup import BeautifulSoup > import urllib2 > from os import environ > #from settings import * > > def myfunction() : > > environ['DJANGO_SETTINGS_MODULE'] = "mysite.settings" > from settings import * > > I get an error: > myscript.py:22:

Re: share users across django projects?

2007-07-24 Thread Carl Karsten
hotani wrote: > I'm about to build a new project using django that will have the same > users as a previous project. I would like to avoid duplicating the > existing user table. Is there a way to authenticate into the new > project with the current user list? The users are in the db. Unless you

Re: Advertisement Management

2007-07-22 Thread Carl Karsten
Steve wrote: > Does anybody know about a publicly available ad management program > written using Django that I could easily drop into my project? If > there isn't one, I could always write my own, but if there's one > already started I'd rather not reinvent the wheel. > The "drop into my

Re: i18n on win 32 : make_message.py doesn't find anything to translate

2007-07-22 Thread Carl Karsten
olivier wrote: > Hi Carl, > > Actually, it seems like the header stripping on line 122 of make- > message.py is too aggressive and removes all lines of the output of > xgettext. > > I replaced : > > msgs = '\n'.join(dropwhile(len, > msgs.split('\n'))) > > by: > >

Re: i18n on win 32 : make_message.py doesn't find anything to translate

2007-07-21 Thread Carl Karsten
olivier wrote: > Hi group, > > I'm running Windows XP, django from the trunk, pyhon 2.5.1. > As recommended here [1], I run gettext natively (not Cygwin), using > gettext for win32 [2]. > My templates, my python source files and my settings are all made by > the book. > > Nevertheless,

Re: Can Django call cscript.exe to run vbscripts

2007-07-21 Thread Carl Karsten
You might want to describe the current problem you need to solve. good chance it will be easier to solve using a few lines of python/django than trying to run your existing vbscript. Carl K braveheart wrote: > Anyone else have other solution ? > > On Jul 20, 8:54 pm, Dennis Allison <[EMAIL

Re: 4 beginner's questions

2007-07-19 Thread Carl Karsten
Stefan Matthias Aust wrote: > Carl, Jeremy, > > Thanks for your answers. > > Carl wrote: > >> I just made this. it should answer most of 1 and 2. >> http://code.djangoproject.com/wiki/DatabaseReset > > Somehow, it seems to me that there should be a standard utility > function to initialize

Re: 4 beginner's questions

2007-07-19 Thread Carl Karsten
Stefan Matthias Aust wrote: > Hi, > > Coming from a Java background, I introduced Django in my company for a > new web application. So far, we made great progress and web > development suddenly was fun again. Unfortunately, it feels like all > time I save because of Django, is spent on searching

Re: Menu implementation

2007-07-18 Thread Carl Karsten
Lic. José M. Rodriguez Bacallao wrote: > Have anybody implemented a tree with django, for example, a menu? > tree = ui or data structurer? (guessing the answer is yes to both) Carl K --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: model managers of base classes

2007-07-17 Thread Carl Karsten
it is >> not a priority. I think, with that requirements, pure pythonic class >> inheritance is just fine. It gives a single table for each model, >> which sounds quite natural. >> >> For the side effect, as Carl has pointed out, as long as you don't put >> "ortho&

Re: model managers of base classes

2007-07-17 Thread Carl Karsten
Nis Jørgensen wrote: > omat skrev: >> Thanks for the pointer, Nis. >> >> Model inheritance made my models so much DRYer that it will be hard to >> give up, at least psychologically... >> >> And, except for the managers, it worked just as I would expect, and >> for the managers, it was easy to

win install problem

2007-07-16 Thread Carl Karsten
test\\LOCALS~1\\Temp' TMP u'C:\\DOCUME~1\\test\\LOCALS~1\\Temp' USERDOMAIN u'TESTXP' USERNAME u'test' USERPROFILE u'C:\\Documents and Settings\\test' WINDIR u'C:\\WINDOWS' wsgi.errors ', mode 'w' at 0x0096F0B0> wsgi.file_wrapper wsgi.input wsgi.multiprocess False ws

Re: method as view

2007-07-15 Thread Carl Karsten
Forest Bond wrote: > On Sun, Jul 15, 2007 at 02:59:57PM -0500, Carl Karsten wrote: >> How can I use a method as a view? (so that I can subclass and extend later.) >> >> foo works, the other 2 give errors: >> >> # msg/urls.py >> from django.conf.urls.defa

method as view

2007-07-15 Thread Carl Karsten
How can I use a method as a view? (so that I can subclass and extend later.) foo works, the other 2 give errors: # msg/urls.py from django.conf.urls.defaults import * urlpatterns = patterns('msg.views', (r'^detail/(?P[-\w]+)/$', 'foo'), (r'^detail/x/(?P[-\w]+)/$',

Re: is there any host servers that supports Django based sites?

2007-07-15 Thread Carl Karsten
Michael wrote: > > > On 15 יולי, 17:18, Michael <[EMAIL PROTECTED]> wrote: >> .: >> Webfaction django hosting rocks. >> can I get a link to Webfaction? > > ok, I think I found it by myself > http://www.webfaction.com/shared_hosting > > so, as I understand, the best strategy is to

Re: model subclassing

2007-07-14 Thread Carl Karsten
Malcolm Tredinnick wrote: > On Fri, 2007-07-13 at 21:31 -0500, Carl Karsten wrote: >> I am experimenting with subclassing a model. The parent class will be an >> abstract class that does not get 'managed' by django. Only the subclass >> will, >> and t

Re: Database setup

2007-07-14 Thread Carl Karsten
surfwizz wrote: > I'm trying to do the django tutorial at > http://www.djangoproject.com/documentation/tutorial01/, > but I don't know how to set up a database. I do not have a dedicated > server or web hosting at this time, and I want to do some work on > setting up a website with database

Re: installation issues

2007-07-14 Thread Carl Karsten
distutils.sysconfig import > get_python_lib; print get_python_lib()" > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- > packages > > > On Jul 13, 6:49 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: >> you missed the -c >> >> guessin

model subclassing

2007-07-13 Thread Carl Karsten
c=\\E[6;2~:%e=\\E[5;2~:%i=\\E[1;2C:kh=\\E[1~:@1=\\E[1~:\\\n\t:kH=\\E[4~:@7=\\E[4~:kN=\\E[6~:kP=\\E[5~:kI=\\E[2~:kD=\\E[3~:\\\n\t:ku=\\EOA:kd=\\EOB:kr=\\EOC:kl=\\EOD:km:' TZ u'America/Chicago' USER u'carl' WINDOW u'0' _ u'/usr/bin/screen' wsgi.errors ', mode 'w' at 0xb7d

Re: installation issues

2007-07-13 Thread Carl Karsten
wdavis$ > > > On Jul 13, 6:16 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: >> run this command, show us what you get: >> python -c "from distutils.sysconfig import get_python_lib; print >> get_python_lib()" >> >> So like this: >&g

Re: installation issues

2007-07-13 Thread Carl Karsten
run this command, show us what you get: python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" So like this: [EMAIL PROTECTED]:~$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" /usr/lib/python2.5/site-packages Carl K surfwizz

Re: new django site: PotterPredictions.com

2007-07-11 Thread Carl Karsten
Kai Kuehne wrote: > Well, I meant without to register myself on the site. in case it isn't crystal clear: http://www.codinghorror.com/blog/archives/000881.html "Removing The Login Barrier" Carl K --~--~-~--~~~---~--~~ You received this message because you are

Re: avoiding 'matching query not exist'

2007-07-11 Thread Carl Karsten
James Bennett wrote: > On 7/11/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> How can I do something similar with: >> coursestatus = Event.objects.filter( >>eventtype__eventcode='corsecond', >>eventdate__lt = datetime.now() >>

avoiding 'matching query not exist'

2007-07-11 Thread Carl Karsten
This deals with empty sets: dinner_special = Event.objects.filter( eventtype__eventcode='restspec', eventdate = datetime.now() ) Today's Dinner Secials: {% if dinner_special %} {{ dinner_special.0.title }}{{ dinner_special.0.description }} {% else %}

Re: installation issues

2007-07-10 Thread Carl Karsten
surfwizz wrote: > I am having trouble installing Django on Mac OSX 10.4.10. Any help > would be welcome. Thanks! > > Im gona take a shot: Can you run python and get a >>> prompt? If yes, what version is it? and what happens when you >>> import django Carl K

Re: ForeignKey(User, list_display=full?

2007-07-10 Thread Carl Karsten
Russell Keith-Magee wrote: > On 7/11/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > >> I am hoping to do something like >> contact = models.ForeignKey(User, list_display = ('first_name', 'last_name') >> ) > > A big -1 on this idea. This mixes the da

ForeignKey(User, list_display=full?

2007-07-10 Thread Carl Karsten
I am using the django User like so: # models.py from django.contrib.auth.models import User class Event(models.Model): title = models.CharField(maxlength=47) eventdate = models.DateField() contact = models.ForeignKey(User, null=True, blank=True ) right now I get this in admin:

Re: effective dates

2007-07-10 Thread Carl Karsten
Tim Chase wrote: >> status.effectivedate is when a status 'starts', (like closed for repairs.) >> How do I get the 'current status based on current date' ? >> >> so if the following 3 records are in the table: >> status >> effective date, description >> 1/1/2007 - open for business >> 3/24/2007 -

effective dates

2007-07-10 Thread Carl Karsten
status.effectivedate is when a status 'starts', (like closed for repairs.) How do I get the 'current status based on current date' ? so if the following 3 records are in the table: status effective date, description 1/1/2007 - open for business 3/24/2007 - closed for remodeling 5/1/2007 - open

Re: dump an object

2007-07-09 Thread Carl Karsten
Jeremy Dunck wrote: > On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> Right look, wrong source. My {{object}} is the results of a calendar display >> with a bunch of these: http://dell29:8000/eventcal/detail/600/ > > I seriously doubt "dell29:8000&

Re: bug in unique_for_year with 0.96?

2007-07-09 Thread Carl Karsten
Filippo Santovito wrote: > I'm trying to use unique_for_year but it seems the Admin simply > ignores this constraint: > i'm using this model for testing and I'm able to add two entry with > the same date: > > class MyModel(models.Model): > class Admin: > pass >

Re: faking request path

2007-07-09 Thread Carl Karsten
[EMAIL PROTECTED] wrote: > Hello all! > > Is there an easy way to fake the request path in django and/or pyton? > I'm looking for something like this: > a django page which is called with this URL: > http://www.test.ch/test1/test2/test3 > should thinks it is run in the top-folder that means:

  1   2   >