Re: Trouble activating the admin interface

2008-07-02 Thread Brian Luft
Do you have 'django.contrib.auth' and 'django.contrib.contenttypes' in your INSTALLED_APPS setting? On Jul 2, 10:20 am, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > Hi, > > I'm learning django with "the definitve guide to django". On chapter 6, > I tried to activate the admin interface fro

Re: Using SQLite in production

2008-07-02 Thread Brian Luft
away with running sqlite in a production setting. However, please don't interpret this as a recommendation from me. -Brian On Jul 2, 5:20 am, David Marko <[EMAIL PROTECTED]> wrote: > I'm just considering using SQLite in small Django project(in > production environment). I have n

Re: CharField as text?

2008-07-01 Thread Brian Luft
What is your purpose in defining a form field if it won't be used for user input? On Jul 1, 12:46 pm, Stuart Grimshaw <[EMAIL PROTECTED]> wrote: > Is it possible (with newforms) to either display a CharField as just > text, or have it's value used as the label on another field? I'm >

Re: Development File Structure

2008-07-01 Thread Brian Luft
TED]> wrote: > On 1 juil, 20:12, [EMAIL PROTECTED] wrote: > > > brian, thnx. > > > i got python2.5 installed and django9.6 installed. when i run my > > python command line and import django and test the version it works. > > however when i run the command prompt in win

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
el manager for your events model. That might be the best option for retrieving the joined set of events with current occurrences in one fell swoop in a nice abstracted manner. -Brian On Jul 1, 10:12 am, Brian Luft <[EMAIL PROTECTED]> wrote: > Ok, you are asking for a list of events t

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
occurrences based on date in that step. -Brian On Jul 1, 9:51 am, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have Events and Occurrences of an Event. Occurrence contains a > foreign_key for the Event. > In my template, I need to display the Event and Occurrenc

Re: memcache not used?

2008-07-01 Thread Brian Luft
In your settings file you have indicated that memcached is running on port 112211 but your process listing shows it running on 11211. -Brian On Jul 1, 9:34 am, "Oscar Carlsson" <[EMAIL PROTECTED]> wrote: > Hi! > > For some reason, django doesn't seem to ad

Re: Development File Structure

2008-07-01 Thread Brian Luft
Any 3rd-party Python package or module that you intend to use needs to be on the Python path. The Django documentation actually provides some instructions on how to accomplish this: http://www.djangoproject.com/documentation/install/#install-the-django-code -Brian On Jul 1, 8:53 am, [EMAIL

Re: Full list of Django features?

2008-06-26 Thread Brian Luft
ork should reduce the boring, repetitive work but you'll still have to solve some problems on your own. Personally I'd rather solve those problems using Python than other languages I've used. Python itself has a tremendous ecosystem of libraries and modules. -Brian On Jun 26, 2:21 pm, Phillip B

Re: newforms and views.generic.create_update.create_object

2008-06-26 Thread Brian Rosner
On Jun 26, 2008, at 1:23 PM, timc3 wrote: > > Might be a stupid question but how did you apply the patch? Get inside your Django directory and execute:: patch -p0 < the_path.diff That should get it going. Let me know if you have any more questions. Brian Rosner http://oe

Re: Unexpected Keyword Argument 'radio_admin'

2008-06-26 Thread Brian Rosner
opy of Django from newforms-admin to trunk.\ Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: views.py: Always a simple return?

2008-06-25 Thread Brian Luft
Have you thought about using comet? Here is a link to an example implementation using orbited: http://www.rkblog.rk.edu.pl/w/p/django-and-comet/ -Brian On Jun 25, 1:56 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > Generally with HTTP, you would configure your server to

Re: Django inserts an empty string into IntegerField?

2008-06-25 Thread Brian Luft
In response to your side question: http://www.djangoproject.com/documentation/model-api/#null -Brian On Jun 25, 2:12 pm, Huuuze <[EMAIL PROTECTED]> wrote: > Between you and Karen, I've resolved the problem.  I had a bug here: > > >> zip = forms.CharField(max_length=5, wid

Re: python-admin.py startproject error

2008-06-25 Thread Brian Luft
django-admin.py is a python script that should be run from the command line (not the Python interpreter) -Brian On Jun 25, 12:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm going through the tutorial and after importing django and running > the django-admin.p

Re: Common data in templates

