Re: how to select posts in this situation?

2007-09-03 Thread [EMAIL PROTECTED]
your code is absolutely fantastic, thx very much! On 9月4日, 上午12时18分, "Jonathan Buchanan" <[EMAIL PROTECTED]> wrote: > On 9/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > there are many users and submit many posts, user1, user2,user3 etc. > > are my friends, now i want to select all

Re: How to add a non database item to a python model

2007-09-03 Thread Alex Koshelev
http://www.djangoproject.com/documentation/models/custom_methods/ On 4 сент, 07:21, shabda <[EMAIL PROTECTED]> wrote: > I have a python model > > class MyModel(models.Model): > fld1 = models.TextField() > fld1 = models.TextField() > > I want to have a non database item in this mod

Re: Does the django admin support the Group?

2007-09-03 Thread BearXu
Thanks:) 2007/9/4, Greg Donald <[EMAIL PROTECTED]>: > > > On Tue, Sep 04, 2007 at 04:56:47AM -, Bear wrote: > > For instance, Group A can access all the tables but Group B just > > access some of them? > > http://www.djangobook.com/en/beta/chapter06/ > > There's a small section "Users, groups,

Re: Does the django admin support the Group?

2007-09-03 Thread Greg Donald
On Tue, Sep 04, 2007 at 04:56:47AM -, Bear wrote: > For instance, Group A can access all the tables but Group B just > access some of them? http://www.djangobook.com/en/beta/chapter06/ There's a small section "Users, groups, and permissions", about halfway down the page. -- Greg Donald C

Re: Help needed with forms (newbie)

2007-09-03 Thread Russell Keith-Magee
On 9/4/07, AniNair <[EMAIL PROTECTED]> wrote: > > Hi... > This might be incredibly simple. BUT.. I am trying to learn python > and django and have been trying to do some form submission (entering a > data on one page and accessing it).. I cannot find a way to do that > using django... Can anyone

Help needed with forms (newbie)

2007-09-03 Thread AniNair
Hi... This might be incredibly simple. BUT.. I am trying to learn python and django and have been trying to do some form submission (entering a data on one page and accessing it).. I cannot find a way to do that using django... Can anyone suggest the way or some help docs in this matter? The djan

Does the django admin support the Group?

2007-09-03 Thread Bear
For instance, Group A can access all the tables but Group B just access some of them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: How to add a non database item to a python model

2007-09-03 Thread Ben Ford
If you want to add things to an instance in a view you could just use setattr. Is this what you're asking? Ben On 04/09/07, shabda <[EMAIL PROTECTED]> wrote: > > > I have a python model > > class MyModel(models.Model): > fld1 = models.TextField() > fld1 = models.TextField() > > I w

Re: How to use Django with 2 legacy databases

2007-09-03 Thread Ben Ford
Hi there, I use multiple-db-support extensively, and I've also bought it relatively up to date. There are still a few problems with getting the updates into the django repo, and to be honest I've been so busy lately that I haven't really had time to follow up on that. Another thing to consider, whi

How to add a non database item to a python model

2007-09-03 Thread shabda
I have a python model class MyModel(models.Model): fld1 = models.TextField() fld1 = models.TextField() I want to have a non database item in this model class, which I can populate in the views. What is the recommended way to do this. --~--~-~--~~~---

MultiValueDict and cache

2007-09-03 Thread Doug B
This is long, but my primary question is "How the heck do I save a picklable copy of POST data, specifically to cache it for use in a inclusion tag, without manually extracting the data into a normal dict?" My tag has a form that posts to a single view that may not be the current one. I want the

Re: .latest() view not showing latest entry

