new user needs some advice setting up a model...

2008-09-24 Thread paul
e simplicity of the question - i'm still trying to get to grips with django/pythonific best practice... regards to all, paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: new user needs some advice setting up a model...

2008-09-24 Thread paul
d to be unique together in shot model. > > 2008/9/24 paul <[EMAIL PROTECTED]> > > > > > hi all, > > > i've thrown myself into developing an animation pipeline using > > django.  i'm new to both python and django - but have in the (distant) > >

Re: new user needs some advice setting up a model...

2008-09-25 Thread paul
now, my app is more of an internal produciton system - so it doens't need to look pretty. however, i have also read that 'auto forms' could/should be used instead. can anyone set me straight please? many thanks again, paul On Sep 24, 9:40 pm, "Alexander Pugachev" &l

seeking help in model design...

2008-10-06 Thread paul
y be linked to one type at a time. From the manual/book - i belive that GenericForeignKey is the way to go. ie, insert a GenericForeignKey field into the Node. Does this sound like a good approach? Many Thanks in Advance, Paul --~--~-~--~~~---~--~~ You received th

Re: seeking help in model design...

2008-10-07 Thread paul
s if derived from a common model. or is each derived model incompatible with each other? cheers, paul On Oct 7, 11:16 am, David Hall <[EMAIL PROTECTED]> wrote: > Hi Paul, > > You've got a couple of options for this.  The first uses inheritance: > > class Nod

Re: seeking help in model design...

2008-10-07 Thread paul
ject - thanks to you! :-) -p On Oct 7, 6:23 pm, David Hall <[EMAIL PROTECTED]> wrote: > Hi Paul, > > So long as the common model is not abstract, it should work.  Also, the > common model must be the one that contains the parent field, and it > should link to "Node&qu

Model formset saving with form.save(commit=False)

2009-07-28 Thread Paul
it=False) properly given that I have multiple fields in a form with different field names? Thanks in advance! Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: ModelForm and saving with excluded Fields

2009-07-28 Thread Paul
author = form.save(commit=False) author.title = 'Mr' author.save() I hope that helps! Paul On Jul 28, 4:58 pm, Streamweaver wrote: > To be clear.  Essentially I just want to merge the object instance and > POST data with the POST data overwriting the instance where it&#

Re: Model formset saving with form.save(commit=False)

2009-07-28 Thread Paul
y to change the data in my model: {% for hid in form.hidden_fields %} {{hid}} {% endfor %} On Jul 28, 2:34 am, Paul wrote: > Hello, > > I understand that Django won't let you save incomplete fields in a > single form created from a Model unless you do this: > >

Getting object representing the current user