2008-06-25 Thread Brian Luft
Try these links: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext http://www.djangoproject.com/documentation/templates_python/#writing-your-own-context-processors -Brian On Jun 25, 11:51 am, Juanjo Conti <[EMAIL PROTECTED]> wrote: &g

Re: Convert string to html

2008-06-25 Thread Brian Luft
http://www.djangoproject.com/documentation/templates/#automatic-html-escaping On Jun 25, 10:36 am, TigerHawk <[EMAIL PROTECTED]> wrote: > Hello, > This is my first post and I'm fairly new to Django/Python. I am having > a little trouble getting a string converted to html. > > Here is my view

Re: Do you code django with Komodo?

2008-06-25 Thread Brian Luft
and I'm glad to see others are interested. I'd appreciate any help, ideas, and suggestions as things get going. I also have no experience with XUL or mozilla extensions so it will be a learning process throughout. Stay tuned... Cheers -Brian On Jun 25, 12:32 am, Jörn Paessler <[EMAIL PROTEC

Help with mod_python and dynamic vhosts

2008-06-22 Thread Brian Ritchie
hen derived from # the IP address of the virtual host. So I'm looking for a mix of dynamic vhosts for all of my domains except one select vhost that gets handled by mod_python. Any insight would be helpful. Thanks. Brian --~--~-~--~~~---~--~~ You received this mess

Re: Display image in django admin

2008-06-19 Thread Brian Rosner
On Jun 19, 2008, at 11:34 AM, Leon Yeh | New Avenue.net wrote: > > def thumbnail(self): > return """""" % (self.photo) After the function add thumbnail.allow_tags = True. Brian Rosner http://oebfare.com --~--~-~--~~---

Re: correct list for newforms admin questions? named urls / replacing admin root page

2008-06-17 Thread Brian Rosner
the newforms-admin branch. See ticket #6470 [1]. At this point your best bet is to hardcode the URLs. [1]:http://code.djangoproject.com/ticket/6470 Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: auto generate models

2008-06-13 Thread Brian Rosner
hat the ORM generates the SQL you would expect from a foreign key. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Change field and Admin meta class properties dynamically

2008-05-28 Thread Brian Rosner
ent closely [2] most pain can be mitigated. [1]: http://code.djangoproject.com/wiki/NewformsAdminBranch [2]: http://code.djangoproject.com/log/django/branches/newforms-admin Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because

Re: un-escaping params

2008-05-19 Thread Brian
> Thanks, > Ivan > tipjoy.com > > > I'm not sure if this is how django does it, but I would use urllib.unquote(params). If you give it unicode, it returns unicode. Brian --~--~-~--~~~---~--~~ You received this message because you are subs

Re: TypeError: Cannot resolve keyword 'slug' into field

2008-05-19 Thread Brian
On May 19, 8:19 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Ah, sorry, I missed the fact that it was admin causing the error.  The error > looks to be in the old manipulator/validator code for the slugfield.  With > newforms-admin this code is on its way out, so unlikely to get much >

Re: TypeError: Cannot resolve keyword 'slug' into field

2008-05-18 Thread Brian
On May 18, 6:01 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Based on the choices the error message lists, it appears you have added code > that tries to access the slug field in an Mp3_Set model instance. However, > you have added the slug field to the other model, Mp3. > > Karen Where

Re: Caching: Memcached vs locmem

2008-05-18 Thread Brian
On May 18, 12:55 pm, "Brett Hoerner" <[EMAIL PROTECTED]> wrote: > On Sat, May 17, 2008 at 8:12 PM, Brian <[EMAIL PROTECTED]> wrote: > > But if you aren't clustering, say you have only a single server, is > > there an advantage? > > Yes, locmem

Re: Caching: Memcached vs locmem

2008-05-17 Thread Brian
On May 17, 7:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I managed to get memcached up and running in about 5 minutes, so > whilst it does involve more setup than locmem I wouldn't say it's > difficult to the point of not being worth doing. Thanks for that. I'll likely give it a try.

TypeError: Cannot resolve keyword 'slug' into field

2008-05-17 Thread Brian
I've searched for this, but people think it is either fixed or very hard to reproduce. In my case it is 100% reproducible, and I wonder if it is my own fault. I have a model for a mp3 set (a set of mp3s). Individual mp3's are associated with the set via a Foreign key. I recently added a slug

Caching: Memcached vs locmem

2008-05-16 Thread Brian
Can someone run down the differences between using Memcached vs locmem? The docs indicate Memcached is "the best" solution, but seems considerably harder to setup. Just curious what the trade-offs are. Thanks. --~--~-~--~~~---~--~~ You received this message

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brian Rosner
lean_name(self): > value = self.cleaned_data["name"] > if name == "Brian": > raise forms.ValidationError, u"You are not allowed to be named > Brian." > return value Oh, and if name == "Brian" should

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brian Rosner
def clean_name(self): value = self.cleaned_data["name"] if name == "Brian": raise forms.ValidationError, u"You are not allowed to be named Brian." return value class PersonAdmin(admin.ModelAdmin): form = PersonForm adm

Re: invalid filter: 'wikify' error

2008-05-14 Thread Brian Hunter
e): >     return wikilink.sub(r"\1", value) Did you try calling register.filter('wikify', wikify) after the wikify method instead of before? -Rajesh Brian Hunter brianhunterstudio.com --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: IntegrityError on newforms-admin