2007-09-03 Thread synthrabbit
> To work around the "problem" (it's an evaluation-timing thing, so > Python/Django is doing the "right" thing...just not what you > expected), you need to simply pass Page.objects to your dict as, > say "objects". Then, in your view template, you need to > reference "objects.latest.slug" which w

Re: Parents and Childrens in the same table

2007-09-03 Thread qwerty
Thanks! 2007/9/3, Ramiro Morales <[EMAIL PROTECTED]>: > > > On 9/3/07, qwerty <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I've a category table, where a category can be related as a "child" to > > another, and a "parent" to others. > > > > Is there any django-way of doing this, where I've methods l

Re: Parents and Childrens in the same table

2007-09-03 Thread Ramiro Morales
On 9/3/07, qwerty <[EMAIL PROTECTED]> wrote: > Hi, > > I've a category table, where a category can be related as a "child" to > another, and a "parent" to others. > > Is there any django-way of doing this, where I've methods like > modelinstance.childrens () and modelinstance.parent()? > There is

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Catalyst
On Sep 3, 8:37 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Yes you can try to play with custom template tags or with context > processorshttp://www.djangoproject.com/documentation/templates_python/#subclass... OK, excellent. Thanks for your help Alex, much appreciated. --~--~-

Re: How to use Django with 2 legacy databases

2007-09-03 Thread Russell Keith-Magee
On 9/4/07, nubis <[EMAIL PROTECTED]> wrote: > > Hi all, I think I got this wrong, are you saying that: > > Django supports connecting to several databases at the same time? > Where do you configure each database connection? how do you tell a > model which one to use? I think the original responde

Unable to connect to SQLite db in tutorial

2007-09-03 Thread eoc
Hello- First of all, this is on OS X and Python 2.4. I'm able to import django, and import pysqlite2 from the python command line, and create a project and start a server. But I'm unable to proceed with doing a syncdb - My settings.py has 'sqlite3' as the DATABASE_ENGINE and a path of '/pythondev

Re: .latest() view not showing latest entry

2007-09-03 Thread Tim Chase
> particular table. I've got it working like this in my urls.py: > > latest_info_dict = { > 'queryset': Page.objects.all(), > 'slug': Page.objects.latest().slug, > } At this point, your urls.py has a semi-static dict in it...most importantly, latest_info_dict['slug'] is set to a consta

Re: .latest() view not showing latest entry

2007-09-03 Thread James Bennett
On 9/3/07, synthrabbit <[EMAIL PROTECTED]> wrote: > latest_info_dict = { > 'queryset': Page.objects.all(), > 'slug': Page.objects.latest().slug, > } The bit which calls latest() here is evaluated exactly once: when your URLs module is first loaded into memory. Hence, whichever object is t

Parents and Childrens in the same table

2007-09-03 Thread qwerty
Hi, I've a category table, where a category can be related as a "child" to another, and a "parent" to others. Is there any django-way of doing this, where I've methods like modelinstance.childrens() and modelinstance.parent()? Thanks, Angel --~--~-~--~~~---~--~~

Re: How to use Django with 2 legacy databases

2007-09-03 Thread nubis
Hi all, I think I got this wrong, are you saying that: Django supports connecting to several databases at the same time? Where do you configure each database connection? how do you tell a model which one to use? maybe I got it all wrong best regards nubis :) On Sep 3, 2007, at 8:38 PM,

.latest() view not showing latest entry

