Forms generated from models missing primary key

2008-10-22 Thread MrMuffin
I'm generating html forms from models using ModelForm. When I do something like : >>> article = Article.objects.get(pk=1) >>> form = ArticleForm(instance=article) the generated form doesn`t have a hidden field for the primary key. Why? What`s the best way to add it? --~--~-~--~~-

Re: Can't do any manipulation on a db object

2008-10-22 Thread guruyaya
Oh. Boy do I feel stupid. Thanks for all your help. I'll try to be less careless next time. On Oct 22, 8:43 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-10-21 at 23:33 -0700, guruyaya wrote: > > This is actually worse > > You mean top-posting? Yes, it's a terrible habit and y

Re: Spliting a single result from a db

2008-10-22 Thread [EMAIL PROTECTED]
> HI all, > > I've just starting using django and am really impressed. In my simple > app I want to retrieve a single "article" from a db and then display > it broken into reasonable length pages (either based on word count or > a specific markup in the text). I'd really appreciate any pointers

Re: Spliting a single result from a db

2008-10-22 Thread Daniel Roseman
On Oct 22, 9:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > HI all, > > > I've just starting using django and am really impressed. In my simple > > app I want to retrieve a single "article" from a  db and then display > > it broken into reasonable length pages (either based on word coun

Re: Query: Field of model "not defined", but existing

2008-10-22 Thread barney
Thanks, added a new attribute. Someone already told me about the limited functionality of syncdb and alternative methods. Once again thanks very much! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Spliting a single result from a db

2008-10-22 Thread Tim O'Toole
oh right, cool. Thanks a million. so after splitting like you suggest I could use pagination? On Wed, Oct 22, 2008 at 9:10 AM, Daniel Roseman < [EMAIL PROTECTED]> wrote: > > On Oct 22, 9:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > HI all, > > > > > I've just starting using django

template tags with variables as arguments

2008-10-22 Thread ramya
a. Can template tags take arguments (not a string) {% formatDateTime_5 value %} where value is a variable time data did not match format: data=value fmt=%Y-%m-%dT%H:%M:%S+ b. Can template tags take objects as arguments.. tat is if the above is possible.. Regards, ~ramyak/ --~--~-~-

Re: template tags with variables as arguments

2008-10-22 Thread Marcin Mierzejewski
Hi Ramyak, > a. Can template tags take arguments (not a string) > {% formatDateTime_5 value %} > where value is a variable > time data did not match format: data=value fmt=%Y-%m-%dT%H:%M:%S+ Yes. > > b. Can template tags take objects as arguments.. tat is if the above > is possible.. Yes.

Accessor for field 'user' clashes with related field 'User.*'

2008-10-22 Thread lcordier
I have recently changed the layout of my code. Putting all my apps into an apps sub-directory to make things a bit cleaner. Basically the same layout as http://code.djangoproject.com/browser/djangoproject.com/django_website/apps To run my tests I have to go into the apps sub-directory and run it

Re: template tags with variables as arguments

2008-10-22 Thread ramya
I am probably turning blind.. but I am still not able to figure out why string "value" is being passed instead of value "value" I have the following template {% for value in list %} {% formatDateTime_5 value %}

Re: template tags with variables as arguments

2008-10-22 Thread ramya
Awesome.. Worked.. Thanks !! ~ramyak/ On Oct 22, 3:52 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > n 22 oct, 12:14, ramya <[EMAIL PROTECTED]> wrote: > > > I am probably turning blind.. but I am still not able to figure out > > why string "value" is being passed instead of value "value" >

Re: Reverse error in contrib.comments

2008-10-22 Thread Russell Keith-Magee
On Wed, Oct 22, 2008 at 12:30 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > The error is: > Reverse for '' with arguments '()' > and keyword arguments '{}' not found. ... > I see there is an closed ticket: http://code.djangoproject.com/ticket/8571. > I have cleared out all of my .pyc files as

Re: template tags with variables as arguments

2008-10-22 Thread bruno desthuilliers
n 22 oct, 12:14, ramya <[EMAIL PROTECTED]> wrote: > I am probably turning blind.. but I am still not able to figure out > why string "value" is being passed instead of value "value" http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#passing-template-variables-to-the-tag class Forma