2008-05-09 Thread Brian Rosner
On May 9, 4:31 am, Nuno Mariz <[EMAIL PROTECTED]> wrote: > I'm using newforms-admin and I've got a "duplicate key violates unique > constraint" when I'm added new record(with the same value on field > that already exists in the db) in admin interface. > I've an "unique=True" in the field,

Re: gpl3 question

2008-05-08 Thread Brian Jackson
. Since you could take out the app and still have functionality (assuming that the apps are written well). There in lies the problem with asking for legal advice on a technical mailing list. You could very well get 40 perfectly logical interpretations back. --Brian Jackson On Thursday 08 May 2008 5

Ma.gnolia API Django and time zone

2008-05-08 Thread brian mckinney
Does anyone happen to know the proper way to interact with an API that won't convert trailing UTC time zone specifications? I'm trying to sync up a Django app with the Ma.gnolia's api, and Ma.gnolia will not convert UTC adjusted times. The two hour differential will not allow me to sync up my

Re: Unique Users Per Site in 'users' & 'sites' Frameworks

2008-05-07 Thread Brian
o be to alter the user database and roll my own login methods. This > would probably work, but just does not feel right. I'm pretty new to > Django, is there something I'm missing? Or is rolling your own really > the only way to implement this? > > Regards > > Jonas > &g

Re: Unique Users Per Site in 'users' & 'sites' Frameworks

2008-05-07 Thread Brian
ent this? > > Regards > > Jonas > > On Wed, May 7, 2008 at 12:06 PM, Brian <[EMAIL PROTECTED]> wrote: > > >  I'm building an application where each customer has an account in the > >  system. That account has multiple users in it, each with their own > >  us

Unique Users Per Site in 'users' & 'sites' Frameworks

2008-05-07 Thread Brian
) also have a distinct user named UserA? Will I need to set up a whole new database and settings.py for each site? Thanks in advance, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Render raw image

2008-04-28 Thread Brian
Have you considered creating a separate view for that particular image? You'd have a view designed to grab that image and return it with the proper MIME type. Then you could, in your Welcome method, return a dynamically generated path to that URL using the reverse() method, which you'd use in

Re: Complex Django Hosting

2008-04-25 Thread Brian
. The fact that they don't oversell (or at least they say they don't) makes it much more responsive than my previous VPS host, where the servers would slow down over time as they'd continue piling the customers on. Brian On Apr 25, 8:44 am, Josh <[EMAIL PROTECTED]> wrote: > I'm working

Re: Pre-processing and preparing data in a separate thread or process?

2008-04-15 Thread Brian Rosner
> Of course, you'll have to develop a good workflow so that either your > user is notified on that page when the import is completed (possibly > through some ajax-y interface either by polling or using a Comet > system) or, the easy way out, just provide a page that provides a > status, where

Re: Tricky newforms problem

2008-04-11 Thread Brian Morton
for in cleaned_data. Ideally, I need to capture the song ids that were selected in some kind of iterable datatype, then loop through them and look them up in the model to get info for output. On Apr 11, 6:10 am, "Phil Davis" <[EMAIL PROTECTED]> wrote: > On 11/04/2008, Brian Morto

Tricky newforms problem