2007-09-03 Thread synthrabbit
I'm trying to create a view that shows the 1 most recent entry in a particular table. I've got it working like this in my urls.py: latest_info_dict = { 'queryset': Page.objects.all(), 'slug': Page.objects.latest().slug, } urlpatterns = patterns('', (r'^$', 'django.views.generic.list_

Re: How to use Django with 2 legacy databases

2007-09-03 Thread Iapain
> We have a customer management application written in Zope2 which talks > to a sql-ledger database. I'd like to convert this to Django but > would need to talk to two separate postgres databases. Not a problem with Django, multiple dbs are supported > Can I get some comments on the practicalit

How to use Django with 2 legacy databases

2007-09-03 Thread neillc
I'm an absolute newbie, with a newbie question. We have a customer management application written in Zope2 which talks to a sql-ledger database. I'd like to convert this to Django but would need to talk to two separate postgres databases. Can I get some comments on the practicality of this? I'm

Re: Calling User data from within templates

2007-09-03 Thread Alex Koshelev
Yes. You have to use RequestContext. If you don't use it django will not execute context processors and user variable never be passed into context On 4 сент, 00:41, Robert <[EMAIL PROTECTED]> wrote: > I'm not sure that requestContext was what i needed... I need simply to > be able to get user dat

Re: Calling User data from within templates

2007-09-03 Thread Robert
I'm not sure that requestContext was what i needed... I need simply to be able to get user data from inside my base template... the django tutorial says that you should by default, be able to do so, but I'm finding this to not be the case. Do you have any other ideas as to why it's not working for

Re: Calling User data from within templates

2007-09-03 Thread eXt
On 3 Wrz, 21:50, Robert <[EMAIL PROTECTED]> wrote: > Shouldn't that automatically be "Turned on"? You're right here., it's turned on by default. > How can I check to see if > it is, and if it's not, how can I install it? You can always check this setting (and other too) in: django.conf.global-set

Re: Calling User data from within templates

2007-09-03 Thread Robert
Shouldn't that automatically be "Turned on"? How can I check to see if it is, and if it's not, how can I install it? Thanks, sorry for such a dumb question -Robert On Sep 3, 2:20 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Check your TEMPLATE_CONTEXT_PROCESSOR setting. auth TCP must be > insta

Re: Help installing Psycopg2 and/or MySQL-python on OS X

2007-09-03 Thread jfagnani
I used to install and compile all my components by hand, but I recently switched to using MacPorts, and I highly recommend it. I installed everything: Apache 2, MySQL, Python 2.5, mod_python, py- mysql from macports and it just works together. Macports has a psycopg2 package. On Sep 2, 4:04 pm,

Re: Calling User data from within templates

2007-09-03 Thread Alex Koshelev
Check your TEMPLATE_CONTEXT_PROCESSOR setting. auth TCP must be installed http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-auth On 3 сент, 22:33, Robert <[EMAIL PROTECTED]> wrote: > Hi all, I'm new to Django and python in general, so please overlook my >

Storing Lookup Data

2007-09-03 Thread Lee Hinde
This may be more a database question than a Django question, but... How do you store lookup data? By this I mean the data that might populate a pick list. Like, a list of states or counties or person prefixes. Or medal choices in a competition. It seems to be between a single table per choice. i

Re: newsform question

2007-09-03 Thread Doug B
I think what you want is the newforms 'prefix' option. I can't seem to find it in the docs though, so here is an example. It seems a little strange to be saving forms in the session, and I can't see how your quantity updates can happen if you don't access POST in the update_quantity view at all.

Calling User data from within templates

2007-09-03 Thread Robert
Hi all, I'm new to Django and python in general, so please overlook my faulty nomenclature, and if something isn't quite clear, please let me know. I'm working with a project that needs to use user data as part of the template. In a "base.html" file (the base template, I suppose), when I try to ac

Re: so wierd problem?

2007-09-03 Thread jake
hi kevin - it sounds like your PythonPath is not being set properly in your project's apache configuration. there are some instructions about that here: http://www.djangoproject.com/documentation/modpython/#basic-configuration -jake [EMAIL PROTECTED] wrote: > i used the development server to t

Re: using defaultdict on django

2007-09-03 Thread Aidas Bendoraitis
Try iterating through the keys only and get the values from the dictionary or multi-value dictionary by the keys: items = # ... your custom dict or request.POST for k in items: v = items[k] # should be a string instead of a list with one value # ... do whatever you want to do with the k

Re: how to select posts in this situation?

2007-09-03 Thread Jonathan Buchanan
On 9/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > there are many users and submit many posts, user1, user2,user3 etc. > are my friends, now i want to select all posts which submitted by my > friends? > can somebody gelp me, thx! Try this: Post.objects.filter(user__in=[user1, user2

Re: how to select posts in this situation?

2007-09-03 Thread Alex Koshelev
Something like this: from django.db.models import Q import operator query_set = Post.objects.all() users = [ Q( user = user) for user in [ user1, user2, user3 ] ] query_set = query_set.filter( reduce(operator.or_, users ) ) --~--~-~--~~~---~--~~ You received this

how to select posts in this situation?

2007-09-03 Thread [EMAIL PROTECTED]
there are many users and submit many posts, user1, user2,user3 etc. are my friends, now i want to select all posts which submitted by my friends? can somebody gelp me, thx! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: so wierd problem?

2007-09-03 Thread [EMAIL PROTECTED]
thx Graham. and this is key point: PythonPath "['/path/to/parent','/path/to/parent/mysite1'] +sys.path" On 9月3日, 下午6时50分, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > See: > > http://code.djangoproject.com/ticket/5299 > > and the reference mailing list thread. > > If you do not reference thro

Re: Look at my city!

2007-09-03 Thread David Larlet
2007/9/3, Sylvain <[EMAIL PROTECTED]>: > > Hi everyone! > > I've just created my city, in France. > You can visit it here : > http://val-daxance.miniville.fr/ > > Let you be welcome in Val d'Axance! > > The Mayor, > Sylvain > For english users, sorry for the noise. Sylvain, ces liens à boulets n

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Alex Koshelev
Yes you can try to play with custom template tags or with context processors http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Signals Question - Firing off an email after a save

2007-09-03 Thread Jeremy Dunck
On 9/3/07, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > save() is method, so it must get at least one parameter - self. > def save( self ): >... Sorry, I was sloppy. :-/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: How to convert a Django model item to the underlying python object

2007-09-03 Thread Jeremy Dunck
On 9/3/07, shabda <[EMAIL PROTECTED]> wrote: > > I need to convert a models.datefield to a python type. How can I do > this. In general what is the way to convert the django model data type > to a pure python data type? I'm not sure what you're asking here. If your model is like this: class You

Re: How to convert a Django model item to the underlying python object

2007-09-03 Thread Alex Koshelev
Each field class has to_python() method: class MyModel( models.Model ): date = models.DateField() # field = MyModel._meta.get_field( "date" ) date_obj = field.to_python( "2007-09-03" )#date_obj is python Date instance --~--~-~--~~~---~--~~ You received

Look at my city!

2007-09-03 Thread Sylvain
Hi everyone! I've just created my city, in France. You can visit it here : http://val-daxance.miniville.fr/ Let you be welcome in Val d'Axance! The Mayor, Sylvain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Look at my city!

2007-09-03 Thread Sylvain
Hi everyone! I've just created my city, in France. You can visit it here : http://val-daxance.miniville.fr/ Let you be welcome in Val d'Axance! The Mayor, Sylvain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

How to convert a Django model item to the underlying python object

2007-09-03 Thread shabda
I need to convert a models.datefield to a python type. How can I do this. In general what is the way to convert the django model data type to a pure python data type? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Strange encoding behavior

2007-09-03 Thread Michael Radziej
On Fri, Aug 31, Anderson Santos wrote: > > Ahhh, finally! Fine! > > Thank you very much, it worked now =D > I didn't know about the __unicode__ trick Well, the unicode documentation is dense to read, so one shouldn't rush through it. But it contains also this trick: http://www.djangoprojec

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Andrey Khavryuchenko
C> I'm curious, is there a way to do this without regenerating all of C> the code inside of the views.py file? C> I've been reading about setting up templatetags, would this work for C> what I want to do, and if so would it be better? Regenerating? The polls or latest_poll_list should some

Re: alternative to model inheritance?

2007-09-03 Thread [EMAIL PROTECTED]
Overriding your save() Method may help. Insted of having to manually define a "Project" everytime, you could let it be created everytime a new Instance of "...project" is created. i also would change the "type" Field to a CharField. Then the save() Method can also set the Type of Depending Class

task-distribution and multiple clients...

2007-09-03 Thread Bram - Smartelectronix
Hello Everyone, I have some tasks (in my case songs that need "rendering") which are executed on various amazon EC2 machines. I need to distribute each task to one machine only and make sure there's no concurrent rendering. I tried this: @transaction.commit_manually def get_song_to_process(

using querysets to populate a form

2007-09-03 Thread David Reynolds
Hi, I have a requirement to use querysets as choices in various elements of a form, and as the data grows this is clearly going to have a big hit on the database every time this form is loaded. Can anyone think of a way around this? Is there a way to cache the query set and only update

Re: so wierd problem?

2007-09-03 Thread Graham Dumpleton
See: http://code.djangoproject.com/ticket/5299 and the reference mailing list thread. If you do not reference through the site name, you need to add the directory for the site to PythonPath. Graham On Sep 3, 6:14 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > i used the development se

Re: alternative to model inheritance?

2007-09-03 Thread Doug
I guess my issue is that I only want to have to enter the project once. I don't want to create a Project and then have to create a StudentProject and link them via a foreign key. I'm having trouble visualizing how this would look/work in the admin. Ideally, I would have a select box that asked for

Re: alternative to model inheritance?

2007-09-03 Thread Stefan Rimaila
I don't think you need to create this kind of inheritance, but instead, you could create projects with ForeignKeys that point to a certain project type. This would of course then require some additional tweaking or customising on your models (such as the client, discipline, etc.), as Django, IIRC

alternative to model inheritance?

2007-09-03 Thread Doug
I m creating new models for a portfolio application. I am creating a Project class and one of the fieldsof this class will be "type". There will be four types of Projects: Student, Professional, Competition, Personal. Each of these types will share most fields but some types will have addtional fi

Re: Django & postgresql schemata

2007-09-03 Thread eXt
On 3 Wrz, 10:53, "Giuseppe Ciotta" <[EMAIL PROTECTED]> wrote: > Does Django support postgresql schema different from the default (public)? You may find this ticket useful: http://code.djangoproject.com/ticket/1051 regards Jakub Wiśniowski --~--~-~--~~~---~--~~ Y

Re: django checkout doesn't work..

2007-09-03 Thread Nis Jørgensen
Devi skrev: > Hi, > > I was trying to get the developement version of django and that > doesn't work by this.. > svn co http://code.djangoproject.com/svn/django/trunk/ > What happens when you run that command? "Does not work" is not very specific ... > I'm able to see the files in the browser

Re: send_mail error with a dot in the email-address

2007-09-03 Thread patrickk
ok, this is not displayed correctly. send_mail works, if there´s no "dot" before the "@". otherwise it throws an error. On 3 Sep., 11:02, patrickk <[EMAIL PROTECTED]> wrote: > it´s strange, but registering on our site with "[EMAIL PROTECTED]" works > while "[EMAIL PROTECTED]" doesn´t. > the error

Re: Django & postgresql schemata

2007-09-03 Thread James Bennett
On 9/3/07, Giuseppe Ciotta <[EMAIL PROTECTED]> wrote: > Does Django support postgresql schema different from the default (public)? No. Patches would be welcome. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~--

Re: django checkout doesn't work..

2007-09-03 Thread James Bennett
On 9/3/07, Devi <[EMAIL PROTECTED]> wrote: > I was trying to get the developement version of django and that > doesn't work by this.. > svn co http://code.djangoproject.com/svn/django/trunk/ > > I'm able to see the files in the browser. Any ideas of what can be > done? Without knowing what sort

send_mail error with a dot in the email-address

2007-09-03 Thread patrickk
it´s strange, but registering on our site with "[EMAIL PROTECTED]" works while "[EMAIL PROTECTED]" doesn´t. the error is, that this mailbox doesn´t exist. is that django-related or do I have to check something else? thanks, patrick --~--~-~--~~~---~--~~ You rece

Re: Django & postgresql schemata

2007-09-03 Thread Giuseppe Ciotta
> class Box(models.Model): > serial = models.CharField(max_length=25, primary_key=True) > > class Meta: > db_table = u'boxes.box' > verbose_name_plural = "Boxes" Well, I should add that inspecting the raw sql reveals that django is using this kind of query: 'select field

Django & postgresql schemata

2007-09-03 Thread Giuseppe Ciotta
Does Django support postgresql schema different from the default (public)? I'm interfacing with a legacy database, using this model definition: class Box(models.Model): serial = models.CharField(max_length=25, primary_key=True) class Meta: db_table = u'boxes.box' verbose

django checkout doesn't work..

2007-09-03 Thread Devi
Hi, I was trying to get the developement version of django and that doesn't work by this.. svn co http://code.djangoproject.com/svn/django/trunk/ I'm able to see the files in the browser. Any ideas of what can be done? Thanks, Devi --~--~-~--~~~---~--~~ You re

Re: Another UnicodeError: django-registration or send_mail

2007-09-03 Thread patrickk
sh**, that´s embarrassing. thanks for the answer. On Sep 3, 4:08 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/2/07, patrickk <[EMAIL PROTECTED]> wrote: > > > I´m using django-registration and changed line 80 of models.py from > > subject = "Account activation for %s" % current_domain >

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Catalyst
On Sep 3, 1:10 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > In list_events view you have to pass your polls list into context to. > > ... > from mysite.polls.models import Poll > ... > def list_events(request): > latest_event_list = Event.objects.all() > latest_poll_list = Poll.objects

Re: markdown issue

2007-09-03 Thread [EMAIL PROTECTED]
it is ok now, thx Tim On 9月3日, 上午6时29分, Tim Chase <[EMAIL PROTECTED]> wrote: > > but this is the same as enter twice, user must remember to end with > > one or more space. > > > is there other plugin like markdown which is a truely what they is > > what they get? > > Well, it's possible to pre-p

so wierd problem?

2007-09-03 Thread [EMAIL PROTECTED]
i used the development server to test my project, it is ok. but when i switch to apache+mod_python, i got errors as below: Request Method: GET Request URL: http://127.0.0.1/ Exception Type: ImportError Exception Value: No module named registration.forms Exception Location: D:\djangopro\mysite\re

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Alex Koshelev
In list_events view you have to pass your polls list into context to. ... from mysite.polls.models import Poll ... def list_events(request): latest_event_list = Event.objects.all() latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] return render_to_response('events/ind

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Catalyst
On Sep 3, 1:00 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Please show your views code or tell what you pass into template > context. Sure thing, here's my views code for the events app. from mysite.events.models import Event from django.shortcuts import render_to_response, get_object_or_404

Re: Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Alex Koshelev
Please show your views code or tell what you pass into template context. --~--~-~--~~~---~--~~ 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 un

Re: Signals Question - Firing off an email after a save

2007-09-03 Thread Alex Koshelev
save() is method, so it must get at least one parameter - self. def save( self ): ... > > TypeError at /admin/envwork/environment/12/ > save() takes no arguments (1 given) > > Any thoughts? > --~--~-~--~~~---~--~~ You received this message because you are s

Re: newforms and DateField

2007-09-03 Thread Pigletto
You may also try: http://www.djangosnippets.org/snippets/391/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe f

Unable to get Django to output variables when calling from a different app

2007-09-03 Thread Catalyst
I'm having trouble getting variables to output from a different Django app. For example, I have two apps installed in Django (besides the default stuff), events and polls. Here's my template code that's mapped to the events URL. {% for event in latest_event_list %} {{ event.n

Re: Signals Question - Firing off an email after a save

2007-09-03 Thread Jack E. Wilkinson
Thank you for the response Jeremy! Your solution seems the most graceful and efficient. However it looks like I may be doing something wrong... :-( Here is the modification... ... class Environment(models.Model): short_name = models.CharField("Short Name", maxlength=8, blank=False, unique=Tr

Re: newforms and DateField

2007-09-03 Thread Alex Koshelev
There is no way to use admin's calendar into regular pages with newforms. You have to implement it by yourself. On 3 сент, 11:07, picky <[EMAIL PROTECTED]> wrote: > That's what I was thinking. I try it but I don't fuind how to display > calendar button. > I don't see anything in http code of an a

Re: newforms and DateField

2007-09-03 Thread picky
That's what I was thinking. I try it but I don't find how to display calendar button. I don't see anything in http code of an admin page which contains a DateField. Mathieu On Sep 1, 11:47 pm, "Peter Melvyn" <[EMAIL PROTECTED]> wrote: > On 8/31/07, picky <[EMAIL PROTECTED]> wrote: > > > I try t

Re: truncating posts with markdown

2007-09-03 Thread Ross Poulton
On Sep 3, 4:31 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Markdown wraps all text in tag so truncate_html doesn't work I haven't seen that either... It wraps the paragraphs in tags through, which makes sense. To truncate it, why not change the order of your filters? {{ table.fieldname|trun