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 wi
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&
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
> myd
[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: htt
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" i
Jeremy Dunck wrote:
> On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> Something between that and the admin look/feel. The goal is to show someone
>> what data will be displayed ins a some what sane way during development, and
>> make it pretty some other day.
>
For quickly displaying an object on a page (in particular from a generic view),
is there something that is slightly better than {{object}} ?
Something between that and the admin look/feel. The goal is to show someone
what data will be displayed ins a some what sane way during development, and
I have this working with some extra code in my view, but I would like to know
how I could have done it in the template:
# view.py
from datetime import datetime, date
# Week starts on Sunday
c=calendar.Calendar(calendar.SUNDAY)
# get all the dates that will be displayed,
#
Russell Keith-Magee wrote:
> On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> Russell Keith-Magee wrote:
>>> Django users have many skills. Unfortunately, mind reading is
>>> generally not one of those skills :-)
>>>
>> Yeah, I see what you
Russell Keith-Magee wrote:
> On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> I am migrating a site from .net/access to django. the MySql Migration Wizard
>> gets the data out of access and into a MySql db nice and easy. There is even
>> some provision for scr
I am migrating a site from .net/access to django. the MySql Migration Wizard
gets the data out of access and into a MySql db nice and easy. There is even
some provision for scripting it, but don't ask me about that cuz I havn't used
it yet :)
I can write .sql and python easy enough, and I am
Carl Karsten wrote:
> I am trying to figure out the best place to matchup Events and Dates when
> rendering a 'basic calendar.'
>
> Events: 0, 1, more per date.
> Dates: a list of all the dates in a month, so about 30 - one for each day.
>
> # views.py
> class
Malcolm Tredinnick wrote:
> On Sat, 2007-07-07 at 14:59 -0500, Carl Karsten wrote:
>> # views.py
>> class Event(models.Model):
>> title = models.CharField(maxlength=255)
>> eventdate = models.DateField()
>> description = models.TextField(bla
I am trying to figure out the best place to matchup Events and Dates when
rendering a 'basic calendar.'
Events: 0, 1, more per date.
Dates: a list of all the dates in a month, so about 30 - one for each day.
# views.py
class Event(models.Model):
title = models.CharField(maxlength=255)
# views.py
class Event(models.Model):
title = models.CharField(maxlength=255)
eventdate = models.DateField()
description = models.TextField(blank=True)
def __str__(self):
return "%(ed)s %(t)s" % {'t':self.title, 'ed':self.eventdate }
# models.py
# get Events fro
Malcolm Tredinnick wrote:
> On Fri, 2007-07-06 at 07:18 -0700, Filippo Santovito wrote:
>> Hi all,
>> I'm having a strange problem with a view.
>> Its code runs well if I test if in the shell but seems to block the
>> dev server:
>>
>> #django 0.96
>> def html2pdf(request, url = None ):
>> fro
Graham Dumpleton wrote:
> On Jul 6, 2:59 pm, John-Scott <[EMAIL PROTECTED]> wrote:
>> On Jul 6, 12:29 am, Graham Dumpleton <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Hmmm, I'm not sure the documentation is actually accurate. When you
>>> use manage.py to run up development server for Django, it will
>>>
Noam Raphael wrote:
> On 7/4/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> I don't like the "edit the file" part. I can think of 2 alternatives:
>>
>> 1. add an attribute to one/both of the models. something like
>>
>> class Book(mod
Noam wrote:
> For example, say that I have a directory with the old site (and old
> models) and a directory with the new site. The only difference between
> them is that I renamed the field store.Book.name to
> store.Book.book_name. I will run "django-admin.py migrate oldsitedir
> newsitedir". Th
[EMAIL PROTECTED] wrote:
> Thanks Martn and Carl.
>
> I would really like to avoid having to re design the architecture of
> the application at this stage (its a case of the requirements changing
> after roll out), althougth thanks for the comments re serving large
> data volumes.
> I have made t
mamcxyz wrote:
> I try, with not sucess to apply the patch for make worj django and MS
> Sql.
>
>
> The tickets is a jungle and not see the logic in how is the thing
> organized. I'm building a store based in satchmo for integrate a
> couple of local ERP system, based in MS Sql, so I have a moti
Martin Winkler wrote:
> Am Tue, 03 Jul 2007 15:07:14 -
> schrieb "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>:
>
>> We are using mysql 5.0.42 and are getting this error when trying to
>> insert records of over 5M.
>
> I may sound nosy, and apologize for that. But don't you think that you
> have a
johnny wrote:
> My model named: Post
>
> It has a field created_at as:
> created_at = models.DateTimeField(auto_now_add = True)
>
> Would Post.created_at be of string or datetime ?
>
> I want to add 2 weeks to it, like Post.created_at + 14 days. Can I do
> this?
> Post.created_at =Post.created
Russell Keith-Magee wrote:
> On 7/3/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> Russell Keith-Magee wrote:
>>> Thats fine. However, as fair warning - this is the first time that
>>> Sybase support has been requested (compared to the regular requests
>
Russell Keith-Magee wrote:
> On 7/3/07, adm <[EMAIL PROTECTED]> wrote:
>> Russ,
>> I sure can try that. The problem is I haven't gone through the
>> Django framework in details as such, which make me quite helpless
>> while adding the support.
>
> Thats fine. However, as fair warning - this
walterbyrd wrote:
> On Jul 2, 5:13 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
>
>> "not using X" does not say what you are doing - my best guess is "what will
>> be
>> available if I just run python?" if so, the answer is "nothing other
walterbyrd wrote:
>
>
> On Jul 2, 2:30 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> walterbyrdwrote:
>>> On Jul 2, 1:24 pm, Vincent Nijs <[EMAIL PROTECTED]>
>>> wrote:
>>>> all the 'settings' are taken care of for you so you
walterbyrd wrote:
> On Jul 2, 1:24 pm, Vincent Nijs <[EMAIL PROTECTED]>
> wrote:
>
>> all the 'settings' are taken care of for you so you don't have to do any
>> exports or anything like that. The import statement for Context and Template
>> should work fine when you use the above command.
>>
>
Dennis Kaarsemaker wrote:
> On ma, 2007-07-02 at 12:49 -0500, Carl Karsten wrote:
>> how do I set a default anything for when a user hits http://foo.com they get
>> index.html or any other file? I can see having a static file that does a
>> redirect - wondering if the
how do I set a default anything for when a user hits http://foo.com they get
index.html or any other file? I can see having a static file that does a
redirect - wondering if there isn't a better way.
Carl K
--~--~-~--~~~---~--~~
You received this message becaus
Justin Lilly wrote:
> errr.. sorry. misclicked. You can find the source under the "agenda" folder
> of:
>
> http://justinlilly.no-ip.org/svn/trunk/gtd/
>
> If you need anything regarding it, let me know!
> -justin
Working out pretty good for me. thanks.
Hope you don't mind me questioning th
I am wondering what the 'best practice' is for my current problem, which is
basically using someone else's work but keeping it isolated from my own.
I am building a site that needs an "event calender." Justin Lilly has done
something similar and gave me http://justinlilly.no-ip.org/svn/trunk/
oh yeah... thanks.
I have head of BeautifulSoup - never used it before. my pages html are now
much
more readable.
Carl K
Michael Trier wrote:
> Make sure you have an __init__.py in that directory.
>
> Michael
>
> On 6/29/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
Carl Karsten wrote:
> Christian Joergensen wrote:
>> Carl Karsten wrote:
>>> nicely formated template code generates lots of CRs in the resulting html.
>>> I am
>>> trying to figure out how to make the html a bit easier to read.
>>>
>>> fo
Christian Joergensen wrote:
> Carl Karsten wrote:
>> nicely formated template code generates lots of CRs in the resulting html.
>> I am
>> trying to figure out how to make the html a bit easier to read.
>>
>> for instance, how can I make this:
>>
>
Doug Van Horn wrote:
> On Jun 29, 12:20 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> for instance, how can I make this:
>>
>> > {% ifequal day.day day.today %} class="today"{% endifequal %}>
>>
>> Not put the CR inside the ?
>
> I
nicely formated template code generates lots of CRs in the resulting html. I
am
trying to figure out how to make the html a bit easier to read.
for instance, how can I make this:
Not put the CR inside the ?
I realize i may be asking for magic, but I am thinking maybe something like
skip
Took me a bit to get .FileField() working in the admin, and im wondering if it
needs to be as complicated as it seems. I think it currently violates DRY, and
maybe that was intentional for 'security' or 'performance' reasons, or maybe it
was just an oversight.
I did the following, and got the
I am trying to get http://svn.zyons.python-hosting.com/trunk/
working under the current django svn. I'll send .patch to zion's way when I am
done.
I need a recommendation from someone who has an understanding of what this code
does. (I could probably hack it into submission, but that's not g
Carl Karsten wrote:
> This is probably a zyons problem, but maybe someone here can help this nifty
> project.
>
> [EMAIL PROTECTED]:~/django/zyons/zilbo$ ./manage.py syncdb
> Error: Couldn't install apps, because there were errors in one or more models:
> zilbo.common.c
This is probably a zyons problem, but maybe someone here can help this nifty
project.
[EMAIL PROTECTED]:~/django/zyons/zilbo$ ./manage.py syncdb
Error: Couldn't install apps, because there were errors in one or more models:
zilbo.common.comment: 'module' object has no attribute 'GenericForeignKe
)
did you see the Zyons Event Calendar? looking pretty cool...
Carl K
>
> On Jun 23, 1:37 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
>> I am going to build a site that needs a calender and a message board, plus
>> some
>> specialized things that will 'integra
I just hit it - looks nice - I like the tag cloud.
I have been meaning to hit it ever sense I saw your post, but today I had a
need
and was hoping DjangoSites.Org would help. what follows is not related to
content, I realize it is new and will improve over time.
As a 'visitor' I get the feel
I am going to build a site that needs a calender and a message board, plus some
specialized things that will 'integrate' with those two features. So it would
be good if the whole site used the same glue.
Anyone have any suggestions?
Carl K
--~--~-~--~~~---~--~
Jeremy Dunck wrote:
> On 6/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
>>> Which cache backend are you using? The snippet I linked is for *a*
>>> backend. Many of the Django caching backends do need to pickle since
>>> they marshal out of process.
>&g
Jeremy Dunck wrote:
> On 6/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote:
> ...
>> The django cache set/get does work. Thanks, M.
>
> Which cache backend are you using? The snippet I linked is for *a*
> backend. Many of the Django caching backends do need to pickle
Jeremy Dunck wrote:
> On 6/17/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> ...
>> Use the low-level caching API to store things like this. Write a short
>> funciton that retrieves a value from the cache and regenerates it and
>> stores it if it is not in the cache. No extra work required.
>
>
> I am considering using twisted to create a little server that does nothing
> but
> host trie_search(s) (note the lack of trie.) I realize that it will have to
> return a string - that is ok, it is just a list of words found in words.txt.
>
> But twisted seems like overkill. otoh, I do w
I have a function that takes a dict and a string, returns a list:
def trie_search(trie, s):
...
return res
mk_trie(the_trie) takes 15 seconds to build from a static list of 750,000
words.txt so I don't want to call it every time I need to call trie_search().
So I want to build the_tr
What are the minimum GRANT options I need for running syncdb
and the minimum needed for normal use?
Everything I find on the web does a blanket ALL, some even on all DBs of the
whole server. I couldn't find anything in the docs, and it really should be
spelled out.
Carl K
--~--~-~--~
[EMAIL PROTECTED] wrote:
> Has anyone successfully used Jasper Reports on the server being called
> from a Django view?
>
> I've done a few things with ReportLab, but we have the need for a
> graphical Report Designer, which I don't believe exists for Report
> Lab.
Check out:
http://dabodev.com
> As I said abive, when I've done that in the past I never find the time
> to dig into all my folders. If I'm going to monitor a list, it needs
> to go through my inbox and have me take a manual action to move it to
> a folder.
I think this is the root of your request. I doubt you will find muc
Malcolm Tredinnick wrote:
> On Tue, 2007-06-12 at 06:14 +1000, Malcolm Tredinnick wrote:
>> On Mon, 2007-06-11 at 15:07 -0500, Carl Karsten wrote:
>>> If I were starting from scratch, I would use MySql. But currently there is
>>> a db
>>> model in MsSql. t
If I were starting from scratch, I would use MySql. But currently there is a db
model in MsSql. the 2 affections to mssql is 1: it is what the client has (so
I don't have to sell them on anyting new) and 2) it is where the model
currently
is. The plan is to see how far I can get with Ms,
MartinWinkler wrote:
> Hi again,
>
> On Jun 10, 10:37 pm, Florian Apolloner <[EMAIL PROTECTED]> wrote:
>
>> Why don't you display the image dynamically with django, without
>> saving it?
>> Example:http://django-captcha.googlecode.com/svn/trunk/djaptcha/views.py
>
> I already took a look at dja
101 - 155 of 155 matches
Mail list logo