2008-04-10 Thread Brian Morton
I have run into an interesting problem with newforms. I am trying to create an arbitrary number of fields on a form based on model data. This works fine. class SonglistForm(forms.Form): def __init__(self, *args, **kwargs): super(SonglistForm, self).__init__(*args,

Re: Best practice for databases and distributed development with Django

2008-04-02 Thread Brian Luft
dance to get your data out of sqlite and into your DB of choice. -Brian On Apr 2, 9:04 pm, Simon Oberhammer <[EMAIL PROTECTED]> wrote: > > that developer has to inform all others of the changes so they all > > make the change manually on their own local database. > > y

Re: IntegrityError: duplicate key violates unique constraint

2008-03-28 Thread Brian Armstrong
Also, if you have access to the old DB still, consider exporting the entire thing out again. Make sure that you include the structural part as well as the data itself. It should export it directly as a series of SQL statements. A complete dump will provide information about the sequences.

Re: Using ModelForm...not populating my choices

2008-03-27 Thread Brian Armstrong
class Meta: > model = Survey > > > > Thanks for any help! > > > > Greg, I believe what you want is a ChoiceField in SurveyForm. --Brian --~--~-~--~~~---~--~~ You received this message because you are subs

Re: css problem

2008-03-27 Thread Brian Armstrong
to point to the media subdomain in the line like media.yourdomain.com/style.css. I hope that made sense. :) This only counts if you're using a real server. I don't know how you get CSS on the dev server, or if you even can. --Brian --~--~-~--~~~---~--~~ You

Re: Using an INSERT...SELECT... type of query

2008-03-26 Thread Brian Armstrong
ess. Maybe it's just a stylistic concern. Thanks again and sorry for the noise, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: Loop Counter

2008-03-26 Thread Brian Armstrong
ms (e.g. display 7 items per page) > > How would I go about this? > > Thanks > Duncan Have you looked at Django's pagination? http://www.djangoproject.com/documentation/models/pagination/ Brian --~--~-~--~~~---~--~~ You received this message because you a

Re: Using an INSERT...SELECT... type of query

2008-03-26 Thread Brian Armstrong
Oh, wait, duh, that's what the Many-to-Many relationship is. Sorry about that. I feel rather dumb now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Using an INSERT...SELECT... type of query

2008-03-26 Thread Brian Armstrong
ubquery to an INSERT, so that your db does all this for you. It might be preferred to do it this way if you don't want the overhead of passing all the entries back and forth between db and server. If I'm looking at this the wrong way, please let me know. :) Brian --~--~-~--~~

Using an INSERT...SELECT... type of query

2008-03-26 Thread Brian P Armstrong
be glad to continue working on it (error checking, documenting, and more input types) if anyone thinks it might be useful. http://dpaste.com/41475/ Thanks, Brian Armstrong --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: newforms-admin InlineFormSet usage?

2008-03-07 Thread Brian Rosner
> I gave a look at newforms.models and I see this "InlineFormSet" class, > but I can't really understand how to use it, nor I can find docs on > this matter, the only thing I found (don't ask me how) is > http://code.djangoproject.com/ticket/6632 .. that explains the various > FormSets (including

Re: Newforms-admin: filter_horizontal doesn't work

2008-03-07 Thread Brian Rosner
> "Hold down "Control", or "Command" on a Mac, to select more than one." > > and NO select boxes, search input etc! What revision of newforms-admin are you using? Also, what browser is this behavior is displayed i

Re: Problem with encoding and feeds