Re: File upload progress bar for Django?

2008-10-22 Thread john
On Oct 20, 2008, at 12:22 PM, M Godshall wrote: > Is anyone familiar with a django or python tutorial that shows how > to implement > some kind of file upload progress bar? Ideally I'd like to use > jquery, but I'm open to anything at this point. Any links or code > examples would be greatly

Re: Error in django.contrib.comments with {% comment_form_target %}

2008-10-22 Thread Dmitry Dzhus
Brandon Taylor wrote: > I see there is an closed ticket: http://code.djangoproject.com/ticket/8571. > I have cleared out all of my .pyc files as suggested, but I'm still > getting the template error. Can anyone offer any advice? I had a similar problem which was resolved after I had cleared `url

Re: Query

2008-10-22 Thread Anurag
Hello Gerard, Thank you so much for your suggestion. I have tried working in the direction suggested by you. The next step of difficulty that I find is that there are lot of materials available on the internet in this regard but I could not find some really good working examples and tutorials wi

Re: middleware or view ?

2008-10-22 Thread Dmitry Dzhus
PonasNiekas wrote: > I'm about to write an app, which is going to do long running (~1 to > ~60 minutes) calculations (meanwhile, the user who triggered the > calculation will get message like "calculation in progress" or smth). > > I'm wondering what is the right place or best practice to do such

second post:Please answer!How to compare from two models in the same function (view)?

2008-10-22 Thread Net_Boy
Hi, I am trying to make a view function to get the posted values and make some comparison (if x.value >= y.value).. where x is the model that I got it's values from the post and y is the other model . example: def comp(request): form = ItemForm() if request.method=="POST": for

Re: Custom upload handlers: Potential multi threading, session, etc issues. Take a look!

2008-10-22 Thread john
On Oct 20, 2008, at 8:11 AM, truebosko wrote: > What is happening: The custom upload handler works, data is being > sent, the session is being set WITHIN the handler but when I call the > function from Javascript to fetch the progress (or even from a simple > manual GET) it does not return anythi

Re: Comments in reversed order

2008-10-22 Thread Dmitry Dzhus
jrivero wrote: > Is possible obtain the comments of django.contrib in reversed order? > > In old version: > {% get_free_comment_list for workgroups.workgroup group.id as > comment_list reversed %} > > But in new version the templatetag not have control of this parameter. > The method for order is

Re: File upload progress bar for Django?

2008-10-22 Thread Ian Lawrence
Hi very cool..thx for putting this together. You have saved me some time! Ian -- http://ianlawrence.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: second post:Please answer!How to compare from two models in the same function (view)?

