Re: using strings as fieldnames to save model

2010-11-03 Thread Brian Bouterse
** is part of python the python grammar<http://docs.python.org/release/2.5.2/ref/grammar.txt>. See this<http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/>for more info on how to use * and ** in python Brian On Wed, Nov 3, 2010 at 1:52 PM, Thomas M

Re: Forking a background process on request

2010-11-04 Thread Brian Bouterse
I would look into django-celery <https://github.com/ask/django-celery> to do asynchronous tasks. It can also be executed as a webhooks style, see here<http://ask.github.com/celery/userguide/remote-tasks.html> . Brian On Thu, Nov 4, 2010 at 3:31 AM, Elver Loho wrote: > Hi, >

Re: Hosting multiple projects

2010-11-23 Thread Brian Bouterse
We use Opus <https://github.com/bmbouter/opus> to do our django deployments. It creates a secure version of the setup described in this thread (with apache not nginx), and even takes care of deploying the databases also (if you don't mind postgres). my 2 cents, Brian On Tue, Nov 23

Re: umlaut

2010-11-29 Thread Brian Bouterse
Yes I think a template filter is the right approach. You could always define a custom template tag<http://docs.djangoproject.com/en/dev/howto/custom-template-tags/>. I've had to do this before to display currency information multinationally before. Brian On Mon, Nov 29, 2010 at 8:20

Re: django auth for existing cgi

2010-12-07 Thread Brian Craft
Copying things from request.META to the env parameter of Popen allows me to get the cgi off the ground. Now I have the problem that the cgi is generating a cookie and content type, which django returns to the browser as page content. Is there a way to pass it back transparently? Or, failing that,

Re: Best way to track user presence

2010-01-14 Thread Brian Neal
On Jan 14, 7:30 pm, E17 wrote: > Hi, > > in my Django application I need a way to track logged users presence. > > User gets an 'online' status when he/she logs in and 'offline' status > when logs out, it's pretty simple. But what is the best way to handle > non-logged-out sessions? One need to pe

Re: Deploying for designers

2010-01-23 Thread Brian Rosner
been recently using http://github.com/ask/ghettoq for a database backend. This makes dealing with the queue dependancies much better since you can run it off SQLite for development. As long as the designer has access to Python 2.5+ (and your code can run on it) pretty much everything is there

Re: Added-value over PHP?

2010-02-06 Thread Brian Neal
On Feb 3, 1:39 am, Delifisek Tux wrote: > > A decent framework eats up your %50 of > cpu resource. For example that Uber Zend FW gives you 1/6 in a hello world > app comparing plain php. Why would you want to write a Hello World program in a framework? Try writing a very large app in a framework

How to display PendingDeprecationWarning using dev. server?

2010-02-28 Thread Brian Neal
I'm having trouble seeing PendingDeprecationWarning's on stderr when using the dev server. To make sure I'm not crazy, I wrote a simple Python program that looks like this: print "** WARNING **" import warnings warnings.warn( "Testing the warnings module!",

Re: How to display PendingDeprecationWarning using dev. server?

2010-03-05 Thread Brian Neal
Any ideas? Can anyone else try this and report back? Just insert the code below into a view function and start the dev. server with "python -Wall manage.py runserver". Thanks. On Feb 28, 5:28 pm, Brian Neal wrote: > I'm having trouble seeing PendingDeprecationWarning's on

Re: How to display PendingDeprecationWarning using dev. server?

2010-03-06 Thread Brian Neal
On Mar 6, 10:29 am, Karen Tracey wrote: > This appears to be due to the way runserver reloads the process when > monitoring for source code changes.  If you specify --noreload on runserver > I bet you will see the warnings. The behavior appears to be OS-specific: I > can recreate what you describe

How to cache the output of Django 1.2 RSS class based views?

