Runing on Windows 7
First time user of Django and Python. Got python installed at f:
\python27, downloaded DJango tar file. Used WInRAR to extract.
Copied all of DJANGO into Python27
Ran python setup.py install
Tutorial one says:
>From the command line, cd into a directory where you’d like to
I'm trying to add functionality to my django project to catch anybody
accidentally sending a write to a readonly replicated DB slave. Is
there a "best practices" way to do this?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
On Tue, Oct 28, 2008 at 10:31 PM, varikin <[EMAIL PROTECTED]> wrote:
> try:
> object.photo._require_file()
> except ValueError:
> #handle exception
Wow, I never expected anybody to do something like that. :(
> But I just don't know what this does or is suppose to. The way I read
> it, i
On Fri, Oct 31, 2008 at 1:42 PM, csingley <[EMAIL PROTECTED]> wrote:
> report_storage = ReportStorage(location='%s/reports' %
> settings.MEDIA_ROOT,
>base_url=settings.MEDIA_URL
> +'reports')
My guess is that you need a trailing slash here. Without it, the
urlj
On Mon, Nov 3, 2008 at 11:04 AM, Chen Yinliu <[EMAIL PROTECTED]> wrote:
> I've searched this group and find some related mails, but their solutions
> seem out of date, for example:
> http://gulopine.gamemusic.org/2007/nov/07/customizing-filenames-without-patching/
> but there is no _save_FIELD_fil
On Tue, Nov 11, 2008 at 10:05 PM, Malcolm Tredinnick
<[EMAIL PROTECTED]> wrote:
> On Wed, 2008-11-12 at 00:12 -0200, Juanjo Conti wrote:
>> Is there any problem with changing my SECRET_KEY from a running project?
>
> Searching for all uses for the word SECRET_KEY in the source of Django
> would ha
On Mon, Jul 14, 2008 at 8:48 PM, Kadusale, Myles <[EMAIL PROTECTED]> wrote:
> I don't want to use cookies because they can be disabled by the user.
The alternatives I'm aware of are:
* recording the session ID directly in the URL of every page, which
just opens you up[1] to all sorts of problems
On Tue, Jul 15, 2008 at 2:19 PM, joshuajonah <[EMAIL PROTECTED]> wrote:
> White forever, never loads in the browser. I have changed it today,
> but i cannot figure out what i screwed up.
>
> http://dpaste.com/hold/65163/
>
> It makes a ton of checkboxes in four columns, it then adds blank
> fields
On Wed, Jul 16, 2008 at 11:46 AM, Joshua Jonah <[EMAIL PROTECTED]> wrote:
> Yeah, but the point is to make the list exactly divisible, is there a
> better way to do this? I'm then taking the number of fields and dividing
> them by four, then outputting that number of items in each column.
I apolo
On Wed, Jul 16, 2008 at 2:50 PM, d3f3nd3r <[EMAIL PROTECTED]> wrote:
> hello,
> I have another problem with file upload.
> request.FILES['file'] represents a dictionary in my view, not an object.
>
> Here is my code :
>class UserPicForm(forms.Form):
>userpic = forms.FileFi
On Thu, Jul 17, 2008 at 12:34 PM, Ayaz Ahmed Khan
<[EMAIL PROTECTED]> wrote:
>
> On Jul 17, 9:04 pm, rootbit <[EMAIL PROTECTED]> wrote:
>>
>> Hey everyone.
>> i would like to change the authentication system, so that usernames
>> will be email
>> like on facebook.
>>
>> how should i go about doing
On Mon, Jul 21, 2008 at 2:55 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> This is why i need to code a little mechanism to set the verbose_name
> property of Meta subclass of Model.
> I can't get it to work!
All of the options you're suggesting would work just fine if only Meta
ever got ins
On Tue, Jul 22, 2008 at 5:17 AM, James PIC <[EMAIL PROTECTED]> wrote:
> I'm trying to use the value of a field of the model for Meta verbose_name.
Do you mean an instance of the model? Like, if you have an Article
whose title attribute is "Testing" you'd like "Testing" to show up in
the admin fo
On Tue, Jul 22, 2008 at 5:50 PM, Chris <[EMAIL PROTECTED]> wrote:
> Right now I am simply doing this which obviously does not get the
> directory structure that I want.
>
> PATH_ROOT = os.path.join(MEDIA_ROOT, 'event-photos', ph.name)
> IMAGE_PATH = os.path.join('event-photos', ph.name)
> destinat
On Fri, Jul 25, 2008 at 8:23 AM, timc3 <[EMAIL PROTECTED]> wrote:
> Just isn't working, and it looks like a RegEx problem to me, but I am
> not sure why..
It's usually best to explain what isn't working, exactly. Is it just
not being matched, and you're getting a 404? Is your urls.py giving
you e
On Fri, Jul 25, 2008 at 11:31 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Marty Alchin wrote:
>> Also, though, I have to ask why you're using such a complicated URL
>> pattern in the first place? For some applications, I can understand
>> accepting a full UR
On Fri, Jul 25, 2008 at 12:31 PM, Darthmahon <[EMAIL PROTECTED]> wrote:
> I've just upgraded my Django to the trunk and noticed some code I need
> to change. I've got a form that uploads images, looks like Django
> throws up an error if the file is not an image, which is nice but I
> also need to
On Fri, Jul 25, 2008 at 1:11 PM, Darthmahon <[EMAIL PROTECTED]> wrote:
> So currently there is no way of getting the dimensions for an image?
I'd call that a radical interpretation of the text. You were asking
solely about the size of the file, not the dimensions of the image.
Looking a bit at ho
On Tue, Aug 19, 2008 at 8:47 AM, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> I'm trying to work with a model which accepts a logo image upload via
> an ImageField. My a cut down version of my model is below:
>
> class Promoter(models.Model):
>name = models.CharField(max_length=100)
>
On Tue, Aug 19, 2008 at 12:16 PM, Tom Tobin <[EMAIL PROTECTED]> wrote:
> And this *isn't* a bikeshed argument. There is obviously substantial
> confusion over what the terms "users" and "developers" mean in the
> context of Django. We're attracting *lots* of people (3849 on
> -developers, 10431
On Tue, Aug 19, 2008 at 10:59 PM, Mike Scott <[EMAIL PROTECTED]> wrote:
> So the fact that you say we have to force nearly 15000 people to
> change is a rather void argument.
Thanks for correcting me. I haven't administered a Google Group
before, so I didn't realize they had measures in place to
On Wed, Aug 20, 2008 at 3:05 PM, Tom Tobin <[EMAIL PROTECTED]> wrote:
> Renaming issues aside — am I the only one who is bothered by how many
> messages-per-day -users gets vs. noticing "interesting" topics (where
> "interesting" depends on the individual, of course)? django-users has
> become su
On Fri, Aug 22, 2008 at 8:35 AM, julianb <[EMAIL PROTECTED]> wrote:
> What if the file never has a path and exists just as StringIO? I can't
> seem to get it to be a "Django file"...
I'm a bit confused by that. Do you mean that you don't want to save it
to a file, or that it's not a file already?
On Fri, Aug 22, 2008 at 10:22 AM, Michael Sanders <[EMAIL PROTECTED]> wrote:
> Is this a consequence of http://code.djangoproject.com/changeset/8348
> or should I be doing something else to enable this validation? (I have
> PIL installed). Would it be preferable to use a Django form for the
> imag
On Wed, Aug 27, 2008 at 12:37 AM, Brian Morton <[EMAIL PROTECTED]> wrote:
> The docs (and an analysis of the code) indicate that the second
> argument to save should be the content.
>
> http://docs.djangoproject.com/en/dev/ref/files/file/#ref-files-file
>
> I am assuming this is binary or text con
On Thu, Aug 28, 2008 at 11:44 AM, Jiri Barton <[EMAIL PROTECTED]> wrote:
> I would like Django to take care of the file naming for me. I would
> like to use a one-liner such as
>
> Chart.objects.create(xml=default_storage.save('data.xml', data))
You're nearly there for getting this to work, it's
On Mon, Sep 15, 2008 at 2:30 PM, Markus <[EMAIL PROTECTED]> wrote:
> Gul said that "... a hybrid between FileField and FilePathField. I
> really can't imagine how we'd be able to get that to work reasonably
> well, especially in a way that makes sense when trying to use it. I'm
> open to ideas, bu
On Thu, Sep 18, 2008 at 11:55 AM, Faheem Mitha <[EMAIL PROTECTED]> wrote:
> Putting the following into my settings.py (checked for two different
> projects for Dango 1.0)
>
> from django.core.files.storage import Storage
>
> gives
>
> [EMAIL PROTECTED]:/var/django/hg$ python manage.py validate
> E
On Jan 3, 2008 2:33 PM, annacoder <[EMAIL PROTECTED]> wrote:
>
> I understand *how* it is done.
>
> But, my question was not related to the how part.
Here's a quick rundown of the "why".
Templates aren't triggered by HTTP requests like views are. Instead,
they're rendered inside views, which *ar
On 1/3/08, LRP <[EMAIL PROTECTED]> wrote:
> Ah, Django promises much, but so far has delivered nothing but Mal de
> Mar. Please tell me that there is smoother sailing beyond this patch
> of troubled waters.
First off, let me say that I absolutely love your nautical theme! I do
tend to call Django
On Jan 4, 2008 3:23 PM, Emil <[EMAIL PROTECTED]> wrote:
> Hi people,
>
> I'm working on a project where I try to utilize the dumpdata and
> loaddata commands from manage.py to extract and load data, since I'm
> constantly moving stuff I'm entering into the db between local
> development server and
On Jan 7, 2008 9:39 AM, Placid <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm a huge fan of Django. Let's face it, coding a Django site is just
> plain fun. And I've only just scratched the surface of what it's
> capable of. One of the things I've missed with Django is that I
> doesn't seem to ha
On Jan 9, 2008 10:28 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I can access it, also all the images can be viewed by going to the
> url.
> It only won't appear in the actual html files.
> > > the link that i put in my index file is the following
> > > > > media="print" >
I have one q
On Jan 11, 2008 10:39 AM, WoonZai <[EMAIL PROTECTED]> wrote:
> >>> model = create_model('Empty')
> Traceback (most recent call last):
> File "", line 1, in
> File "/Users/../models.py", line 36, in create_model
> return type(UserForm, (models.Model,), attrs)
> File "/.../site-packages/d
In theory, I suppose you might be able to create the class that way,
but I can't imagine it would be very useful. Even if you specify
different db_column for each field to make the database happy, Django
would probably give you some fits. When you retrieve a record from the
database, Django sets a
On Jan 15, 2008 9:48 PM, Scott <[EMAIL PROTECTED]> wrote:
> /Working/django
Out of curiosity, what are the contents of this directory? Is this the
root of the django distribution (containing things like 'docs',
'tests' and another 'django' directory), or is this the django code
itself (containing
I've been considering this, but haven't gotten around to actually
doing so. Keep us posted if you have any success.
-Gul
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
On Jan 17, 2008 7:19 AM, sector119 <[EMAIL PROTECTED]> wrote:
> I decide to create delete_many view and I want to pass dynamic number
> of args to it using urls:
>
> /streets/street/1/delete/
> /streets/street/12/3/4/delete/
> /streets/street/7/12/43/98/192/delete/
>
> what regexp in urls.py an vi
On 2/9/08, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Any way, here is my current urls.py document:
>
> from django.conf.urls.defaults import *
> from django.conf import settings
> from btaylor_design.views import home
>
> urlpatterns = patterns('',
> (r'', home),
> )
Don't bother reading an
On 2/9/08, bergstyle <[EMAIL PROTECTED]> wrote:
>
> I know there's been lots of discussion about how to change uploaded
> filenames. After wading through the options I've been trying to use
> the method described here:
> http://gulopine.gamemusic.org/2007/nov/07/customizing-filenames-without-pat
On Thu, Feb 14, 2008 at 11:31 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> Look at idea behind this:
> http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
That will likely fail to work across multiple requests, due to
threading and/or multi-process issues.
Better yet, check out
While not exactly Django-specific, I wrote up an article[1] last
month, describing an easy way to enable plugins in any Python
application. I don't know if that's what you're looking for, but it's
probably worth a look, anyway.
-Gul
[1] http://gulopine.gamemusic.org/2008/jan/10/simple-plugin-fra
On Mon, Feb 25, 2008 at 11:06 AM, Daniel Roseman
<[EMAIL PROTECTED]> wrote:
>
> On Feb 24, 12:29 am, Jonathan Lukens <[EMAIL PROTECTED]>
> wrote:
>
> > I am building a site for a customer, a restaurant owner, who wants to
> > be able to edit virtually all of the text on the site, including the
On Mon, Mar 10, 2008 at 6:09 AM, Paolo Ferretti
<[EMAIL PROTECTED]> wrote:
> I've got a problem with file upload in django. I found some generic
> documentation like this:
>
> http://www.djangoproject.com/documentation/model-api/#filefield
> http://www.djangoproject.com/documentation/faq/#how-
On Sun, Mar 9, 2008 at 5:51 PM, Nick Day <[EMAIL PROTECTED]> wrote:
> I have a model with several fields, some of which are ImageFields. To
> help prevent files overwriting others (if they are uploaded with the
> same name), and for organisational reasons, I would like to upload the
> images t
On Fri, Mar 21, 2008 at 2:37 PM, Greg <[EMAIL PROTECTED]> wrote:
> I would like to store model schema and URL regexes in the database and
> be able to retrieve them from the database and use them in an app.
> For example, let's say I create a simple poll model and store that
> schema in the da
On Thu, Mar 27, 2008 at 10:49 AM, Karantir <[EMAIL PROTECTED]> wrote:
>
> And here is a bit of my testcase
> [code]
>
> self.assertRaises(RevisionNotStarted,
> self.documents[0].fix_revision())
> [/code]
Try removing the extra parentheses from your test case. assertRaises
expects to get a cal
Given that you say you're working with PG Navicat, I assume you're
using Postgresql as your database. Postgresql has a concept of
sequences, which it uses to generate IDs for auto-generated fields
like Django's AutoField.
I think what you've done, by copying data in directly, is created
records w
On Wed, Apr 2, 2008 at 11:39 AM, Travis Ringger <[EMAIL PROTECTED]> wrote:
> I have installed the django-tagging dependency and have run
> syncdb a few times, but I have no tagging_tag table.
Did you just download django-tagging and put it on your PYTHONPATH, or
did you actually add it to your IN
On Tue, Apr 8, 2008 at 2:28 AM, Ramin Firoozye <[EMAIL PROTECTED]> wrote:
> Caveat: there's a waiting list for signing up.
Another caveat, according to that same page you linked:
"Since App Engine does not support Django models, leave all DATABASE_*
settings set to an empty string. The authenti
On Tue, Apr 8, 2008 at 8:16 AM, Marc Garcia <[EMAIL PROTECTED]> wrote:
> Well, it seems that you just need to migrate your django models to
> appengine models.
The trouble is who "you" are. I make use of a number of third-party
apps, and I don't much enjoy the idea of having to migrate *their*
On Tue, Apr 8, 2008 at 8:40 AM, Mat <[EMAIL PROTECTED]> wrote:
> Why don't we start a new branch (probably off query-set) to include bigtable
> support into the ORM, shouldn't all other modules work after the model
> system is updated?
They should, although it shouldn't need a whole new branch
On Tue, Apr 8, 2008 at 4:34 AM, David Larlet <[EMAIL PROTECTED]> wrote:
> Pycon fr in Paris: http://fr.pycon.org/
> I have 2 talks (in French):
> * Why django? (for beginners)
> * Daily Django: quality and performances
If I could make it to France, and spoke French, I'd so be there.
-Gul
--
On Tue, Apr 8, 2008 at 10:21 AM, Peter Baumgartner <[EMAIL PROTECTED]> wrote:
> Anybody interested in starting an app engine/big table db backend
> project? Should be interesting and might help pave the way for some
> other non-traditional databases like CouchDB or SimpleDB. While I'm
> not a
On Fri, Apr 18, 2008 at 12:17 PM, Brandon Taylor
<[EMAIL PROTECTED]> wrote:
> (r'?P[-\w]+/$', direct_to_template, {'template' : '%
> (template)s.html'}),
>
> ...and received an error saying:
> Error while importing URLconf 'rdk.pages.urls': nothing to repeat
You're missing parentheses around
Just a quick word of warning: You're now essentially passing
unfiltered user input directly into the template loader. Depending on
what content you have in your templates, this may imply a security
risk. For instance, if you have a template that hard-codes any secure
information, such as system ac
On Sun, Apr 20, 2008 at 10:45 AM, Hilbert Schraal
<[EMAIL PROTECTED]> wrote:
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '[EMAIL PROTECTED]@d(5w+m)kpcjffne(pvb+#6w2s_pz*5)b%$f'
As an aside, note the comment: "don't share it with anybody" It's good
that you cleaned the
On Mon, Apr 21, 2008 at 5:07 PM, Justin Lilly <[EMAIL PROTECTED]> wrote:
> I believe there is also a google-code application called Coltrane-blog.
Also, http://code.google.com/p/cab/
-Gul
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On Fri, Apr 25, 2008 at 6:35 AM, Grupo Django <[EMAIL PROTECTED]> wrote:
> I have this template code:
> {% block title %}{% endblock %}
>
>
> And I get the error: 'block' tag with name 'title' appears more than
> once.
>
> What could I do to make this work?
I don't know if it's suitable fo
Wow, a conversation about DurationField and I totally missed it. For
what it's worth, that patch needs a bit more work before even I want
it included in trunk. I've been putting it off because of my file
storage work, but I do plan to get back to it soon.
And Martin's right. Currently, DurationFi
against trunk, I'm just adding a few
more tests to it before I put it up. Thanks for the recommendation!
-Marty
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
On Fri, May 9, 2008 at 2:00 PM, Alex Morega <[EMAIL PROTECTED]> wrote:
> There seems to be a race condition in Django's model code for file
> uploads. Here's the relevant code snippet (django/db/models/base.py
> line 458 in the latest SVN version - #7520):
>
> while os.path.exists(os.path.
Hi gang (especially Malcolm, if you're listening),
I was recently trying to test out a few things with field subclassing,
and I made a PickleField just to see if I could. Basically, it pickles
arbitrary Python objects for storage into the database, then unpickles
them back into Python when access
On Mon, May 12, 2008 at 1:28 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> This should probably be filed as a bug since the docs(http://
> www.djangoproject.com/documentation/custom_model_fields/) show an
> example of raising a TypeError.
So it does, I hadn't noticed that. I've filed a ti
On Tue, May 13, 2008 at 11:02 PM, Nick Retallack
<[EMAIL PROTECTED]> wrote:
> Currently it seems like it could be pretty disastrous to let users
> upload their own files, as you can see from this ticket:
> http://code.djangoproject.com/ticket/2983
I've just added a note to that ticket explaining
On Thu, May 15, 2008 at 6:45 AM, James Bennett <[EMAIL PROTECTED]> wrote:
> On Thu, May 15, 2008 at 5:34 AM, Amit Ramon <[EMAIL PROTECTED]> wrote:
>> Was there any change in django in the recent months that could explain this?
>> Namely, could it be that a couple of months ago django would indeed
On Thu, May 15, 2008 at 10:25 AM, Amit Ramon <[EMAIL PROTECTED]> wrote:
> Now, if I subclass an existing field and I want to define the database type
> myself, how do I do that? Is there a place to add mapping between a name
> returned by get_internal_type and a database type, like in creation.p
On Thu, May 15, 2008 at 12:29 PM, Chris Farley <[EMAIL PROTECTED]> wrote:
> My Django app needs to read a cookie that is written by a JavaScript
> script in another part of my website. The JavaScript code that
> generates the cookie is something like this:
>
> document.cookie='ShoppingCart=[7008|2
On Wed, May 21, 2008 at 3:00 PM, Jeremy Bornstein <[EMAIL PROTECTED]> wrote:
> (assuming your profile model is called "UserProfile")
I think you just answered your own question. Consider a third-party
app that might be used to manage user profiles, but leaves the actual
implementation of that pro
On Wed, May 21, 2008 at 3:16 PM, Chris <[EMAIL PROTECTED]> wrote:
> Why does django by default output html id's in form fields? I thought
> that it was good practice to use the class attribute in child elements
> of an html form and to only use id on your container (parent) element
> such as the f
On Thu, May 22, 2008 at 3:22 PM, poschs <[EMAIL PROTECTED]> wrote:
> 1. I cant edit the ImageField by hand - e.g. If it currently contains
> 'images\fam1.jpg' I cannot manually type in images\fam2.jpg and have
> it accept it.
I don't follow what you're trying to do here. Does this "fam2.jpg"
exis
On Tue, Jun 3, 2008 at 5:15 PM, Chris Czub <[EMAIL PROTECTED]> wrote:
> # URL that handles the media served from MEDIA_ROOT.
> # Example: "http://media.lawrence.com";
> MEDIA_URL = 'http://www.mysite.com/media'
>
>
> which is correct - the url of the image SHOULD be
>
> http://www.mysite.com/media
On Thu, Jun 12, 2008 at 11:41 AM, Jean-Christophe Kermagoret
<[EMAIL PROTECTED]> wrote:
>
> I need this meta model to generate automatically django code from models.
You need a model to generate models? I don't really get what you mean.
> If there is no meta model, is there presently some code w
On Thu, Jun 19, 2008 at 8:29 PM, James Bennett <[EMAIL PROTECTED]> wrote:
> If these functions were to change, Django itself would need to undergo
> not-insignificant refactoring. And since such a refactoring is not on
> the table, they're not going to change.
*SPOILER ALERT*
In fact, I'm confid
On Wed, Jun 25, 2008 at 6:37 AM, stoKes <[EMAIL PROTECTED]> wrote:
> within django is it possible to customize upload_to in order to save
> the file into a /folder/id/category type situation?
>
> so far it just dumps everything into one directory.
As stated in the FileField documentation[1], you
On Tue, Jul 1, 2008 at 11:15 AM, John Lenton <[EMAIL PROTECTED]> wrote:
>> local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my
>> regex which isnt working looks like this
>
> in other words, local numbers match the regex
>
> r'^(?:281|832|713|1281|1832|1713)'
Or, to simplify it e
On Thu, Jul 3, 2008 at 3:25 PM, Leaf <[EMAIL PROTECTED]> wrote:
> 3. To make sure that I could run properly, I added C:\Python25 and C:
> \Python25\Lib\site-packages\django\django\bin to my PATH variable.
Looks like you've got one too many "django" directories in here. When
Python tries to import
On Fri, Jul 11, 2008 at 9:08 AM, Jon Brisbin <[EMAIL PROTECTED]> wrote:
> I was a little bummed to discover that the Postgres blob support we depend
> on at work I can't use through Django in a project for myself. I'm trying to
> keep multiple versions of an original document (including the embedd
On Mon, Jul 14, 2008 at 10:12 AM, alex finn <[EMAIL PROTECTED]> wrote:
> Can anybody explain me why django's AuthenticationMiddleware is
> setting user attribute of request.__class__ and not of request itself?
> What's the point of setting it on a class level rather then on the
> instance level?
On Mon, Jul 14, 2008 at 10:41 AM, lukeqsee <[EMAIL PROTECTED]> wrote:
> I know you can store images in a BLOB field in mysql, but is it
> possible with Django models?
Not out of the box, but you're free to create your own custom field[1]
to do that for you. If you look hard enough, you can probab
On Mon, Jul 14, 2008 at 11:02 AM, Rudolph <[EMAIL PROTECTED]> wrote:
> Ticket 5361 provides a way to accomplish this by writing a custom
> backend:
> http://code.djangoproject.com/ticket/5361
>
> The ticket is on the "maybe" list for 1.0!
I was afraid someone would bring up that ticket on this th
Well, it turns out this would've been possible even without #4144, but
now that it's in CVS, I wrote up a wiki article[1] on dynamic models,
which should give you some clues on how to dynamically generate a
model. For this case, it would suffice to use the generic approach
listed there, created th
On 9/27/07, AniNair <[EMAIL PROTECTED]> wrote:
> class Months(models.Model):
> model: utils.month
Was this a typo in your email, or do the names "Months" and "month"
not match in your code as well?
-Gul
--~--~-~--~~~---~--~~
You received this message because
On 10/1/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> Maintaining information in more than one place is a burden. We are all
> volunteers. Ergo, we try to keep the effort required to maintain stuff
> to a minimum. The reason I made the point that all of this information
> is available via Go
On 10/1/07, cjl <[EMAIL PROTECTED]> wrote:
> OK, I guess my question is: In a mature web application developed with
> Django, is admin really used for anything? Or, now that newforms-
> admin is almost here, is there any difference between admin and forms?
> Will admin just be another form, with
On 10/1/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
> You could do it by having your view act as a proxy. Basically
> instantiate a new connection to the view in question from your web
> application using urllib2 or the like. Then get the results, process
> them as you wish, and send the results of
On 10/3/07, omat <[EMAIL PROTECTED]> wrote:
> I used it for some time and observed some inconsistencies. I think
> this is because the code is not thread-safe.
>
> Do you know a thread safe way of applying this approach?
Well, "thread-safe" is a confusing term for something like this, but
you're
On 10/3/07, fdraft <[EMAIL PROTECTED]> wrote:
> So I'm keeping uploaded files in an S3 bucket. For private documents,
> their S3 permissions are set to private. So my plan has been that
> Django will check if a user is authenticated, and if so, pull the
> document from S3 and send it to the client
On 10/4/07, Simone Cittadini <[EMAIL PROTECTED]> wrote:
> How I get the name/path oh the "just saved" file so I can process it ?
http://www.djangoproject.com/documentation/db-api/#get-foo-filename
-Gul
--~--~-~--~~~---~--~~
You received this message because you a
On 10/4/07, James Mulholland <[EMAIL PROTECTED]> wrote:
> The form is rendered OK, and any changes to the 'Address' record are
> saved. Changes to the 'Country' record aren't, however, and I wondered
> if there's a way to do this. Any help much appreciated :)
It's using the save() method from Add
On 10/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote:
> It's using the save() method from AddressForm, which only knows about
> its own fields.
You should also verify that is_valid() is in fact checking all the
fields as well. I suspect that, like save(), it's only look
On the other side of it, this could almost be done by simply creating
a new base class which your view-based model could subclass, instead
of models.Model. It could share much of the existing Model code,
allowing for declarative syntax, adding in the default manager,
processing Meta options, etc.
On 10/6/07, James Bennett <[EMAIL PROTECTED]> wrote:
> > By the way, it would be nice to have a small (sub)chapter in the docs
> > that mentions all the things someone has to care of when exposing the
> > Django templates to arbitrary users.
>
> Personally, I wouldn't ever open up the template lan
On 10/8/07, James Bennett <[EMAIL PROTECTED]> wrote:
> On 10/8/07, Bill Fenner <[EMAIL PROTECTED]> wrote:
> > Which is an excellent way to partially lock someone out of the site,
> > by preemptively changing their pasword (and emailing them the new
> > one). This operation should really email a c
On 10/9/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 10/8/07, Marty Alchin <[EMAIL PROTECTED]> wrote:
> > His point is that anyone could trigger that email. And, while you're
> > right that only the true user would receive the email, the target
> >
As Malcolm mentioned, I put a lot of time into a patch to solve a
great many problems with FileField, even more than the ones you
mentioned. It's not in trunk yet, and I don't know when it will be,
but I'll answer your questions to give you an overview of how things
will likely work. Keep in mind
You'd replace "what goes here" with what you put in
"template_object_name": "author" (only without the quotes). Of course,
it'd be a little more readable if you use the plural "authors", since
you're getting a list of more than one author.
-Gul
--~--~-~--~~~---~--~---
On 10/11/07, jake elliott <[EMAIL PROTECTED]> wrote:
>
> Marty Alchin wrote:
> > You'd replace "what goes here" with what you put in
> > "template_object_name": "author" (only without the quotes). Of course,
> > it'd be a
Well, you're right that going with a standard model with two
ForeignKeys will lose some of the nice functionality associated with
Django's ManyToMany field. That's just a fact of life at this point,
I'm afraid. :( And no, Django doesn't create a separate class for the
m2m table, it just keeps trac
You can set up your regular expression like so:
import re
number_re = re.compile(r'\d+')
And then when you want to pull numbers out of the string, you can use this line:
number_list = number_re.findall(input_string)
That will give you a list of all the numbers in the string, or an
empty list
1 - 100 of 175 matches
Mail list logo