2008-10-22 Thread TiNo
something like this? (don't now if you want the form from an instance or not, but assumed so, as you are trying to change data, not?) def comp(request, obj_id): instance = get_object_or_404(Model, obj_id) form = ItemForm(instance=instance) if request.method=="POST": form = ItemForm(r

Re: i18n translation in forms?

2008-10-22 Thread chris
Well, I guess the question was just too stupid or unclear, but I have figured it out now myself. For the benefit of Goolge users, here is my answer. It is actually really easy: class SearchForm(forms.Form): names = forms.CharField(label= _("Names")) places = forms.CharField(label = _("

Re: Query

2008-10-22 Thread bruno desthuilliers
On 22 oct, 14:11, Anurag <[EMAIL PROTECTED]> wrote: > Hello Gerard, > > Thank you so much for your suggestion. I have tried working in the > direction suggested by you. > The next step of difficulty that I find is that there are lot of > materials available on the internet in this regard but I cou

ViewDoesNotExist: Even though it does

2008-10-22 Thread JonathanB
Getting a very erratic Exception: ViewDoesNotExist: Could not import supplier.views. Error was: cannot import name Buyer What is stage is Buyer (model Class) does exist and the exception is only thrown once in a while. Could it be that there are too many ForeignKey relationships. i.e. the Buyer

Apache Django 15 Second Refresh

2008-10-22 Thread GPSGuy
Hello, I have just started developing with Django on Apache and have ran into a very annoying issue that I can not seem to find the answer to. I set variables in my views and some get updated through the template immediately and others do not. I have to wait 15 seconds for the page to refresh.

Re: Apache Django 15 Second Refresh

2008-10-22 Thread Kenneth Gonsalves
On Wednesday 22 October 2008 07:25:52 pm GPSGuy wrote: > I have just started developing with Django on Apache restart apache on every code change - not difficult - just up-arrow and press enter -- regards KG http://lawgon.livejournal.com --~--~-~--~~~---~--~~ Y

GeoDjango 'module' object has no attribute 'OSMGeoAdmin'

2008-10-22 Thread Alfonso
Strange error I haven't seen before - configuring a new django development server and have installed Django v 1.0 In a app admin.py file I've specified a straightforward geo admin class to handle the geodjango enabled models: from django.contrib.gis import admin from models import Category, CSit

Re: Reverse error in contrib.comments

2008-10-22 Thread Brandon Taylor
Hi Russ, I found what was causing the error. I work on an iMac at home and a MacBook Pro at work, and forgot that I was using trunk on my iMac where I was having the issue. The version of trunk I had checked out contains a "urls" folder in contib.comments that wasn't deleted in svn because of .p

Re: ordering edit inlines in admin

2008-10-22 Thread patrickk
just found this ticket (http://code.djangoproject.com/ticket/8165) which is probably the reason why (re-)ordering edit-inlines is so complicated. On Oct 21, 3:43 pm, patrickk <[EMAIL PROTECTED]> wrote: > does anyone know about a clean way to order edit-inlines using the > admin-interface? > > 1.

Re: GeoDjango - Difficulty placing vector marker from DB

2008-10-22 Thread Alfonso
Thanks Ariel - that worked great Al On Oct 21, 8:02 pm, "Ariel Mauricio Nunez Gomez" <[EMAIL PROTECTED]> wrote: > There are many ways to fix the projection issue, this is one (probably not > the best) > > On your view code: > sites_list=sites_list.transform(900913) > > Best, > Ariel. > > On Tue,

Re: Error in django.contrib.comments with {% comment_form_target %}

2008-10-22 Thread Brandon Taylor
Hi Dmitry, After some digging, I found that folder as well. Now everything's working correctly again. Cпасибо, Brandon On Oct 22, 7:08 am, Dmitry Dzhus <[EMAIL PROTECTED]> wrote: > Brandon Taylor wrote: > > I see there is an closed ticket:http://code.djangoproject.com/ticket/8571. > > I have cl

Django Suitability

2008-10-22 Thread Matthew Talbert
Hi all, I am being considered for a project that would involve re-writing an application which is currently in MS Access/VBA. The application is an order entry/shop management software for a small vertical market. I am strongly in favor of using Django for the project and one of the principles is

NoReverseMatch, again...

2008-10-22 Thread Alberto Piai
Hi all, I'm referring to this thread from a couple of months ago: http://groups.google.com/group/django-users/browse_frm/thread/1f4bb991f9f0f7b5?hl=en&tvc=1 I'm still having problems with the NoReverseMatch exception coming up with seemingly-random behavior.. or at least inexplicable to me. Eve

Re: Setting up Django on CentOS5 with flup and fastcgi

2008-10-22 Thread [EMAIL PROTECTED]
that would be great but i can't allow my users access to http.conf as i said i am a shared reseller so i am offering django to my clients. the only way i can do it is by writing a fcgi file and pointing to it with .htaccess but it seems as if it doesn't want to work. On Oct 21, 8:34 pm, Adam Nel

Re: NoReverseMatch, again...

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 10:57 AM, Alberto Piai <[EMAIL PROTECTED]>wrote: > > Hi all, > > I'm referring to this thread from a couple of months ago: > > http://groups.google.com/group/django-users/browse_frm/thread/1f4bb991f9f0f7b5?hl=en&tvc=1 > > I'm still having problems with the NoReverseMatch ex

Re: Spliting a single result from a db

2008-10-22 Thread Dmitry Dzhus
[EMAIL PROTECTED] wrote: > HI all, > > I've just starting using django and am really impressed. In my simple > app I want to retrieve a single "article" from a db and then display > it broken into reasonable length pages (either based on word count or > a specific markup in the text). I'd really

Re: NoReverseMatch, again...

2008-10-22 Thread Karen Tracey
Also, can you recreate the problem on the most recent trunk or 1.0.X branch code? Your line numbers from the traceback don't match up with current so I'm guessing you are using 1.0? There have been at least a couple of fixes in the reverse url area (though I don't know that any sound like a good

Re: Query

2008-10-22 Thread Anurag
Hello, It is actually that I want to develop a Graphical User Interface for submitting some jobs (presently doing it as command line interface only). I would like to use Python-CGI for it. I would be thankful if someone could suggest me some focused tutorial/ book/web-link etc with regard to this

Re: Apache Django 15 Second Refresh

2008-10-22 Thread GPSGuy
I am trying to convince the php programmers that there are viable python solutions. I do have the ability to restart the web server every time I make a change, but I would quickly fall out of good graces with the other developers. I don't need to give them any fuel... --~--~-~--~~---

Re: Apache Django 15 Second Refresh

2008-10-22 Thread GPSGuy
Option One: Reloading Wrapper I now that there is caching going on, but I am still not sure why. I did find a work around, though I would still like for someone to explain what is going on underneath. The work around if from: http://groups.google.com/group/django-users/browse_thread/thread/f44ee

Many-to-Many Intermediary Models vs just plain ForeignKeys

2008-10-22 Thread bobhaugen
What are the pluses and minuses of using a Many-to-Many Intermediary Model vs just putting a foreign key to the "owning" model in the "owned" model? Example: http://dpaste.com/86133/ Seems like you can do the same things either way, no? Any catches in the M2M field? (P.S. they both have the sa

Re: Spliting a single result from a db

2008-10-22 Thread barbara shaurette
If you do decide to split up the text, it would be worthwhile getting to know some of the built-in template filters: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#truncatewords Playing around with filters like truncatewords, wordcount, and wordwrap might give you some ideas. --~-

www.djangosnippets.org is down now?

2008-10-22 Thread Gmail
i found lots of snippets to download,but the server always says it is down. --~--~-~--~~~---~--~~ 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@googlegroups.com T

Split a form up in the template/view?

2008-10-22 Thread Ardesco
Taking an example from Chapter 7 of the Django Book: from forms import PublisherForm def add_publisher(request): if request.method == 'POST': form = PublisherForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/add_publisher

Re: Apache Django 15 Second Refresh

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 11:31 AM, GPSGuy <[EMAIL PROTECTED]> wrote: > > Option One: Reloading Wrapper > I now that there is caching going on, but I am still not sure why. I > did find a work around, though I would still like for someone to > explain what is going on underneath. > > Apache does no

How to use PythonOption DjangoPermissionName in apache authentication?

2008-10-22 Thread Eric
Hi everybody, I set apache authentication against django's user database. and I want to limit a location to a group of people of my django staff. I set this in apache's config file like this: SetHandler cgi-script # authentication method

Truncated incorrect DOUBLE value

2008-10-22 Thread urukay
Hi, v got this error, tried almost everything to get it right, but no effect. Can anynone pls help me with that? It happens when i submit the form: class AddPartnerForm(WTForm): def __init__( self, user, *args, **kwargs ): super( AddPartnerForm, self ).__init__( *args,

Re: Apache Django 15 Second Refresh

2008-10-22 Thread GPSGuy
Option One: Reload Page Same as before, but on this one you can use a reload page to explicitly tell it when to reload the views. file:urls.py from django.conf.urls.defaults import * from myproject.views_dev import * import datetime urlpatterns = patterns('', (r'^developer1/Development/Relo

Re: Truncated incorrect DOUBLE value

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 11:53 AM, urukay <[EMAIL PROTECTED]> wrote: > Hi, > > v got this error, tried almost everything to get it right, but no effect. > Can anynone pls help me with that? > It happens when i submit the form: > > class AddPartnerForm(WTForm): > >def __init__( self, user,

Re: Apache Django 15 Second Refresh

2008-10-22 Thread GPSGuy
Thanks for the information Karen. The sever is dedicated for development and I have freedom to do pretty much anything I want to it as long as I don't impact they others guys too bad. Anyway, I have just started working on this and didn't realize that using the Django Server was the preferable m

Re: page not updating right away

2008-10-22 Thread ashbii
Thanks Rock, that was it. I had to change my TIME_ZONE setting in my project's settings.py. On Oct 18, 10:11 am, Rock <[EMAIL PROTECTED]> wrote: > A very common problem is that the timezone or system clock is off. > Most Blog implementations allow you to create a blog entry "in the > future" so

Re: Spliting a single result from a db

2008-10-22 Thread Dmitry Dzhus
Dmitry Dzhus wrote: > I've spend a lot of time playing with different approaches to breaking > big text into pieces in the past. Now I'm quite sure that any solution > which tries to split a text _automagically_ sucks no matter what is it > based on — word count, paragraphs, anything. You'll have

Re: GeoDjango 'module' object has no attribute 'OSMGeoAdmin'

2008-10-22 Thread springmeyer
Hi Alfonso, The OSMGeoAdmin depends on a proper installation of the GDAL libraries. I think you need to confirm that GDAL is properly installed on your server, per the docs at: http://geodjango.org/docs/install.html#id9 Cheers, Dane On Oct 22, 7:19 am, Alfonso <[EMAIL PROTECTED]> wrote: > Str

Re: Truncated incorrect DOUBLE value

2008-10-22 Thread urukay
ah...yes, I've missed that :-( Thanks a lot :-) -- View this message in context: http://www.nabble.com/Truncated-incorrect-DOUBLE-value-tp20113907p20115508.html Sent from the django-users mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You receive

Re: Split a form up in the template/view?

2008-10-22 Thread Peter Bengtsson
On Oct 22, 5:10 pm, Ardesco <[EMAIL PROTECTED]> wrote: > Taking an example from Chapter 7 of the Django Book: > > from forms import PublisherForm > > def add_publisher(request): >     if request.method == 'POST': >         form = PublisherForm(request.POST) >         if form.is_valid(): >      

Re: www.djangosnippets.org is down now?

2008-10-22 Thread Peter Bengtsson
When I get an error on viewing a snippet I copy the URL into Google and click the Cached version. On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]> wrote: > i found lots of snippets to download,but the server always says it is   > down. --~--~-~--~~~---~--~~ You receiv

Re: Django Suitability

2008-10-22 Thread Peter Bengtsson
On Oct 22, 3:56 pm, "Matthew Talbert" <[EMAIL PROTECTED]> wrote: > Hi all, > > I am being considered for a project that would involve re-writing an > application which is currently in MS Access/VBA. The application is an order > entry/shop management software for a small vertical market. I am st

Re: ViewDoesNotExist: Even though it does

2008-10-22 Thread Peter Bengtsson
Have you written a unit test that executes the view? If so, and if it doesn't always happen, you can run the unit test over and over quickly to see if it has something strange to do with the order of how things are important or something crazy like that. By the way, writing tests can often help fi

Re: www.djangosnippets.org is down now?

2008-10-22 Thread Vitaly Babiy
Peter that is a great Idea, I never thought of that. Vitaly Babiy On Wed, Oct 22, 2008 at 1:26 PM, Peter Bengtsson <[EMAIL PROTECTED]> wrote: > > When I get an error on viewing a snippet I copy the URL into Google > and click the Cached version. > > On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]>

Re: second post:Please answer!How to compare from two models in the same function (view)?

2008-10-22 Thread Peter Bengtsson
On Oct 22, 1:23 pm, Net_Boy <[EMAIL PROTECTED]> wrote: > Hi, >    I am trying to make a view function to get the posted values and > make some comparison (if x.value >= y.value).. > where x is the model that I got it's values from the post > and   y is the other model . > > example: > > def comp

Re: Accessor for field 'user' clashes with related field 'User.*'

2008-10-22 Thread Peter Bengtsson
I don't see what splitting it up into "sub apps" has anything to do with it? What happens when you add the related_name attribute to your model fields? Here's some code from one of my apps: class M(models.Model): ... from_user = models.ForeignKey(User, null=True, related_name='from')

Re: www.djangosnippets.org is down now?

2008-10-22 Thread Joshua Jonah
Lol, Bennet is probably freaking out right now. Peter Bengtsson wrote: > When I get an error on viewing a snippet I copy the URL into Google > and click the Cached version. > > On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]> wrote: > >> i found lots of snippets to download,but the server always s

Re: Forms generated from models missing primary key

2008-10-22 Thread Peter Bengtsson
On Oct 22, 8:24 am, MrMuffin <[EMAIL PROTECTED]> wrote: > I'm generating html forms from models using ModelForm. When I do > something like : > > >>> article = Article.objects.get(pk=1) > >>> form = ArticleForm(instance=article) > Change it's widget to hidden I think should work >>> from django

Re: Query

2008-10-22 Thread jd.strickler
It took about 15 seconds with Google to find these: http://www.devshed.com/c/a/Python/Writing-CGI-Programs-in-Python/ http://www.cs.virginia.edu/~lab2q/lesson_7/ http://gnosis.cx/publish/programming/feature_5min_python.html Anytime you find yourself asking for materials, Google first! Then, if

Re: Split a form up in the template/view?

2008-10-22 Thread Ardesco
Thanks for the quick response! Worked like a charm. On Oct 22, 1:25 pm, Peter Bengtsson <[EMAIL PROTECTED]> wrote: > On Oct 22, 5:10 pm, Ardesco <[EMAIL PROTECTED]> wrote: > > > > > Taking an example from Chapter 7 of the Django Book: > > > from forms import PublisherForm > > > def add_publisher(

Re: How to avoid out of sync sequence for primary key using Postgresql?

2008-10-22 Thread cfobel
The reason I ask about whether this problem is eliminated by using MySQL is that according to the Django docs: sqlsequencereset [appname appname …] Prints the SQL statements for resetting sequences for the given app names. You’ll need this SQL only if you’re using PostgreSQL and have inserted d

Re: Test client: how to tell if user is logged in?

2008-10-22 Thread Peter Bengtsson
It's definitely possible. Here's an example: from django.contrib.auth.models import User staff = User.objects.create_user(username='s', password='s', email='[EMAIL PROTECTED]') #staff.is_staff = True client = Client() assert client.login(username='s', pass

Re: www.djangosnippets.org is down now?

2008-10-22 Thread Peter Bengtsson
Not down but you get lots of errors. They're probably working on it. I hope. On Oct 22, 5:08 pm, Gmail <[EMAIL PROTECTED]> wrote: > i found lots of snippets to download,but the server always says it is   > down. --~--~-~--~~~---~--~~ You received this message becau

Re: How to avoid out of sync sequence for primary key using Postgresql?

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 2:16 PM, cfobel <[EMAIL PROTECTED]> wrote: > Does anyone definitively know whether MySQL automatically increments > its sequences (or whatever their equivalent name is) even if records > are manually inserted with a higher ID? Seems to: mysql> describe color; +---+

How to separate applications under the same project ?

2008-10-22 Thread Ashu
Hello Django-Gurus, I am writing an application that uses the Django's inbuilt authentication system. I want to seprate my next application but want to keep using the same authentication. How Can I do that ? Example:- Mysite (Authentication) -- Blog (App#1) -- Forum (App#2) -- XYZ (App

Image upload Field

2008-10-22 Thread Sven Richter
Hi, i have a model which defines a ImageField with a path which exists in the media root. Then i created a form which is bound to the Model with Modelform. All the fields in the Form are working as expected despite the Image field. I mean, i can choose an image, but it wont upload to my path, n

Re: NoReverseMatch, again...

2008-10-22 Thread Alberto Piai
Hello, On Wed, Oct 22, 2008 at 5:15 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > Other than the actual server code, are there any differences in config between > when you see this error and when you do not? For example, DEBUG setting, > caching, etc.? The only difference is the FORCE_SCRIPT_NA

Re: Image upload Field

2008-10-22 Thread Sven Richter
Nevermind my Mail, right after i sent this message it works. I dont know what went wrong exactly but right now i can see all of a sudden like 10 pictures i was loading up. Greetings Sven Sven Richter wrote: > Hi, > > i have a model which defines a ImageField with > a path which exists in the m

Mercurial or Git

2008-10-22 Thread Rit Lim
which one is the Django community moving toward to, mercurial or git? if Django is to be moved... --~--~-~--~~~---~--~~ 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

Re: Mercurial or Git

2008-10-22 Thread john Moylan
You can already use git with an SVN server 2008/10/22 Rit Lim <[EMAIL PROTECTED]> > > which one is the Django community moving toward to, mercurial or git? > if Django is to be moved... > > > --~--~-~--~~~---~--~~ You received this message because you are su

Re: Mercurial or Git

2008-10-22 Thread Vitaly Babiy
I personally would recommend git. Vitaly Babiy On Wed, Oct 22, 2008 at 4:01 PM, john Moylan <[EMAIL PROTECTED]> wrote: > You can already use git with an SVN server > > > > 2008/10/22 Rit Lim <[EMAIL PROTECTED]> > > >> which one is the Django community moving toward to, mercurial or git? >> i

Re: Mercurial or Git

2008-10-22 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-22, o godz. 21:54, przez Rit Lim: > which one is the Django community moving toward to, mercurial or git? > if Django is to be moved... Subversion is best suited for such centralized development as we have in Django, but you are free to use whatever you want.

Following tutorial but can't get something

2008-10-22 Thread gryzzly
Hi, I was following tutorial from official docs step by step. So on part 4, at writing and processing simple form I am stuck with something. (here — http://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simple-form). I am writing my results view and pointing at it from polls/urls.py. A

Re: Mercurial or Git

2008-10-22 Thread Tim Chase
The OP wrote: >> which one is the Django community moving toward to, mercurial or git? >> if Django is to be moved... Because Subversion is fairly popular, but mercurial and git have svn interfaces. Thus the Django community seems to be "core Django development is in Subversion, but interface

Re: login_required for imported apps

2008-10-22 Thread Heather
That was a really good post - thanks :) I know you don't *have* to use anything from the app you include or even *have* to include everything in an app you write. But I think that I just have this idea in my head that I can't let go of that each part should be able to be inherited from - not jus

Re: Following tutorial but can't get something

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 5:15 PM, gryzzly <[EMAIL PROTECTED]> wrote: > > Hi, > I was following tutorial from official docs step by step. > > So on part 4, at writing and processing simple form I am stuck with > something. (here — > http://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simp

Re: Apache Django 15 Second Refresh

2008-10-22 Thread Graham Dumpleton
On Oct 23, 3:01 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 22, 2008 at 11:31 AM, GPSGuy <[EMAIL PROTECTED]> wrote: > > > Option One: Reloading Wrapper > > I now that there is caching going on, but I am still not sure why.  I > > did find a work around, though I would still like

Dumpdata exception leaving me a bit puzzled.

2008-10-22 Thread perchance
Hey all, I recently ported a half dozen homebrewed applications from 0.96 to 1.0 (awesome!) and now I'm in the process of bumping them over from MySQL to Posgres so I can get ripping on GeoDjango (double awesome!). This seemed like a great chance to give manage.py's ingenious "dumpdata" command

Re: Following tutorial but can't get something

2008-10-22 Thread gryzzly
thank you a lot for a quick response; I am sorry for posting traceback, and not actual error message. So here what it gives me: Environment: Request Method: GET Request URL: http://127.0.0.1:8000/polls/1/results/ Django Version: 1.0-final-SVN-unknown Python Version: 2.5.2 Installed Applications:

Re: Setting up Django on CentOS5 with flup and fastcgi

2008-10-22 Thread Graham Dumpleton
On Oct 23, 2:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > that would be great but i can't allow my users access to http.conf as > i said i am a shared reseller so i am offering django to my clients. Apache/mod_wsgi can be used in a similar vein to FASTCGI, with user code running in s

Re: Dumpdata exception leaving me a bit puzzled.

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 6:14 PM, perchance <[EMAIL PROTECTED]> wrote: > > [trimmed] > python manage.py dumpdata app_label --traceback --indent 4 > fixtures/ > app_label.js > > And the traceback I get looks like this, with a sanitized model name > substituted for the real thing. > > """ > Traceback

Re: Following tutorial but can't get something

2008-10-22 Thread gryzzly
Hi Karen, I am sorry, the previous post is irrelevant. What you have seen is a result of changing of results view that I was doing before, to test what is going on. (btw, I've noticed that firefox caches an error output, can I do something about it?) Thanks So relevant error output looks like th

Re: Dumpdata exception leaving me a bit puzzled.

2008-10-22 Thread perchance
Thanks for the reply. I did not syncdb with any blank=True or null=True options on the foreignkeys, so the MySQL table does not allow null values. I just ran some group and counts from the mysql shell and it does indeed show that a number of records have a zero in their fk_id field. So I'm now lea

Re: Following tutorial but can't get something

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 6:30 PM, gryzzly <[EMAIL PROTECTED]> wrote: > > Hi Karen, I am sorry, the previous post is irrelevant. What you have > seen is a result of changing of results view that I was doing before, > to test what is going on. (btw, I've noticed that firefox caches an > error output

Re: Dumpdata exception leaving me a bit puzzled.

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 6:37 PM, perchance <[EMAIL PROTECTED]> wrote: > > Thanks for the reply. I did not syncdb with any blank=True or > null=True options on the foreignkeys, so the MySQL table does not > allow null values. I just ran some group and counts from the mysql > shell and it does indee

Re: problem testing application named "core"

2008-10-22 Thread felix
most probably, yes. core contrib db dispatch etc... are all django's apps/modules and that is probably what was running surprisingly I don't see tests.py in core, db etc. those tests must live elsewhere. there are tests for some of the contrib apps also don't name a templatetag the same name as

Re: Creating a system with multiple types of users

2008-10-22 Thread felix
perhaps when you create-save the models (Providers, Customers etc.) it adds that User to the appropriate group. but I'm not sure I would use groups. That would make the most sense if there were people with overlapping roles. somebody who is Agent + Provider you could use the permissions system.

Re: Permissions in template tags

2008-10-22 Thread felix
the easiest way is to pass in the context to the template tag : @register.inclusion_tag("edit_link_tag.html",takes_context=True) def edit_link_tag(context,obj,name=None): """returns a link to edit the model if you have permission to do so """ user = context['user'] and so on

Re: emulate existing session in automated test

2008-10-22 Thread felix
look at RequestFactory: http://groups.google.com/group/django-developers/browse_thread/thread/db86050095ebe5db?pli=1 which would mean not calling post, but calling the view directly I've written a custom Unit test class just for views that's proving quite useful, but it doesn't yet do this reque

Generic Model Names in Admin List

2008-10-22 Thread jb.
I'm creating a site in Django and have run into an interesting problem that I can't seem to find the solution to. Basically, I have models for my app called "Product" and "Category" and in the admin in the list of categories instead of the category name, it has "Category object"... same thing in

Re: Generic Model Names in Admin List

2008-10-22 Thread Karen Tracey
On Wed, Oct 22, 2008 at 7:54 PM, jb. <[EMAIL PROTECTED]> wrote: > > I'm creating a site in Django and have run into an interesting problem > that I can't seem to find the solution to. Basically, I have models > for my app called "Product" and "Category" and in the admin in the > list of categorie

Re: Dumpdata exception leaving me a bit puzzled.

2008-10-22 Thread perchance
You know, I think that did it. For anybody who ever follows in these footsteps of error and misdeed, here's what I did to sort out my tables. ALTER TABLE app_model CHANGE fk1_id fk1_id int(11) NULL; ALTER TABLE app_model CHANGE fk2_id fk2_id int(11) NULL; ALTER TABLE app_model CHANGE fk3_id fk3_i

Re: Dumpdata exception leaving me a bit puzzled.

2008-10-22 Thread perchance
You know, I think that did it. For anybody who ever follows in these footsteps of error and misdeed, here's what I did to sort out my tables. ALTER TABLE app_model CHANGE fk1_id fk1_id int(11) NULL; ALTER TABLE app_model CHANGE fk2_id fk2_id int(11) NULL; ALTER TABLE app_model CHANGE fk3_id fk3_i

Re: Generic Model Names in Admin List

2008-10-22 Thread jb.
Thanks Karen... for some reason I was spacing that aspect of the model creation. I knew it was something simple. jb. On Oct 22, 6:09 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 22, 2008 at 7:54 PM, jb. <[EMAIL PROTECTED]> wrote: > > > I'm creating a site in Django and have run i

  1   2   >