2010-05-05 Thread Paul
I have the following model (stripped of comments and __unicode__ for brevity) which defines a comment in my Django app (I'm not using the comment module provided with Django for various reasons): class Comment(models.Model): comment = models.TextField() added_by = models.ForeignKey(User) ad

Re: Getting object representing the current user

2010-05-09 Thread Paul
On May 5, 10:12 pm, Daniel Roseman wrote: > On May 5, 9:30 pm, Paul wrote: > > > > > I have the following model (stripped of comments and __unicode__ for > > brevity) which defines  a comment in my Django app (I'm not using the > > comment module provi

how template tag extends works

2010-05-21 Thread paul
hi -- given this example template: {% for item in items %} {% extends "example.html" %} {% endfor %} When this block is evaluated during template rendering, does the file "example.html" get opened for every iteration of the loop, or might the contents of "example.html" get cached the first ti

Re: how template tag extends works

2010-05-21 Thread paul
sorry -- I made a mistake -- I meant include instead of extends :-p {% for item in items %} {% include "example.html" %} {% endfor %} does example.html get opened for every iteration of the loop, or just at the first iteration, and then perhaps cached? On May 21, 12:36 am, p

Re: how template tag extends works

2010-05-21 Thread paul
27;d suspect {% include %} opens a file every time, as it's within a generic {% for %} loop, unless {% include %} is structured to be able to reference a file it's already opened. The reason I'm asking is because there would be a performance penalty if the file has to be opened for

Re: Django architecture question

2010-06-15 Thread Paul
ve many parts/widgets with callbacks or events. If you want the page to display without JS, you still have to generate the page with one request though... cheers Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Django architecture question

2010-06-15 Thread Paul
On 15 Jun., 18:17, Joel Klabo wrote: > Thanks, good info. So the template tag can do the DB query and all > that without going through a view function? Yes, see the query in the example code I posted: profiles = UserProfile.objects.order_by('user__date_joined') [:self.limi

Re: Django architecture question

2010-06-15 Thread Paul
possible to base a layout on and the initial view only sets the src attribute of all iframes. When I learned HTML, it was generally accepted that frames are bad. Unfortunately I don't remember the exact reason and haven't used them since ;) cheers Paul > > On Jun 15, 8:09 am, P

user authentication

2010-12-09 Thread Paul
Long story short have several django projects running I log in ok and the projects run fine using the admin interface. However : I have added users and given them access to only certian applications on the django site using the admin interface, however when i log in with out supervisor access ch

"current transition aborted" not sure if this is a bug

2010-02-11 Thread paul
s GET with PostgreSQL. If this sounds like a bug, I'll try to submit a bug report. I'm using Django 1.1.1 thanks, Paul The traceback with PostgreSQL: Traceback (most recent call last): File "/usr/local/lib/python2.6/site-packages/django/core/servers/ basehttp.py", li

can't authenticate in template

2010-02-12 Thread paul
x. thanks, paul -- 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...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more optio

Re: can't authenticate in template

2010-02-12 Thread paul
On Feb 12, 1:54 am, bruno desthuilliers wrote: > On Feb 12, 9:40 am, paul wrote: > > > hi -- after I do a login that successfully goes through a custom > > authenticate() and django login(), I get redirected to a web page that > > is build off of a template that

Re: can't authenticate in template

2010-02-12 Thread paul
some more info... I added "django.core.context_processors.request" to TEMPLATE_CONTEXT_PROCESSORS Based on my code below, it seems like the session is storing the correct user ID for the user that just logged in (I confirmed this by changing the user ID in the database manually), but for some re

Re: can't authenticate in template

2010-02-12 Thread paul
Another post because I think I explain my issue a little better here... in my case: 1) a successful log in results in a call to a HttpResponseRedirect that goes straight to the web page I'm specifying. 2) I checked right before this HttpResponseRedirect is called, and the User object that was r

Re: can't authenticate in template

2010-02-12 Thread paul
t statement to show the result of request.user.is_authenticated() right before returning HttpResponseRedirect, I get "True". However, the view that handles the URL requested by HttpResponseRedirect returns False when I check request.user.is_authenticated(). I hope I'm being

Re: can't authenticate in template

2010-02-12 Thread paul
On Feb 12, 4:33 pm, pbzRPA wrote: > Can you please add a dump of your MIDDLEWARE_CLASSES as it is in your > settings file. Sure, here it is: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.

Re: can't authenticate in template

2010-02-12 Thread paul
est) return render_to_response(template, context, context_instance=rc) In this code, if I check request.user.is_authenticated, it returns False. request.user is actually AnonymousUser. However, if I look at request.session.items, I see the correct _auth_user_id for the user that just logged in.

Re: can't authenticate in template

2010-02-16 Thread paul
s a get_user function in ModelBackend (whoops), and I managed to name my function for returning an authenticated User the same way. I have it working now. paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

How to render date and time separately with newforms.SplitDateTimeWidget

2007-06-13 Thread Paul
like: {{form.blah}}{{form.mydate.date}} {{form.blah2}}{{form.mydate.time}} -Paul --~--~-~--~~~---~--~~ 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@goog

Re: How to render date and time separately with newforms.SplitDateTimeWidget

2007-06-14 Thread Paul
s to make changes to BoundField (maybe adding some BoundWidget class even) to allow you to get sub-widgets out of a MultiWidget. Otherwise there simply isn't any way to access the sub- widget while also passing the data and attrs to that widget. -Paul On Jun 14, 12:32 am, Malcolm Tredinnick <[EMAIL

Re: Trying to dynamically generate labels in newforms