2008-03-06 Thread Brian Morton
2019 is an right single quote in unicode. Perhaps that title is causing the problem? Did you paste it from some editor that would have created it as that character rather than an apostrophe? Maybe you should correct that by hand if it was pasted. On Mar 6, 7:37 pm, "[EMAIL PROTECTED]" <[EMAIL

Re: location of CSS

2008-03-05 Thread Brian Luft
ity and maintenance of your application. This user group and community are very helpful. If you can describe more about what you are trying to architect you'll get a lot of great pointers about best practices and the best manner in which to leverage the strengths of the framework. -Brian On Mar

Re: location of CSS

2008-03-05 Thread Brian Luft
Serving static media really has nothing to do with Django. Presumably your browser is reading the CSS file and making a request back to your web server for the file. You haven't told us anything about your web server configuration. What path is being requested to the server for the image file?

Re: HttpResponseRedirect not redirecting

2008-03-03 Thread Brian Luft
Take a look at your url patterns. Your first one is: (r'^addorder/', add_order), so 'addorder/results' is going to match to your first url pattern (so would 'addorder/mydogspot' for that matter). The view to be executed will be add_order. Cheers -Brian On Mar 3, 2:27 pm, bobhaugen <[EM

Re: Problem with contrib.syndication

2008-03-02 Thread Brian Luft
In your urlpatterns, you are passing a string for the value of feed_dict ("feeds"). You need to pass the actual dictionary object that you setup for yourself: ...{ 'feed_dict' : feeds } Cheers -Brian On Mar 2, 10:39 am, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello

Re: Django minify and combine script?

2008-02-23 Thread Brian Luft
http://code.google.com/p/django-assetpackager/ http://www.djangosnippets.org/snippets/405/ http://www.djangosnippets.org/snippets/524/ Cheers -Brian On Feb 23, 7:02 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Sat, Feb 23, 2008 at 8:26 AM, Thierry <[EMAIL PROTEC

Re: Converting relational data to hiechical data

2008-02-21 Thread Brian Luft
http://www.djangoproject.com/documentation/templates/#unordered-list On Feb 21, 4:22 am, shabda <[EMAIL PROTECTED]> wrote: > I have a model like > > class Task(models.Model): > name = Models.CharField(max_length = 100) > parent = models.ForeignKey('Task', null = True) > > Using this model

Re: problem with django tagging application

2008-02-20 Thread Brian Luft
Any chance you were using django-tagging previously and recently updated to trunk? There are backwards incompatible changes - the relation names have changed: http://code.google.com/p/django-tagging/wiki/BackwardsIncompatibleChanges -Brian On Feb 20, 4:25 pm, cesco <[EMAIL PROTECTED]>

Re: Deploying Django - can't get past the welcome screen

2008-02-17 Thread Brian Luft
NF set to "mysite.urls". Is that in fact the correct URLs file? I would suggest jumping into the python interpreter and importing your desired settings file, check the __file__/__path__ module attributes and also do the same with your urls.py file just to make sure you aren't loading something u

Re: Reporting with Django

2008-02-14 Thread Brian Rosner
python library. [1]: http://www.reportlab.org/ -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: Python & Django Noob at Django Sprint at PyCon 2008?

2008-02-14 Thread Brian Rosner
to seeing you at PyCon this year! [1]: http://code.djangoproject.com/wiki/SprintIdeas [2]: http://code.djangoproject.com/wiki/SprintPyCon2008 -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: newforms-admin inlines question

2008-02-11 Thread Brian Rosner
a" without the "s". [1]: http://code.djangoproject.com/ticket/6075 -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Syndication is generating bad url

2008-02-07 Thread Brian Luft
I ran into the same problem. I also wanted to add for any other users out there that Django caches the value of the current site so if you make a change you'll need to restart your server/python instance. On Jan 7, 10:33 am, RevMatt <[EMAIL PROTECTED]> wrote: > Figured it out myself. In my

Re: templatetags and import path

2008-02-05 Thread Brian Luft
path looks like: (Pdb) import sys (Pdb) sys.modules['django.templatetags'].__path__ ['C:\\Python25\\lib\\site-packages\\django-svn\\django\\templatetags', 'C:\\Pyth on25\\lib\\site-packages\\django-svn\\django\\contrib\\admin\ \templatetags', 'c: \\documents and settings\\brian\\workspace\\tagging\\te

templatetags and import path

2008-02-04 Thread Brian Luft
a templatetag file the same as the app? Have I discovered a bug? Suggestions, workarounds tremendously appreciated. -Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: newforms-admin replacement for core=True in inline models?

2008-02-03 Thread Brian Rosner
trac if you can't find > anything matching. http://code.djangoproject.com/ticket/5878 -- I am still unsure of the correct way to fix this, but it is a known issue. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you

Re: Newbie trying to install django-trunk from svn on Ubuntu 7.10

2008-02-01 Thread Brian Rosner
port PYTHONPATH=/home/user/django-trunk -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ 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

Re: Newbie trying to install django-trunk from svn on Ubuntu 7.10

2008-02-01 Thread Brian Rosner
eed to be switching between versions very often or it is a production server, for example. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Stylesheet Inheritance

2008-02-01 Thread Brian Rosner
are using the RequestContext to ensure {{ MEDIA_URL }} is displayed correctly in your templates. (This will only work if you are using HEAD of Django trunk, otherwise you must write your own context_processor). -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~---

Re: newforms validator_list

2008-02-01 Thread Brian Rosner
field2 is not required.) As I pointed out above this is still newforms. This type of validation is very possible since the form clean_FIELD methods are never passed its own value. It is the job of the developer to pull out the values from cleaned_data that a clean_FIELD method, you are implemen

Re: newforms and updating

2008-01-25 Thread Brian Rosner
if form.is_valid(): form.save() else: form = MyModelForm(instance=instance) return render_to_response("mytemplate.html", { "form": form, }, context_instance=RequestContext(request)) -- Brian Rosner http://oebfare.com --~--~-

Re: Adding a request.user to a ModelForm instance

2008-01-07 Thread Brian Rosner
cluded in PlaceForm > newplace.save() Wow, you are so close to making this work :) You are passing in "False" to commit which will always be a True statement. Remove the quotes to pass in the boolean value False. It should then work. > > Exeption after executing this lin

Re: Django is more?

2008-01-02 Thread Brian Costlow
We have a Django web application that also uses parts of Django to feed data to the database automatically. There's an application built in Twisted that receives messages from various other servers and 'does something' based on the message. One of the 'does somethings' is using the Django ORM

Re: how to deal with inherited template context variables?

2007-12-31 Thread Brian Costlow
Sam, Am I missing something, or is there a reason you don't just factor out the common bits into a function or set of functions in views.py, or a library it imports? For a couple of simple things we do on multiple sites (e.g. we do friendly names including Title and Suffix etc, from data in the

Re: File Upload perfomance

2007-12-31 Thread Brian Rosner
e stored in memory then written to disk. Clearly you can see this being a problem with large files of 600-900 MB. Check out [1] which has patches to stream large files to disk before saving it in its destination directory as defined by upload_to in your FileField. [1]: http://code.djangoproject.com/t

Re: How to make fields with editable=False visible in the Admin interface

2007-12-21 Thread brian corrigan
On Dec 21, 2:20 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Dec 20, 2007 9:03 AM, GodOfGeeks <[EMAIL PROTECTED]> wrote: > > > The problem is that when I set the fields to editable=False then they > > won't be visible in the adminModel > > The admin interface is deliberately designed not

Re: Admin-editable configuration for Django?

2007-12-21 Thread brian corrigan
Unless these are settings that Django needs lite configured apps or db settings I can't see why you wouldn't use a config file, especially if it is just for mail settings. On Dec 20, 10:32 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > James Bennett napisał(a): > > >> While this might work for the

Re: how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Brian Rosner
-based, but > page_range (for the template-output) is one-based. > > this wouldn't be a problem if i could switch to 1-based object- > pagination. so how do i dow? write my own object-pagionation-subclass? > > -- Brian Rosner http://oebfare.com --~--~-~

Re: database API filter() vs get()

2007-12-17 Thread Brian Rosner
on't be hit until it is evaluated. Ex. it is iterated over in a for loop, you do a[0].id, or you provide a step in the slice a[::2]. .get will actually hit the database when called. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You received this

Re: How do you add the edit of another object from another object's admin view

2007-12-17 Thread Brian Rosner
Yes, you can. This is called edit_inline in Django. Check out [1] and read that section. It will show you how to accomplish edit_inline. [1]: http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships Thanks. -- Brian Rosner http://oebfare.com --~--~-~--~--

Re: Performance of a django website

2007-12-11 Thread Brian Morton
http://www.djangoproject.com/documentation/db-api/#select-related On Dec 11, 1:18 pm, Joe <[EMAIL PROTECTED]> wrote: > I've found the largest memory hog to be the native way related tables > are setup. > > Check class definitions with related tables and edit as such: > > class ...(models.Mode):

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Sorry, just saw your earlier post about debug being turned off. I would say it is definitely time to start profiling your code. On Dec 11, 2:11 pm, Brian Morton <[EMAIL PROTECTED]> wrote: > Joseph raises a good point. I only recently discovered what a > performance killer DE

Re: Performance of a django website

2007-12-11 Thread Brian Morton
ets.org/snippets/93/ > > -joe > > On Dec 11, 2007 10:49 AM, Richard Coleman <[EMAIL PROTECTED]> wrote: > > > > > Brian Morton wrote: > > > Are you serving static content from the same apache instance? Also, > > > what kind of network connectivit

Re: Performance of a django website

2007-12-11 Thread Brian Morton
Are you serving static content from the same apache instance? Also, what kind of network connectivity do you have between your web and mysql servers? It sounds like apache might need some tuning in terms of thread parameters. Have you enabled caching yet? Turn on the cache framework site-wide

Re: Help debugging Django/MySQLdb exception

2007-12-06 Thread Brian Morton
, the "key" would repeat and the row would not be inserted. However, no exception was ever raised about a duplicate primary key on save(). I am puzzled by this. Why would it not complain about a primary key violation? On Dec 5, 12:29 pm, "Karen Tracey" <[EMAIL PROTECTED]>

Help debugging Django/MySQLdb exception

2007-12-04 Thread Brian Morton
I'm not sure what could be causing this problem. This is a loader script that is loading a CSV and using the Django ORM to do lookups and inserts. This is on a workstation with 1GB of memory running Ubuntu Gutsy (the MySQL server is local also). I'm using MySQLdb 1.2.2 and there do not seem to

Re: Expiring cache entries through model save()

2007-11-30 Thread Brian Morton
Thanks for the advice Malcolm. I am going to give this more thought and see if I can come up with a generic high performance hash function. On Nov 30, 3:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-11-30 at 12:08 -0800, Brian Morton wrote: > > I have an i

Expiring cache entries through model save()

2007-11-30 Thread Brian Morton
I have an interesting idea that I am not quite sure how to pursue. I'm wondering if any of you have figured this out already. What I would like to do is set the cache expiration for a particular object in the cache to be very high, and then delete the item from the cache when an instance of its

Taconite + jquery + Django

2007-11-08 Thread Brian Costlow
Just thought I'd pass this along. I've been lurking about learning as I work on a couple of Django-based projects, and thought it was time to share something back. I've been having a lot of success with this combination in an app I've been tweaking and extending the past week. It's basically a

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread Brian Rosner
What you really need is to use the formfield_callback argument to form_for_instance. This allows you to override the default fields that are returned for a given field in the model [1]. There is an open bug, [2], that will allow for an easier way of overriding the queryset that is ultimately

Re: Backend does not find views

2007-10-29 Thread Brian Morton
Deleting your checkout and re-checking out the SVN tree couldn't hurt. Can you tell us more about your environment? What OS? What version of Python? What web server are you using? On Oct 29, 3:53 am, oversize <[EMAIL PROTECTED]> wrote: > Hello, > my (very strange) problem is: When i want to

Djangonauts in Amsterdam, Prague, or Krakow?

2007-10-19 Thread Brian Luft
My wife and I are travelling through Eastern Europe for the next 2 months. (we're starting in Amsterdam though). I'd love to meet up with any Djangonauts for a little chat. I like beer, wine, Django, and open source software if anyone can spare a few minutes for a chat :) Cheers -Brian

Re: Switching between databases with same project/model

2007-10-12 Thread Brian DeGeeter
dynamic db settings. I'd be interested in the complex answer if anyone has one. Specifically for the command line tool we have. Editing the settings.py with a sed script seems so crude. Thanks, -Brian On 10/12/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 10/11/07, [EMA

Re: newforms-admin raw_id_fields performance problem

2007-10-09 Thread Brian Rosner
Patches are welcome. (And no Malcolm, > that's not directed at you ;) Your wish is my command ;) http://code.djangoproject.com/ticket/5720 > > Joseph > > [1] > http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/options.py#L503 [2] > > htt

Re: Problems with deploying django

2007-09-10 Thread Brian Morton
I would remove your source built code and reinstall python2.5 and the development package for it. Make sure any other versions of python are uninstalled unless other packages depend on them. On Sep 10, 3:11 pm, shabda <[EMAIL PROTECTED]> wrote: > I am trying to deploy django on a fedora 7

Re: Django Flatpages With Memcache as storage location

2007-09-09 Thread Brian Morton
What happens if you use a simple or dummy cache? On Sep 9, 2:51 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: > On Sep 9, 6:15 am, Thomas Badran <[EMAIL PROTECTED]> wrote: > > > > > My best guess would be that you are missing the / at the start and end > > of the url > > > Tom > > > On Sat,

<    3   4   5   6   7   8   9   10   >