At 11:49 PM -0600 9/11/09, Gabriel Gunderson wrote:
>On Fri, Sep 11, 2009 at 3:03 PM, Jim Myers wrote:
>> I have a requirement to serve static files only to users authenticated
>> through Django secure login.
>
>http://docs.djangoproject.com/en/dev/howto/apache-auth/
I've
re you talking about being
in SF proper, or "in the Bay Area"?
Whenever / wherever you decide, please let us know... maybe one or
both of us will be able to make it.
--
Glenn Tenney
--~--~-~--~~~---~--~~
You received this message because you are subscrib
On 4 Aug 2006, at 19:35, Joseph Heck wrote:
> I believe it was a little custom script that generated a schema
> model in OmniGraffle from the ruby code. Not 100% sure, but I
> recall seeing one of the local ruby guys using it.
Back in April I posted here:
Subject: pictorial representation
On Tue, Aug 01, 2006 at 04:29:02PM -0700, Joseph Heck wrote:
> On the Mac, I used TextWrangler
Yep, very nice... But I mostly just use emacs (which comes
with Mac OS X, as well as "vi" if you're so inclined).
--
Glenn
--~--~-~--~~~---~--~~
You received this
tested code over to a QA
group who would test it again (a different level of testing) on a
staging server, and then finally the QA group would move the fully
tested code over to the production server.
--
Glenn Tenney CISSP CISM
--~--~-~--~~~---~--~~
You received this
On Tue, Jul 04, 2006 at 10:10:55AM +1000, Malcolm Tredinnick wrote:
> I can't see any real advantage in this. As Ivan shows, it's only a
> couple of lines of code anyway (and a more or less documented feature).
> The boolean test for "not created" at the moment is "if not self.pk:",
> which seems
On Mon, Jul 03, 2006 at 07:09:35AM -0500, James Bennett wrote:
> You can also differentiate between the initial save and later updates
> by checking -- before calling the parent class' 'save' method --
> whether the object has an ID; if it doesn't, then the object is being
> created for the first
o your application will do the repetitive task once
each interval.
--
Glenn Tenney CISSP CISM
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
2) with ESMTP id
k4L6Ga02010261
for <django-users@googlegroups.com>; Sat, 20 May 2006 23:16:36 -0700
Received: (from [EMAIL PROTECTED])
by zardoz.think.org (8.12.3/8.12.3/Debian-7.2) id k4L6GaSK010259
for django-users@googlegroups.com; Sat, 20 May 2006 23:16:36 -0700
Date: Sat,
On Fri, May 05, 2006 at 06:23:48PM -, jbrewer wrote:
> But when I used DarwinPorts of SQLite it installed Python 2.4 here:
>
> /opt/local/bin - and located here also is sqlite3
Remember, I said to look at ALL of the comments from
http://www.djangoproject.com/documentation/install/
which
On Fri, May 05, 2006 at 12:20:35PM -0500, James Bennett wrote:
> Keep in mind that's a wiki that *anyone* can contribute to, not just
> "official" developers ;)
And... because it's a wiki... have their contributions deleted too.
(mine were)
--
Glenn
On Fri, May 05, 2006 at 12:32:23AM -, jbrewer wrote:
> I have tried to install the MySQLdb and keep getting this error:
>
> error: command 'gcc' failed with exit status 1
1. Read http://www.djangoproject.com/documentation/install/
2. Follow all of the comments talking about Mac OS X
On Thu, May 04, 2006 at 10:32:59PM +0200, Moi Meme wrote:
> And on my particular ticket system case, Paul Bissex's 20 mn trouble
> ticket system (http://e-scribe.com/news/230) looks cool, but is limited
> to one model, which takes its list of applications from a static list
> (INSTALLED_APPS).
rt,
"view":view,
"display":display,
"obj_list":obj_list,
}, None)
Then, in your template you refer to these variables just like
{{ sort }}
Hope that helps even though it's not generic views...
--
Glenn Tenney
--~--~-
On Sat, Apr 29, 2006 at 08:20:30PM -0500, James Bennett wrote:
> In the tutorial, the field on the Choice model ('poll') is the same as
> the name of the model it's being related to ('poll'), which is why it
> looks that way. Whenever they're different, you want to use the name
> of the field on
On Sun, Apr 23, 2006 at 03:14:15PM -0500, Adrian Holovaty wrote:
> Default values aren't created at the SQL level -- they're enforced at
> the Django DB-API level.
I thought that was only enforced by the admin functionality and that
if I wanted a default value for my views I'd have to write it
do:
{% set title "title1" %}
{% include some.html %}
This would allow one template to pass lists, or objects within
lists or whatever to other included templates. It's not as
"elegant" as passing arguments to templates as what limodou
has done, but it will get that job done
In my reading up on Ruby on Rails, I found a link to a page on the RoR
wiki that shows a pictorial representation of a schema (model) along
with documentation etc.
See http://wiki.rubyonrails.org/rails/pages/AccessControlListExample/versions/25
Does anything like that exist to take a Django
On Thu, Apr 13, 2006 at 07:17:16PM -0700, [EMAIL PROTECTED] wrote:
> There is only one Rails book that is in print at the moment(non pdf).
> There are several others that are going to be released very soon
> though.
http://www.robsanheim.com/2006/03/23/ruby-and-ruby-on-rails-book-roundup/
is a
A group with which I volunteer is a Cold Fusion shop. One of the
other volunteers used EZ-Cart for a few ecommerce sites and loved it.
You might want to see the features it has... See
http://www.cf-ezcart.com/
--
Glenn
--~--~-~--~~~---~--~~
You received this
Several friends have been pushing me to look at Rails, so I've been reading
through "Agile Web Development with Rails".
Some quick thoughts... with a couple of questions thrown in...
1. Ok, there IS the Ruby vs Python thing... I'll leave that to some
*other* place for THAT flame fest as I do
On Tue, Apr 11, 2006 at 04:16:09PM -0400, Max Battcher wrote:
> "pass" is the Python "do nothing" command, which is often used as an
> indicator to "fill in the blanks" with your own specific code (because
> Python doesn't allow empty functions it is often seen in psuedo-code).
yes... yes... I
On Tue, Apr 11, 2006 at 06:19:49PM -, arthur debert wrote:
> the thing is, if there's anything in django's knowledge to avoid the
> save / delete it DOES raise an error. (such as trying to delete an non
> existant object or trying to save a model that does not pass
> validation). my guess
On Tue, Apr 11, 2006 at 02:24:04PM -0400, Max Battcher wrote:
> You are free to raise your own exception in the path that fails to
> call super().delete() in M-R.
Then perhaps the docs etc. should instead show "raise "
instead of "pass"... When one shows as an example to use "pass",
it
On Thu, Mar 30, 2006 at 03:07:01PM -0500, Max Battcher wrote:
> I hate to say it, but Routes and most of the other schemes presented
> _do_ feel over-engineered. The current URL patterns system is fast
> and clean. The get_absolute_url() pattern is simple one, and yes it
> might break the
On Tue, Mar 28, 2006 at 08:44:48PM +0200, Arthur wrote:
> That's similar to what I do. The get_absolute_url() concatenates a
> _BASE_URL from settings.py or from the top of models.py with
> what you call get_id_for_url. This isn't completely clean but easy to
> change if you remember where to
On Tue, Mar 28, 2006 at 12:19:39PM -0600, Jacob Kaplan-Moss wrote:
> "correct" and just as simple, and each time I've failed. As far as
> I'm concerned, if someone can come up with a way to do this that's
> stupidly simple then I'm all for a change, but at the same time
>
is fine,
but the docs as part of the base tar file of Django must include all
the docs -- and that must include the example docs too. ---OR--- the
docs need to be rewriten to bring the documentation aspects of all the
examples into the "docs" anothe
On Mon, Mar 27, 2006 at 04:21:09PM -0600, Adrian Holovaty wrote:
> The convention is to put the URL-creation logic in your models, in a
> get_absolute_url() method. Here's a quick example:
> ...
> You're right to imply that this goes against the DRY principle,
> because you have to define URLs in
On Mon, Mar 27, 2006 at 12:37:54PM -0800, wam wrote:
> Well, it was my understanding that since I have the potential of having
> many 'inspired by' documents linked to a particular document, and that
> any particular document could have inspired many other other documents,
> then that means I'm
on of user input ***MUST*** always be done on the server-side
and not JUST in the html code / javascript at the browser!!
--
Glenn Tenney
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
sense, that happen to map onto tables
and columns, rather than as columns and tables that happen to map onto
field names.
--
Glenn Tenney
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
On Fri, Mar 17, 2006 at 10:57:14PM -0800, [EMAIL PROTECTED] wrote:
> No, one underscore doesn't work:
> choices.get_values(fields=['poll', 'votes'], poll_id=1)
> returns
> TypeError: got unexpected keyword argument 'poll_id'
>
> I'm using two underscores because that's my (limited)
I had wanted to make up a unique field combining some other field and,
ideally, an autoincrementing number unique to this class... I'd love
to make this the primarykey, but I can't make up a SlugField as the
primary key and another field to be the autoincrementing number
because AutoField is
I found that a subclass' _pre_save method superceeds it's parent's
and I have a situation where I need it to do something in addition
to what it's parent does.
e.g.
class One(model):
def _pre_save: ...something...
class Two(One):
def _pre_save:
?
Based on Python
As part of developing my first Django app I'd make use of {% debug %}
often to see what's happening. I spent a while yesterday trying to
figure out why, just inserting a debug line in my template caused a
traceback of a rendering exception.
Turns out that I mistakenly had created a class with a
In my first Django app I've got the following "rough" model (not
real code, but enough to show what I mean):
class Rateable
some stuff common to all "Rateable" objects
class Rating
who = ForeignKey(User)
what = ForeignKey(Rateable)
values = ...
class
On Thu, Mar 09, 2006 at 11:21:38PM +0800, limodou wrote:
> Please check this document http://code.djangoproject.com/wiki/NewbieMistakes
> It seems that you lost a '/' after action name "rated".
Whoa! Thanks!!!That did it!
I never even thought of that because my url pattern had a "rated/$"
Some sample code excerpts, before my question:
(this code is incomplete, but should give the idea of where I'm headed)
class Rateable(meta.Model):
value = meta.IntegerField()
def current_rating(self):
try:
r = self.get_ratee_list()
except:
return "None"
On Fri, Mar 03, 2006 at 04:50:37PM -0600, James Bennett wrote:
> If it were an up-or-down, the ratings fields probably wouldn't be
> PositiveSmallintegerFields, and the comments module's
> get_rating_options method probably wouldn't use a 1-10 rating scale as
> the example in its docstring ;)
On Fri, Mar 03, 2006 at 03:02:32PM -0600, James Bennett wrote:
> Take a look at the comments app distributed with Django
> (django.contrib.comments), which has a rating system built in to it.
Thanks, but it seems to me that it does a user voting (one up, or one
down) rather than "I give this a 3
ted on how to structure the
models and views-code for this.
Thanks
--
Glenn Tenney
--~--~-~--~~~---~--~~
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@googlegroup
On Thu, Mar 02, 2006 at 10:03:52AM +0800, Russell Keith-Magee wrote:
> a.reporter_id = r2.id
Wow, thanks!
As I said, I had tried "... = r2.id" but that didn't work.
I never would have thought of "a.reporter_id" since in the
code to create it it uses "reporter=...".
Do you know if in the M-R
On Mon, Feb 27, 2006 at 10:24:33AM -0800, hsitz wrote:
> Glenn -- I think your one to many answer is here:
> http://www.djangoproject.com/documentation/models/many_to_one/
I knew how to add a record with a many_to_one, but for when I
needed to change that relation afterwards, my testing showed
At 6:22 PM -0800 2/26/06, hsitz wrote:
>Have you taken a look at the Many-to-many relationships example? Looks
>like you're trying to manually create the links between tables, whereas
>you're supposed to use the Model API's built-in 'set_x' method.
>
d yet, hasn't happened yet but will happen
sometime this month / quarter / year, happened already this month/quarter/year.
That sounds like a view criteria to me... What approach would you suggest
taking in a case like the one I've just described above?
Thanks.
--
Glenn Tenney
--~--~-
be crystal clear in documentation.
Equally, I would find "APP_LABEL_MYPROJECT/MODULE_NAME_POLLS_get" to
also work, but not be as crystal clear.
--
Glenn Tenney
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
e pre-m-r ... so starting from
scratch with the m-r means a lot more headaches in learning
Django.
--
Glenn Tenney
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
On Tue, Feb 21, 2006 at 09:22:25PM -, Jan Rademaker wrote:
> The 'archive_day' you see in urlpatterns is the name of the view, eg.
> django.views.generic.date_based.archive_day and not some string that's
> appended to the module's name.
Thanks... for some reason, I had the perception that
49 matches
Mail list logo