2008-01-30 Thread Paul
The BaseForm.__init__ sets self.fields to self.base_fields.copy() before your __init__ is run. The correct way to change the label is: class TestForm(forms.Form): somefield = forms.IntegerField(label='foo') On Jan 30, 1:06 pm, Kirk Strauser <[EMAIL PROTECTED]> wrote: > I'm using a Newforms

Access context from with a custom filter

2008-01-30 Thread Paul
I need to access the context from within a filter. The filter needs to change its behavior based on the target browser (context.request.META.HTTP_USER_AGENT). There doesn't appear to be any way to access this information from inside the filter. Nor is there any way to pass this info into the fi

Multiple ForeignKey Relationship

2008-02-21 Thread paul
I'm trying to work out how I'm going to setup a model structure a video section of my website. Say I have this scenario. - Each video belongs to a set of 4-5 videos. - Depending on the set the video belongs too, certain information will need to be attached to that video (ie> recipe/chef informati

Re: Multiple ForeignKey Relationship

2008-02-21 Thread paul
Hi Michael, Thanks a lot. That query made me realize I've got to re-think this. http://groups.google.com/group/django-users/browse_thread/thread/477915b60c5d160e/ff677bbbf87ea9b3?lnk=gst&q=django+edit+inline#ff677bbbf87ea9b3 On Feb 21, 8:21 am, Michael Newman <[EMAIL PROTECTED]> wrote: > http:

ManyToMany field on User object

2006-06-30 Thread Paul
e 97, in __cmp__ return cmp(self.creation_counter, other.creation_counter) AttributeError: type object 'UserProfile' has no attribute 'creation_counter' -- (Sorry if that wraps at the wrong place, Google Groups posting window wraps things) Any ideas why th

Unicode strings through Database API

2006-06-30 Thread Paul
django/db/backends/util.py", line 19, in execute self.db.queries.append({ UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 991: ordinal not in range(128) I understand that it's having problems because the string is identified as an ASCII string an

Re: Unicode strings through Database API

2006-06-30 Thread Paul
Ok, I've dug a little more and I realised I'd got the wrong end of the stick. The string I'm assigning to the field is a unicode string. Django is trying to do a .encode('ascii') on it and failing. Understandable really I assume I have to do a .encode('utf-8') on it before I store it. Does that

Re: Unicode strings through Database API

2006-06-30 Thread Paul
Jeremy Dunck wrote: > I've seen some situations where multiple encodings were stuck into the > same column, and you don't want to go there. I can believe that :-/ That for the advice. Things seem to be working now I've encoded into utf-8. Even Django's admin interface seems to understand utf-8

Is it worth caching results obtainable via SQL?

2006-07-09 Thread Paul
entry, or posts under a forum topic, so what have other people done? If I'm letting the database do the work should I tell the database that I'm going to be doing this type of operation on it in some way? Thanks Paul --~--~-~--~~~---~--~~ You receive

Loose coupling of objects.

2006-07-16 Thread Paul
ne? I know this isn't really something that SQL supports, but I'm hopeful it's possible to fake. Thanks Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Loose coupling of objects.

2006-07-16 Thread Paul
, but I'll investigate the core version first. Thanks again. Paul --~--~-~--~~~---~--~~ 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 To un

Everyone should read the tests directory (was Re: Loose coupling of objects.)

2006-07-17 Thread Paul
[EMAIL PROTECTED] wrote: > The core version was built using Luke Plant's work and Ian Holsman's > work, kind of the best of both worlds. Yeah, once I started looking at the code I saw the commit logs that said the same thing. Good to see things growing that quickly. It's nice to think I was hav

How to generate common blocks?

2012-02-27 Thread Paul
w function? This doesn't make sense to me because quickly blocks will be generated that are not actually used; would it be possible to do something smart? Like specifying block-functions inside the template code? Many thanks for any directions! Paul -- You received this message because you ar

Need some directions howto insert image processing

2012-03-08 Thread Paul
he in memory data to a PIL image; how to do this? Thanks for any direction, Paul PS: I did read a lot already on google but found no consistent direction on this. class rusk(models.Model): image = models.ImageField(upload_to='uploadedImages') class RuskForm(ModelForm): cl

Can i specify a different set of global context processors for admin?

2012-03-09 Thread Paul
same processors are used (from TEMPLATE_CONTEXT_PROCESSORS) which is not desired. So i'm starting to doubt whether this was such a good idea or not How could i solve this? Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Crispy form: how to disable/readonyl all fields?

2012-05-06 Thread Paul
splay the 'form' This all works but the only thing left is to disable/readonly all the fields... how can i do that? Thanks for any idea's Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Crispy form: how to disable/readonyl all fields?

2012-05-07 Thread Paul
know a better solution is to create custom templates for the field for example but i'm missing complete and working examples to do that; anyone advise? Paul class CrispyUneditable(UniFormNode): '''subclass the crispy tag to modify the tags output: each input field shall be un

Generic views create_object and prefill form data?

2012-05-19 Thread Paul
eatly appreciated! Paul -- 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. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more opti

Re: Generic views create_object and prefill form data?

2012-05-23 Thread Paul
Solved it by migrating to the class based generic views, then fed initial form data to the constructor of the form by overloading get_initial on the view class. Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Question object permission approach

2012-05-23 Thread Paul
? - I could overload get_object to query for the object based on the pk and the fk of the user. - Or should i use a package (from http://www.djangopackages.com/grids/g/perms/) such as django-guardian? Paul -- You received this message because you are subscribed to the Google Groups "Django

Re: Question object permission approach

2012-05-24 Thread Paul
he user field of the model. I followed your example by overloading the get_queryset and that really a simple solution to this issue. Tests are running now; all 404's; great! Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Can i use mongodb for product/catalog?

2012-07-24 Thread Paul
nyone with more experience than me :) give any directions how this could look like? How can i work with mysql alongside mongodb in django for example? Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on

Form validation using model data?

2012-07-29 Thread Paul
ation is the solution for this? Thanks for any directions Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/urE06kkuNBIJ. To post to thi

Re: Form validation using model data?

2012-07-30 Thread Paul
gic in the post-logic as well (so for example using custom validation). A simpler alternative is to remove the 'update' button altogether, but also in this case the view should also throw a 404 or 500 just in case someone manually modifies the url (which is by the way very easy to do

Combining django-tables2 with django-filter info ListView?

2012-08-09 Thread Paul
mixin for django-filter; i have a mixin available but since it also fetches the queryset from get_queryset i'm expecting that either the ordering or the filtering won't work!? Anyone with mixin experience willing to give some directions? Paul -- You received this message because you

Re: Easy way to make all form fields read only?

2012-10-31 Thread Paul
enumerate the model fields in a layout Paul Bormans -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/5av7W0YQoS8J. To post to this group, send email to dj

Django sub-sites/user groups

2013-06-17 Thread Paul
Hey all, I'm just beginning to look into using django for a personal project. What I'm wondering is if there are any plugins available or guides which could help achieve the following functionality. I want to develop a website with 'sub-sites'/user groups which users may create and join. Thes

Re: Displaying a custom field (PickledObjectField) in the admin

2013-09-10 Thread Paul
lay = ('id', 'value_unpacked',) Actually modifying it is obviously more difficult as it can be ... anything indeed Paul -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Manage.py not found when deploying using chef (application_python cookbook)

2015-03-27 Thread Paul
w? Thanks for any tips, Paul Bormans -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

ManytoMany field in Django admin not appearing

2017-11-03 Thread Paul
I have a Product model, an Image Model and a Category Model. A Product can have multiple Images(Foreign Key) and a Product can be in multiple Categories a Category can contain multiple Products. A Category can have multiple subcategories(key to itself). class Category(MetaData): parent =

What is the role of __deepcopy__ in Python class and Django widget

2017-11-04 Thread Paul
First, I know how copy and deepcopy from copy module work for a list. I'm interested the role of __deepcopy special method inside a class. I need to create custom widgets in Django and I try to understand the python code behind. class Widget(metaclass=MediaDefiningClass): needs_multi

ManytoMany Relation and Custom widget in Django

2017-11-13 Thread Paul
I have two models Categories and Products. A Product can have multiple Categories, a Category can have multiple Products. The Categories have a circular Foreign key, to itself. class Product: categories = models.ManyToManyField(Category) name = models.CharField(max_length=2

ManytoMany Relation and Custom widget in Django

2017-11-17 Thread Paul
I have two models Category and Products. - a Product can have multiple Categories - a Category can have multiple Products. - Categories have a circular Foreign key, to itself. - not all Categories have the same depth level Example: Category A - Category A_1 - category A_2

Issues with image.path being reported wrong causing failing of a Celery task

2018-01-17 Thread Paul
I have the following model: class Image(models.Model): image = models.ImageField(upload_to= file_upload_to) I have a dynamic file_upload function: def file_upload_to(instance, filename): base = '_'.join([str(instance.item.pk), instance.item.slug]) return os.path.join('accounts', base,

Re: Issues with image.path being reported wrong causing failing of a Celery task

2018-01-17 Thread Paul
I did, is not celery related. The only thing, that maybe is influencing the path, is that the Image model is used in an inlineformset. On Wednesday, January 17, 2018 at 6:37:40 PM UTC+2, Matemática A3K wrote: > > > b > On Wed, Jan 17, 2018 at 12:17 PM, Paul > > wrot

InlineFormset Updating issues, after changing the value in the input

2018-01-18 Thread Paul
I have 2 models Product and Image: class Image(models.Model): product = models.ForeignKey(Product, related_name='images', on_delete= models.CASCADE) parent = models.ForeignKey('self', blank=True, null=True, verbose_name='original image', on_delete=models.CASCADE) image = models.Ima

Re: Django - Populating more than one model from the same form ?

2016-07-09 Thread Paul
thanks, outside not in admin, I will check the links provided On Saturday, July 9, 2016 at 10:52:38 PM UTC+3, ludovic coues wrote: > > If you are trying to do it outside of the admin, the previous link > might not be exactly what you are look for. The doc on inlines formset > [1] might be more u

Django Class-based Views with Multiple Forms

2016-07-11 Thread Paul
By default Django’s class-based views support just a single form per view. I need more forms per view because I want to combine a ForeignKey relations with various ModelForm instances and also to appear in the FormModel. In Django documentation and other tutorials I found formsets, but in the

Re: Django - File or Image Delete

2016-07-11 Thread Paul
thanks On Monday, July 11, 2016 at 11:16:27 AM UTC+3, Mstislav Kazakov wrote: > > Try to override `delete` method in your model. You should do something > like this: > > class Example(models.Model): > f = models.FileField(null=True, blank =True) > > > def delete(self,*args,**kwargs): >

inlineformset_factory Tutorial

2016-07-11 Thread Paul
I'm searching for a good tutrial regarding "inlineformset_factory". the information about it od Django site is very scarce. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send a

Django : InlineFomsets with FileField, overwrite forms.ModelForm Function

2016-07-19 Thread Paul
I have a model Product and a model Document. The document has a foreign key to the product. I want the user to upload multiple files in the same form for adding/editing Product. I modified and example from net, it is working, but not with a FileField. I know that I need to add request.

Add form fields/values at ModelForm level or at CBV level.

2016-11-29 Thread Paul
I have a model Product which a Foreign Key to a Company model. The Company Model has a OneToOne Relationship to user. When a user submits a form to add product I need to associate the product with the company of the user (the user doesn't need to add manually the company in the form) There ar

Djago URL conf error

2016-11-30 Thread Paul
I have the following message when I try to use reverse or reverse_lazy: The included URLconf 'ph.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import *When I use the urls (without using reverse or rev

Django: UpdateView - dispatch() : reduce the number of queries

2016-11-30 Thread Paul
I have a Product Model, foreign key to Company Model, onetoone key to User. I override the dispatch(method) to check if the user has rights to edit the object(product). I'm trying to optimize the queries to the database because some of them are duplicates. def dispatch(self, request, *args, *

Automatic reverse migrations

2017-04-14 Thread paul
In a modern Continuous Delivery environment, it's expected that there is an automated process for deploying code, and therefore performing database migrations. This is all straightforward. I haven't been able to find any good solutions for automatic rollback though. The main problem that I see

Re: Automatic reverse migrations

2017-04-17 Thread paul
t prior to production. > Don't know of a solution integrated into django. > > On Friday, April 14, 2017 at 2:26:51 PM UTC-4, Andrew Godwin wrote: >> >> Hi Paul, >> >> I have tried this in the past, but it's basically an unsolvable problem >> in t

Some reversible migrations cannot be reversed in practice?

2017-04-19 Thread paul
I've just hit a tricky migration case, and I'd like to check I'm not missing something. The summary is that merge migrations make it possible to add migrations which cannot be unapplied, even if they are the latest migration to be run. With the migration graph: M1 | +--+ | | M2a M2b

Django - Image crop using a widget as a field in the form

2017-08-23 Thread Paul
I have a Product Model and Image Model with a Foreign key to the product model. So in a form for Product creation I will have/need multiple Image File Upload inputs. I want to replace the default Image file-upload form field with a Image (like a plus sign, like add a new image, using a w

Django - Best option to check file types, even fake or without extensions

2017-09-21 Thread Paul
I'm trying to validate mime types of files uploaded with a predefined list of validate mime types. I need to do the check the file in the buffer before save, even if they are faked or no extensions. 1. python own mimetypes package seems to "guess" only base on extension 2. magic-pytho

Django: Form validation strange behaviour

2017-09-29 Thread Paul
I want to do file validation(size,type) on a field on inlineformset. class ProductDocumentModelForm(ModelForm): class Meta: model = ProductDocument fields = ['document'] def clean_document(self): file = self.cleaned_data['document'] validate_file(file, 'document') Becau

Implementation Advice: Categories and Product Specifications

2017-10-02 Thread Paul
I have Product and Categories. A product can be in multiple categories and off course a Category have multiple products. The Categories can have Subcategories’ which can have Subcategories. I used a Category Model with a circular Foreign Key. Each Product can have specifications/attributes

Django InlineFormset : Customize inputs and widget

2017-10-04 Thread Paul
I’m using inlineformsets for an Image Model in combination with a Product Model. For the Image Model (using javascript): 1) a remove/delete button will be available to remove an image; the image can be remove not only on edit, but also on creation(the use upload the image, but before savin

How Django inlineformsets works internally

2017-10-10 Thread Paul
I have a form with two inline formsets. . At the HTML level Django use the hidden fields for the formset management, and use the prefix to know which fields are related to a formset. Also it has ids in the html id, to group like in a virtual form the fields. On retrieve by default I

Possible to use raw_admin_fields with inlineformset_factory for a create page?

2008-12-03 Thread Paul Childs
Hi folks, I am a newforms newbie who is currently porting a .96 project over to 1.0 I have been trying to coerce the examples in the Django documentation to accommodate creating a "Document" . I have three models: Document, DocPart --> These are in the doc module. DocPart is an intermediary Par

Re: SOAPpy and pyxml installation/usage

2008-12-11 Thread Paul Nendick
Hello Steve, SOAPy appears to be moribund. I was once using it within a Python SOA I'd worked with and chose to abandon it when we moved that system to Python 2.5. It wasn't an issue for us as SOAP was going nowhere (for us anyway). Good news for you (possibly) is the SOAP infrastructure generally

Getting Form Field Values in a template

2008-12-12 Thread Paul Childs
I am converting from .96 to 1.0. In a template using 0.96, if I wanted to get the value that a particular field was holding I would use: {{ form.data.field_name }} This doesn't work anymore and is breaking my code. I have tried a number of other ways (guessing mostly), consulted the docs and br

Re: Getting Form Field Values in a template

2008-12-12 Thread Paul Childs
f valid) ---> Didn't apply so I didn't try it form.initial.fieldname (values set for initial) ---> WORKED!!! Thank you Doug B On Dec 12, 12:47 pm, Paul Childs wrote: > I am converting from .96 to 1.0. > > In a template using 0.96, if I wanted to get the value that a > parti

Re: SOAPpy and pyxml installation/usage

2008-12-12 Thread Paul Nendick
Does anyone know of a better/newer module for creating SOAP services and not just a client? BTW, nice find with Suds - this is most helpful! regards, /p 2008/12/12 Steve : > > Hello Jarek, > > That did the trick! I'm still curious to get ZSI working but suds was > simpler. Here's my first funct

RE: how to add more params in url

2008-12-17 Thread Wayper, Paul
l > > {%if is_extend %} > extend > > {# pagination code #} > > next previous > > as result, there is only one param add in url, either > is_extend or page > > so, how to bind all them in url? > > thanks Should be fairly obvious. Have fun, -- Paul

RE: how to add more params in url

2008-12-18 Thread Wayper, Paul
# shrink the page elif is_extend == 'expand': # expand the page Then you have a similar piece of code to handle the 'page' parameter and so forth. IMO you shouldn't have too many parameters in the path part of the URL - the bit be

RE: A Top-Level Django Index for the root URL

2008-12-21 Thread Wayper, Paul
most projects follow without repeating the application structure elsewhere or having to do terrible things to settings.py. My question is: is the second idea Django-ish enough? I'd like some feedback from the list before I start work on it as to whether it's a dead end, whether ther

RE: Language code prefix in url

2008-12-21 Thread Wayper, Paul
your templates from. Just a thought, -- Paul Wayper SYSTEMS ENGINEER TransACT Telephone: 02 6229 8026 Mobile: 0422 392 081 PO Box 1006, Civic Square ACT 2608 www.transact.com.au --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

RE: Newbie Help with Models and Views

2008-12-22 Thread Wayper, Paul
gt;>> foo = [1,2,3] >>> print 'x%sx' % foo x[1, 2, 3]x shows that stringifying a list should print the list as you'd expect. But this may lead you to a solution. Hope this helps, -- Paul Wayper SYSTEMS ENGINEER TransACT Telephone: 02 6229 8026 Mobile: 0422 392 081

RE: Newbie Help with Models and Views

2008-12-22 Thread Wayper, Paul
or raise a DoesNotExist error. You may want to look into the 'get_object_or_404' helper. Have fun, -- Paul Wayper SYSTEMS ENGINEER TransACT Telephone: 02 6229 8026 Mobile: 0422 392 081 PO Box 1006, Civic Square ACT 2608 www.transact.com.au --~--~-~--~~~-

how to set up google docs-like sharing

2008-12-28 Thread Paul Franz
ordering = ['title'] A ModelForm, by default, gives me a multi-select box for watchers. Is my best approach to write my own widget to have them type in a comma separated list of emails? How could I handle email addresses for

? Import Error for admin djangobook

2009-01-06 Thread Paul Campbell
Working examples in djangobook /1.0 chapter06 Can not get the Admin Interface to display using suggested urls.py / settings.py #urls from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), ) #settings.py - # snip ROOT_URLCONF =

Session Object Dropping Key Value Pairs

2008-09-04 Thread Paul Childs
Django 0.96 / mySQL / Apache2 / Ubuntu 8.04 I have created a "wizard" for data input. Rather than have one huge form I have spread it out over a number of views/templates. After the user submits data and it has been validated, each view places the "new_data" into the request.session and redirects

Complex Form Widgets

2009-01-28 Thread Paul Johnston
sible with Django too? Paul --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email t

Re: How can import the Widgets of Admin.

2009-02-07 Thread Paul Nema
How to I get the value from a class verbose_name in a models.Model based generic list? I.E. I want to use the value in a class element verbose_name for a table header Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Faster Database?

2009-02-25 Thread Paul Nema
One option is to create a new table that is a mirror of the target table except the new table should NOT have any of the keys enabled. Using a bulk load tool add the data to the new table. Then add the keys to the new table. Drop the old table and rename the new table to the original target tabl

Admin/Application Integration and Automatic Actions

2009-02-25 Thread Paul Waldo
e the Application/Admin more seamless? * Is there a standard model for running automated tasks? I was thinking about a cron task that uses lynx or curl to call a URL that performs the task, but that gets kind of ugly. Is there a better way to do this? Thanks in advance for your insights!

  1   2   3   4   5   6   >