2010-03-07 Thread Brian Neal
Before the Django 1.2 beta and the class-based Feed views, I was doing this to cache my RSS feeds: urls.py: from django.contrib.syndication.views import feed as syndication_feed from django.views.decorators.cache import cache_page urlpatterns = patterns('', url(r'^feeds/(?P.*)/$', cache_

Re: How to cache the output of Django 1.2 RSS class based views?

2010-03-11 Thread Brian Neal
On Mar 7, 10:48 pm, Brian Neal wrote: > Before the Django 1.2 beta and the class-based Feed views, I was doing > this to cache my RSS feeds: > > urls.py: > from django.contrib.syndication.views import feed as syndication_feed > from django.views.decorators.cache import cache_pa

Re: Using markdown to clean html

2010-03-20 Thread Brian Neal
On Mar 19, 8:35 am, Tor Nordam wrote: > I'm currently writing a blog application in django, and a part of what > I want to do is allow some HTML in posts and comments. I discovered > yesterday, more or less by accident, that the markdown filter actually > allows some HTML. Are you using it in "sa

Re: Hostmonster shared hosting and django tinymce

2010-03-21 Thread Brian Neal
On Mar 21, 7:49 am, Bobby Roberts wrote: > can anyone help me out here?  I'm stuck and cannot get the text areas > to work using ckeditor. Does any static media work? How are you deploying? mod_python, mod_wsgi? What is the configuration? Can you access the javascript in your browser at the URL y

Re: Formatting datetimes - simple question

2010-04-06 Thread Brian Neal
On Apr 6, 5:29 pm, Paweł Roman wrote: > Hi all, > > Django has this DATETIME_FORMAT setting, which allows to format all > datetime values, whenever they are displayed. But the problem is this > is a _global_ setting, so whoever uses the application would see all > the datetimes formatted exactly t

url template tag taking a long time

2010-04-06 Thread Brian Neal
I am on trunk, somewhere around revision 127xx and just updated to 12936. A couple of my views render this one particular template, which used to take less than a second to see a response. Now it is taking almost a minute. The Django debug toolbar reports nothing out of the ordinary in terms of SQL

Re: url template tag taking a long time

2010-04-07 Thread Brian Neal
On Apr 6, 11:53 pm, Russell Keith-Magee wrote: > On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote: > > I am on trunk, somewhere around revision 127xx and just updated to > > 12936. A couple of my views render this one particular template, which > > used to take less t

Re: Considering Django: How simple is customising django-admin?

2010-04-08 Thread Brian Neal
On Apr 8, 5:15 am, UnclaimedBaggage wrote: > Hi folks, > [..] > Any > suggestions on the following would be very appreciated: > > #1.) For usability's sake, I'd like to have foreign key models > embedded in the same admin form as the model they're referencing. For > example, if there's a "products

Re: Giving up PHP. ...Can't decide between Django & Rails

2010-04-12 Thread Brian Morton
This is a tough question for sure. If you prefer Ruby syntax, then to me it seems clear. If it feels clunky, it won't flow properly and you won't code as well. Then again, you point out that you built a finished product quickly and you're happy with it compared to what you built with Rails. Isn

GenericRelation support in GeoDjango

2007-06-06 Thread Brian Luft
when trying to create the unique constraints during syncdb. Does anyone have any information about whether this is just a to do or if there are deeper underlying issues that need to be addressed within the gis branch to bring this in? Thanks -Brian --~--~-~--~~~---~--~

Taking a patch

2007-06-07 Thread brian corrigan
.diff since the last patch? Also the original patch is from 2 years ago and a lot has changed since then so I'm a little confused as to how I would go about taking in this patch. All help is much appreciated, Brian --~--~-~--~~~---~--~~ You received this me

Re: GenericRelation support in GeoDjango

2007-06-07 Thread Brian Luft
lations is the icing on the cake since any arbitrary model in one's app could then relate to my Location model without introducing any coupling between the apps. I'll wait for the dust to settle and release to the community :) Cheers -Brian On Jun 6, 7:52 pm, Justin Bronn <[EMAIL P

Re: Taking a patch

2007-06-07 Thread brian corrigan
Thanks for your help Russ. Turns out that the last .diff fitted in to the version of django I had so there is no need to add to the ticket. If anyone else is looking to take the big int patch its very simple. Cheers again Russ and to everyone who contributed to the ticket... very helpful Brian

Re: deleting rows with generic relations

2007-06-14 Thread Brian Luft
r use the same line of logic in a pre or post_delete signal. Sorry, I haven't thought through the pros/cons with either of these and I'm still waiting for the coffee to kick in after a long night of network alerts :p HTH, let me know if you find any elegant solutions. Cheers -Brian On Jun 13,

Re: newbie seeks relevant examples

2007-06-14 Thread Brian Luft
ou're looking for higher-level design help it will probably be harder to get answers since we won't know the specific context or requirements. Cheers -Brian On Jun 14, 10:35 am, "Sells, Fred" <[EMAIL PROTECTED]> wrote: > I've got a java webstart app that I would lik

Re: Noob here. Accessing data across relationships

2007-06-14 Thread Brian Luft
w you have uncoupled your presentation from your business or application logic and you could reuse that same view for other actions in your application without having to special case the code for how that data will actually be rendered :) Cheers -Brian On Jun 14, 1:55 pm, "[EMAIL PROTECT

Re: newforms, manytomany, default value.

2007-06-16 Thread Brian Rosner
eate the form from several > _models_ when the user is trying to add new information and 3) how to > instantiate the multiple save objects from the POSTed form. > > Many thanks for your kind assistance in what I know must be quite a > simple operation. You might want to check out

Re: Questions on learning curve

2007-06-19 Thread Brian Luft
anding of both the technologies and concepts you are dealing with. -Brian On Jun 18, 11:11 pm, Kelvin Nicholson <[EMAIL PROTECTED]> wrote: > > Now, maybe a stupid question but for how long does it take to really > > understand Django/Python and start actually creating some code

'module' object has no attribute 'urlpatterns'

2007-06-24 Thread brian corrigan
f 24/06/2007). Not sure that this would cause the error though. Any help would be great Cheers Brian urls.py... from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^blog/', include('jealousy.blog.urls')), (r'^gallery/'

Re: 'module' object has no attribute 'urlpatterns'

2007-06-24 Thread brian corrigan
Hi Malcom, Thanks for getting back to me so quickly. Updatting to r5520 has fixed my problem. Good work on you fix so :) Thanks again Brian On Jun 24, 11:58 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-06-24 at 10:38 +0000, brian corrigan wrote: > > Hi al

Re: Meta class preventing table add

2007-06-25 Thread Brian Rosner
oach_email`,`coach_phone`,`team_picture`,`_order`) VALUES > > ('2','2005-09-10','2','','','','','',(SELECT COUNT(*) FROM > `football_team` WHERE `school_id` = '2'))" > > > This error

searching problem

2007-06-29 Thread brian muhumuza
; ) but django thinks i'm trying to pass other parameters. I have a feeling I'm doing this the wrong way? has any one done something like this before -- Happy day - Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Anyone running Django and MySQL Cluster

2007-07-06 Thread Brian Morton
I have not done this before with Django, but I have set up a MySQL cluster before. It is the same as a standard MySQL server. Just connect to the management node as your SQL server. On Jul 6, 3:01 pm, johnny <[EMAIL PROTECTED]> wrote: > Is it even possible to run Django and MySQL Cluster or I h

Related field has invalid lookup: iexact

2007-07-15 Thread Brian Morton
I am getting the following error in my application's admin area trying to add a record for a particular object. It seems to stem from the fact that I am relating this record to a "member" object, and a member is OneToOne with User. If I relate the object directly to User as a foreignkey, I have

Re: Unique=true

2007-07-16 Thread Brian Morton
If you are using NewForms, you should implement this in the clean() method for a field. See the newforms docs and unit tests for more details. On Jul 16, 4:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > OK, fixed the above problem -- figured out that it was related to my > setting uniqu

Django tutorial with Oracle Database

2007-08-05 Thread Brian Duff
into problems, so here I am :) Am I doing something stupid, or is this a bug? Thanks, 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-

Re: Django tutorial with Oracle Database

2007-08-05 Thread Brian Duff
Ah... I guess it was maybe a bug that got fixed. I upgraded from 0.96 to the SVN trunk, and the problem went away. Thanks, Brian On Aug 5, 7:34 pm, Brian Duff <[EMAIL PROTECTED]> wrote: > Hi, > > I'm following the Django tutorial > athttp://www.djangoproject.com/d

Django tutorial with SVN trunk: descriptor 'upper' requires a 'str' object but received a 'unicode'

2007-08-05 Thread Brian Duff
ble_list)]) TypeError: descriptor 'upper' requires a 'str' object but received a 'unicode' A quick scan through management.py seems to suggest that, true enough, converter is often str.upper. Any ideas how I can resolve this? Thanks, Brian --~--~-~--~~-

Re: Django tutorial with SVN trunk: descriptor 'upper' requires a 'str' object but received a 'unicode'

2007-08-06 Thread Brian Duff
connection, get_introspection_module On Aug 5, 8:26 pm, Brian Duff <[EMAIL PROTECTED]> wrote: > I'm trying to follow the django tutorial with the latest SVN trunk (I > had to upgrade from 0.96 because there appears to be an issue with > 0.96 and Oracle databases). At the point &g

Re: Presentations about Django?

2007-08-10 Thread Brian Rosner
with the promotion of Django and keeping those presentations consistent. -- Brian Rosner http://www.brosner.com/blog --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Rails-like Flash in Django

2007-08-10 Thread Brian Morton
Django also makes use of "messages" in the django.contrib.auth module for this purpose. Of course, that only applies if you are using users and authentication for your site. I think you can use them with anonymous users though, so I think they will still work for you. http://www.djangoproject.c

Newforms file upload

2007-08-15 Thread Brian Morton
As I understand it, ticket 3297 is closed as resolved. However, I am still experiencing problems uploading files in newforms as of the latest svn checkout. Am I incorrect in my assumption that this has been fixed? Or am I experiencing issues of my own? Thanks. --~--~-~--~~---

Re: Newforms file upload

2007-08-15 Thread Brian Morton
Malcolm. Resolving it takes newforms forward a giant step. On Aug 15, 8:51 am, "Jonathan Buchanan" <[EMAIL PROTECTED]> wrote: > On 8/15/07, Brian Morton <[EMAIL PROTECTED]> wrote: > > > > > As I understand it, ticket 3297 is closed as resolved. However, I am &

Re: A "revision-controlled field" type?

2007-08-16 Thread Brian Morton
I'm not sure I really understand. It sort of sounds like you are talking about a CharField with a choices argument. Is what you're looking for more complex? Can you describe it in more detail? On Aug 16, 4:06 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > Has there been any work on a "RevisionCont

Re: A "revision-controlled field" type?

2007-08-16 Thread Brian Morton
It sounds like what you need to build is a custom ForeignKey type of field that creates another table for that field. Then, you can store an arbitrary number of revisions of that field, along with versioning information, and a wrapper around diff that can perform the functions you mention. On Au

Re: age in years calculation

2007-08-21 Thread Brian Rosner
There isn't a solution to your particular problem. Your problem is that you are accepting invalid data. Nobody can be born on a day that doesn't exist. I'd recommend verifying that the data be entered into the database is valid. On Aug 3, 5:37 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wro

Re: age in years calculation

2007-08-21 Thread Brian Rosner
Err, my bad. I wasn't thinking. I need to stop writing replies after having a few beers. ;) On Aug 21, 9:09 pm, Brian Rosner <[EMAIL PROTECTED]> wrote: > There isn't a solution to your particular problem. Your problem is > that you are accepting invalid data. Nobody can

Re: How to make a mapping/alias db table? (many-to-many)

2007-08-22 Thread Brian Rosner
> If I added the join table manually would Django still work? Or does it > need to "know" about the table? Yes, it would work fine. Django is expecting it and doesn't find it and throws that error about not finding it. Until a schema evolution solution gets merged into trunk

Re: update 2nd model via first when saved

2007-09-05 Thread Brian Morton
class Hardware(models.Model): blah = models.CharField() ... #called every time the model instance is saved def save(): #if you want many hardware history records for a piece of hardware history = HardwareHistory.create(hardware=self, ...) #if you only want

Re: sporadic VariableDoesNotExist's...

2007-09-06 Thread Brian Morton
Can we see your context processor code? On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > I have a request context which sets {'request':request}... > > On windows (dev-server) everything is fine and dandy, but on our live > site (splicemusic.com, Apache2

Re: sporadic VariableDoesNotExist's...

2007-09-06 Thread Brian Morton
Also, do you have django.core.context_processors.request in your context_processors? It looks like you're trying to overwrite a dict element that already exists. On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > I have a request context which sets {'requ

Re: Databases, one or many

2007-09-06 Thread Brian Morton
Well, by its nature, each Django project has its own DB. Multi-db support is coming soon, but not in trunk yet. If these are all applications that belong to the same project, Django is not designed to handle them on a per-DB basis. The convention Django uses is a DB for the project and _ for th

Re: Databases, one or many

2007-09-06 Thread Brian Morton
/company/website and put the separate apps (based on function) under the project. On Sep 6, 4:49 pm, "Adam Jenkins" <[EMAIL PROTECTED]> wrote: > On 9/6/07, Brian Morton <[EMAIL PROTECTED]> wrote: > > > > > Well, by its nature, each Django project has its own DB.

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, 2007-0

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 system

Re: Adding a request.user to a ModelForm instance

2008-01-07 Thread Brian Rosner
uest.user #excluded 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 exe

Re: newforms and updating

2008-01-25 Thread Brian Rosner
est.FILES, instance=instance) 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 ht

Re: newforms validator_list

2008-02-01 Thread Brian Rosner
ield1 is filled, 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

Re: Stylesheet Inheritance

2008-02-01 Thread Brian Rosner
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: Newbie trying to install django-trunk from svn on Ubuntu 7.10

2008-02-01 Thread Brian Rosner
't need 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" gro

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: newforms-admin replacement for core=True in inline models?

2008-02-03 Thread Brian Rosner
n issue in 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 mess

templatetags and import path

2008-02-04 Thread Brian Luft
Is it bad practice to name 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

Re: templatetags and import path

2008-02-05 Thread Brian Luft
latetags and hence our import 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',

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 djan

Re: newforms-admin inlines question

2008-02-11 Thread Brian Rosner
It should be "extra" 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 pos

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

2008-02-14 Thread Brian Rosner
ge. I look forward 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 su

Re: Reporting with Django

2008-02-14 Thread Brian Rosner
b [1] 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 dj

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

2008-02-17 Thread Brian Luft
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 someth

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: 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 s

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: 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: >

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

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: location of CSS

2008-03-05 Thread Brian Luft
e this has serious implications for the future scalability 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

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: 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: 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: 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 djang

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

2008-03-26 Thread Brian Armstrong
o create them one at a time. Another way is to take the same SELECT statement and use it as a subquery 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.

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

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

2008-03-26 Thread Brian Armstrong
ion to me, I guess. 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 e

Re: css problem

2008-03-27 Thread Brian Armstrong
you're going 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 --~--~-~--~~---

Re: Using ModelForm...not populating my choices

2008-03-27 Thread Brian Armstrong
= forms.CharField(widget=forms.RadioSelect) > > class Meta: > model = Survey > > > > Thanks for any help! > > > > Greg, I believe what you want is a ChoiceField in SurveyForm. --Brian --~--~-~--~~~---~--~

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: Best practice for databases and distributed development with Django

2008-04-02 Thread Brian Luft
he "manage dumpdata/loaddata" 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 t

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, **kwarg

Re: Tricky newforms problem

2008-04-11 Thread Brian Morton
g 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

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 your

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 loc

Re: gpl3 question

2008-05-08 Thread Brian Jackson
t app. 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 2

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, should

Re: invalid filter: 'wikify' error

2008-05-14 Thread Brian Hunter
#x27;, wikify) > def wikify(value): >     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 --~--~-~--~~~---~--~~ Yo

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 admin.site

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: Change field and Admin meta class properties dynamically

2008-05-28 Thread Brian Rosner
elopment 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: ASP.Net GridView Equivalent in Django

2008-06-05 Thread Brian Victor
most of the functionality you want (using the query string) encapsulated in a template tag. I've thought a couple of times about trying to do that, but haven't had enough of a need to actually do it. -- Brian --~--~-~--~~~---~--~~ You received this message

Re: auto generate models

2008-06-13 Thread Brian Rosner
sure that 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, sen

<    1   2   3   4   5   6   7   8   9   10   >