Re: Help organizing inline fields in User

2008-12-13 Thread Adrian
On Nov 28, 3:48 pm, mondonauta wrote: > well what i got is this error: > __ > Exception Type:         ImproperlyConfigured > Exception Value:        'ProfessorAdmin.fieldsets[4][1]['fields']' >                                 refers to field 'phone_number'

fixed data set handling

2008-12-16 Thread adrian
Hi all, I'm writing an app that needs random access to a fixed set of data (about 1 MB) on just about every request. (It also uses MySQL for dynamic data). I wrote a different app on app-engine that had this requirement as well and I ended up putting the fixed database in a large Python varia

accessing fixed data as Model

2008-12-16 Thread adrian
How could I have some fixed data that is in a Python variable treated as a Model? My app has about 1 MB of data that I need random access to for almost every request. I don't want to read it out of MySQL because it would be slow. I want to put it in a variable declaration in a python module,

TimeSpan, Latitude, Longitude field classes for Models

2008-12-16 Thread adrian
Has anyone written these? TimeSpan for example, is useful because '2 hours' is not a time, it's a difference between two times. It has its own validation and display needs. I need Lat and Long as well. Thanks --~--~-~--~~~---~--~~ You received this message beca

Re: fixed data set handling

2008-12-16 Thread adrian
It took over an hour for this to appear, that's why there are 2 threads. On Dec 16, 3:00 pm, adrian wrote: > Hi all, > > I'm writing an app that needs random access to a fixed set of data > (about 1 MB) on just about every request.  (It also uses MySQL for > dynamic dat

basic User model usage

2008-12-24 Thread adrian
Is there a simple example anywhere for how to save data that is specific to an individual user, and how to access that data in a view? For example if each user owns a list of books, what does the BookList model look like exactly and what are the lines of code in the view that would set and read a

is it possible to provide initial data for a model with a foreign key to User model?

2009-01-02 Thread adrian
I happen to have a bunch of models that all have foreign keys, but there is an order in which they could all be initialized. I have figured out how to initialize the built-in User model using Json data, but I can't initialize any models that refer to it using a foreign key. Is this possible an

exception while rendering: 'utf8' codec can't decode byte 0x92 in position 2911

2009-01-05 Thread adrian
I'm getting this message on line 1 of the template: {% extends "site_base.html" %} Which looks ok to me. I got this while refactoring things. Pretty sure the template was working as is in another location. Any idea how I can debug this, I have no clue. --~--~-~--~~~

Re: exception while rendering: 'utf8' codec can't decode byte 0x92 in position 2911

2009-01-05 Thread adrian
Answering myself, there was an illegal character in site_base.html . On Jan 5, 3:30 pm, adrian wrote: > I'm getting this message on line 1 of the template: > > {% extends "site_base.html" %} > > Which looks ok to me.   I got this while refactoring things. > Pre

Re: is it possible to provide initial data for a model with a foreign key to User model?

2009-01-06 Thread adrian
ote: > On Sat, Jan 3, 2009 at 3:01 AM, adrian wrote: > > > I happen to have a bunch of models that all haveforeignkeys, but > > there is an order in which they could all be initialized.   I have > > figured out how to initialize the built-in User model usingJsondata, > >

bug in models.Model __str__ return and non-ascii characters !?

2009-01-08 Thread adrian
hi, i am posting here to follow the "i found a bug" guide ... let's assume i have a model like this: --- class Test(models.Model): testname = models.CharField(max_length=60, null=False, blank=False, unique=True) [... some more fields ...] def __str__(self): return self.te

Re: AlreadyRegistered at /admin/, The model #### is already registered

2009-01-08 Thread adrian
syncdb does not modify already existing tables. so if you modified a model - syncdb will not modify the tables On Jan 9, 12:01 am, rabbi wrote: > Hi, > I've search around a bit and found a few references to this error, but > it seems that everyone else was getting this when they migrated to

Re: bug in models.Model __str__ return and non-ascii characters !?

2009-01-08 Thread adrian
works the way i expected it. thank you very much for your help! On Jan 9, 1:12 am, "Karen Tracey" wrote: > On Thu, Jan 8, 2009 at 6:14 PM, adrian wrote: > > > hi, > > i am posting here to follow the "i found a bug" guide ... > > > let's assume i

defining form fieldsets in view (not in admin)

2009-01-08 Thread adrian
Is there a way to display a form with fields grouped using fieldsets, without entering all the html manually in the view? The Form I have in mind is generated directly from a Model. I see that the admin has this feature but it isn't mentioned anywhere else in the doc. This would have two adv

Re: defining form fieldsets in view (not in admin)

2009-01-08 Thread adrian
27;m willing to try. I would try to use the same fieldset syntax as is used in admin.py, but it would be put in the the Meta of the ModelForm. On Jan 8, 7:53 pm, Malcolm Tredinnick wrote: > On Thu, 2009-01-08 at 17:32 -0800, adrian wrote: > > > Is there a way to display a form with fie

Re: template inheritance

2009-01-12 Thread adrian
> It would be nice to > render data as it comes. Instead of waiting for all the computation to > finish. That is exactly what AJAX is for. You can display your page, then load more data into part of it. --~--~-~--~~~---~--~~ You received this message because

view for page that modifies itself

2009-01-30 Thread adrian
My question is about how to read form items from the POST request before the form is validated. I try to read request.POST['myKey'] and Python says MultiValueDictKeyError: "Key 'myKey' not found in even though Firebug shows the POST request does contain that key. Here's why I want to do this.

Re: view for page that modifies itself

2009-01-30 Thread adrian
ting how django handles the POST data. On Jan 30, 4:15 pm, adrian wrote: > My question is about how to read form items from the POST request > before the form is validated. > I try to read request.POST['myKey'] and Python says > MultiValueDictKeyError: "Key 'myKey'

Re: view for page that modifies itself

2009-01-30 Thread adrian
Still curious about the answer, but I've realized I can accomplish what I want by using a URL pattern to pass the data from the URL into the view that way. On Jan 30, 4:15 pm, adrian wrote: > My question is about how to read form items from the POST request > before the form is val

form validation in XMLHttp submission

2009-02-04 Thread adrian
ogging.debug( "form.date.errors: %s" % form.date.errors) AttributeError: 'MyModelForm' object has no attribute 'date' , 2009-02-03 15:09:34, http://127.0.0.1:8000/lister/addtest/WA/, D602ZZ71) `traceback` = Traceback (most recent call last): File "C:\Py

Re: form validation in XMLHttp submission

2009-02-05 Thread adrian
It is true that I was accessing the error message incorrectly in python - it should be my_form.errors['date'] and it is set. However the doc says you can access that same value with form.name_of_field.errors in a template like this: {{ form.date.errors }} Date: {{

query returning latest entry for each

2009-02-05 Thread adrian
Given a DB like this: Species 1 --~--~-~--~~~---~--~~ 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

admin "Documentation" link not visible

2009-02-08 Thread adrian
The doc under "Using the built-in reference" says: Django's admin interface includes a complete reference of all template tags and filters available for a given site. To see it, go to your admin interface and click the "Documentation" link in the upper right of the page. But I don't have

Re: Json Serialization / Form Validation error

2009-02-10 Thread adrian
Thank you all for posting this. You saved me probably hours of head scratching. --~--~-~--~~~---~--~~ 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

reverse errors while hosting app at WebFaction

2009-02-26 Thread adrian
I'm putting a Pinax-based app on WebFaction using mod_python. It's generating these errors in the apache error log: http://dpaste.com/1966/ This is probably an apache configuration or settings.py or path issue because I don't get the error with the dev server. The directory structure is as f

reverse question

2009-02-26 Thread adrian
I have a working app I'm trying to host. I have this line in urls.py in my project directory: url(r'^$', direct_to_template, {"template": "homepage.html"}, name="home") and my base template uses the tag {% url home %}, and I am getting the error message: NoReverseMatch: Reverse for 'myproj

Re: reverse question

2009-02-28 Thread adrian
y app because the apache config didn't have that path in PYTHONPATH. Therefore unmatching url patterns and views even though they are both correct and both in the same directory. On Feb 26, 11:08 pm, Alex Gaynor wrote: > On Fri, Feb 27, 2009 at 12:02 AM, adrian wrote: > > > I

delete items in queryset results?

2009-03-03 Thread adrian
I've got a table of species sightings. I need a query that returns the latest sighting for each species. I believe this would normally require GROUP BY but I am trying to avoid raw SQL. Could I do the query without the GROUP BY, and then modify the queryset results using Python to eliminate rows

Re: delete items in queryset results?

2009-03-04 Thread adrian
I ended up doing the following: 1. raw SQL to get the IDs of the rows I want. This required an SQL statement with an inner JOIN subquery specifically: SELECT f.id, f.species_name, f.date from (select species_name, max (date) as maxdate from lister_importedsighting GROUP BY species_name) as x

how reverse works

2009-03-05 Thread adrian
I've had some problems with reverse and have some questions and thoughts: 1. When I add a view and a corresponding entry in urls,py, sometimes I get a reverse error until I stop the dev server and restart it, even though nothing is wrong with either file. Is there an order in which those chang

efficient Pagination of large queryset

2009-03-12 Thread adrian
I have users with 30K rows in the database and have to support various types of queries, some of which require raw SQL. I used a two-step approach to get the query_set, first do a raw SQL query to get a list of the ids of the rows I need, then filter the queryset with it. This isn't terribly f

Possible Paginator bug - duplicate SQL queries?

2009-03-12 Thread adrian
I have a view that does not evaluate a queryset, it just adds filters and order_by and then passes it to Paginator (set to 50 per page) and the result is passed to the template.The following SQL is generated (with some fields omitted for clarity). I'm using Django 1.0.2 and MySQL 5.1. SELECT

Re: Possible Paginator bug - duplicate SQL queries?

2009-03-13 Thread adrian
n. On Mar 12, 10:59 pm, Karen Tracey wrote: > On Thu, Mar 12, 2009 at 11:24 PM, adrian wrote: > > > I have a view that does not evaluate a queryset, it just adds filters > > and order_by and then > > passes it to Paginator (set to 50 per page) and the result is passed

Re: Possible Paginator bug - duplicate SQL queries?

2009-03-13 Thread adrian
And no, I'm not using any plugins, except of course have DEBUG=True. On Mar 12, 10:59 pm, Karen Tracey wrote: > On Thu, Mar 12, 2009 at 11:24 PM, adrian wrote: > > > I have a view that does not evaluate a queryset, it just adds filters > > and order_by and then > >

accessing related fields of model

2009-03-19 Thread adrian
The doc gives this example for querying an Entry model which has a foreign key field to a Blog model. e = Entry.objects.get(id=2) e.blog = some_blog Fine. Now if I do it in a loop like this: e = Entry.objects.all() for entry in e: entry.blog = some_blog #do stuff here with Entry and B

Re: accessing related fields of model

2009-03-19 Thread adrian
I found a serializer that can follow foreign key fields, which solves my problem. http://code.google.com/p/wadofstuff/wiki/DjangoFullSerializers But I would still like to understand if someone cares to answer! I think this should be in the documentation also. On Mar 19, 3:20 pm, adrian

TimeField and null

2009-06-24 Thread adrian
I need a time field that can be None. I define the field so that Null is legal in the DB: time_end = models.TimeField(blank=True, null=True) The form field is: time_end = forms.ChoiceField(required=False, choices=END_TIME_CHOICES) and END_TIME_CHOICES is: END_TIME_CHOICES = ( (None, 'En

Re: TimeField and null

2009-06-24 Thread adrian
If you look, blank is set to True, and it still returns the validation error. On Jun 24, 3:25 pm, "Gabriel ." wrote: > Hi, > > On Wed, Jun 24, 2009 at 4:57 PM, adrian wrote: > > > I need a time field that can be None. > > > I define the field so that Nu

Re: TimeField and null

2009-06-25 Thread adrian
Thanks for that clear explanation, and your solution works great! Adrian On Jun 24, 9:23 pm, Karen Tracey wrote: > On Wed, Jun 24, 2009 at 3:57 PM, adrian wrote: > > > I need a time field that can be None. > > > I define the field so that Null is legal in t

validation against hidden field

2009-06-28 Thread adrian
My question is about how to validate one field based on the value of another field in a modelform, but I don't want to show the second field in the form. I've got a Ticket model with a foreign key field to Event: class Ticket(models.Model): # General Admission or assigned seating section e

ModelMultipleChoiceField - when is queryset updated?

2009-06-29 Thread adrian
I had this: disciplines = forms.ModelMultipleChoiceField(queryset = Discipline.objects.all()) But if new Disciplines are created during runtime they do not appear on the list when a new form is rendered. There doesn't seem to be a mention of that fact in the documentation. So is it correct t

Re: ModelMultipleChoiceField - when is queryset updated?

2009-06-29 Thread adrian
Also this behavior is different from ModelChoiceField - which DOES seem to update immediately if an instance is added to the model. I'm using version 1.0.2 Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

view causes error in Internet Explorer but not Firefox

2009-07-04 Thread adrian
This view shows a cart and processes a cart submission. You can try it on our staging server at: http://tixsa.giantbyte.com You'll have to find an event with tickets and add it to your cart. The code in question is: http://dpaste.com/hold/63158/ Everything works fine on FF. On IE, everyth

sessions and multiple login as same user

2009-07-10 Thread adrian
My app is used in an office with multiple users logged in and using it simultaneously. Sometimes they may log in as the same user. Is there any reason this should cause interaction between their sessions? I have looked through the session code and see nothing that should prevent these from op

Re: DjangoCon '09 Schedule

2009-08-31 Thread adrian
Tickets are now sold out. I need a ticket. If anyone would like to sell their ticket please contact me at adrian_nye at yahoo. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

creating model instance with existing foreign key db entry

2009-03-25 Thread adrian
I have a Sighting model which has a foreign key field "notes" to a model called Notes. Notes has a predefined empty note with id=1. If the user specifies no note then I want the sighting to reference this predefined empty note. So in my view: note = form.cleaned_data['notes'] if note != "": #

Querysets and ROW_NUMBER

2009-04-07 Thread adrian
Was wondering if anyone can point me in the right direction here, what would be the Django style way to annotate a set with a row number in some way like:- Book.objects.all().order_by('date_added').annotate(row_num=RowNumber ('id')) Unfortunately PostgreSQL does not support ROW_NUMBER yet so I c

Re: Querysets and ROW_NUMBER

2009-04-08 Thread adrian
Thanks for the advice Tim. I ended up doing something similar, although not as elegant as your solution. I'll give it a go ;) cheers adrian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

inclusion tag optional argument

2009-04-21 Thread adrian
I want to have an inclusion tag that builds a menu system, which has a default config. default_config = [list of dicts here] @register.inclusion_tag('_nav_leftmenu.html') def nav_leftmenu(menu_config=default_config): # build stuff here to display menu system return {'menu_html': menu_h

how to display m2m fields in template

2009-04-24 Thread adrian
Given these models from the doc: class Publication(models.Model): title = models.CharField(max_length=30) class Article(models.Model): headline = models.CharField(max_length=100) publications = models.ManyToManyField(Publication) What do I need in the view and template to print an

Re: how to display m2m fields in template

2009-04-25 Thread adrian
a variable containing 'P'. Is there a better way either in the template or in the select statement? Thanks On Apr 24, 6:20 pm, Alex Gaynor wrote: > On Fri, Apr 24, 2009 at 7:18 PM, adrian wrote: > > > Given these models from the doc: > > > class Publication(model

timeuntil filter

2009-05-09 Thread adrian
This filter is returning an empty string for a valid date (or datetime with 0,0,0 added) in Django 1.0.2. The documentation for this says: > Comparing offset-naive and offset-aware datetimes will return an empty string. but it doesn't say which type it uses. Shouldn't this say something like:

Re: timeuntil filter

2009-05-09 Thread adrian
; On 5/9/2009 11:28 AM, adrian wrote: > > > > > > > This filter is returning an empty string for a valid date (or datetime > > with 0,0,0 added) in > > Django 1.0.2. > > > The documentation for this says: > > >> Comparing offset-naive and off

change query for ModelChoiceField

2009-05-11 Thread adrian
I want to create a form with a select box populated from a query that I pass from the view. For example: if country == 'Canada': methods = ShippingMethod.objects.filter( delivery_time__lte=time_avail_hours, abbrev__contains='SC' )

Re: change query for ModelChoiceField

2009-05-11 Thread adrian
, *args, **kwargs): >         super(ShippingMethodForm, self).__init__(*args, **kwargs) >         self.fields["ship_method"].queryset = > ShippingMethod.objects.filter(something) > > when you initiate the form, you do it like this: > form = ShippingMethodForm(something, requ

Re: change query for ModelChoiceField

2009-05-11 Thread adrian
oops! missing the filter_string arg in __init__. After I added that, I get: ValueError .too many values to unpack On May 11, 4:27 pm, adrian wrote: > I tried in the view: > > filter_string = "delivery_time__lte=time_avail_hours, > abbrev__contains='SC'"

Re: change query for ModelChoiceField

2009-05-11 Thread adrian
For the record, here's what works: In views.py: if country == 'Canada': delivery_time__lte=time_avail_hours abbrev__contains='SC' formShip = ShippingMethodForm(delivery_time__lte, abbrev__contains) Then in models.py: class ShippingMethodForm(forms.Form): # tricky

Re: Having trouble authenticating/validating

2009-05-12 Thread adrian
For the record, I am seeing the same problem. request.POST contains the correct values for username and password, yet is_valid returns false and the form does not include any error messages. I haven't gotten to the bottom of it yet but AuthenticationForm is not calling the clean() method. And I

Re: Having trouble authenticating/validating

2009-05-12 Thread adrian
Figured it out by looking at how the admin view using AuthenticationForm: In POST: loginForm = AuthenticationForm(data=request.POST) note the use of data= which I have not seen before in GET: loginForm = AuthenticationForm(request) request.session.set_test_cookie() note the passing

ManyToMany field and limit_choices_to

2009-05-16 Thread adrian
I am creating a view to edit a model that has a ManyToMany field. The field is defined as: performer = models.ManyToManyField(Entity, limit_choices_to= {'role__exact':'PER'}) Entity is a table of persons or organizations. Some of them are performers and some are not (distinguished by "role").

Re: ManyToMany field and limit_choices_to

2009-05-16 Thread adrian
pilot error, no need to reply On May 16, 10:41 am, adrian wrote: > I am creating a view to edit a model that has a ManyToMany field. > The field is defined as: > > performer = models.ManyToManyField(Entity, limit_choices_to= > {'role__exact':'PER'})

initial data for formset

2009-05-26 Thread adrian
This code creates a formset and populates fields with copies of date and start_time. The problem is, if num_events is X then it creates X forms but it only populates X-1 (it leaves the last one uninitialized). My question is why, and how to fix it? Thanks. DateTimeFormSet = for

Re: initial data for formset

2009-05-27 Thread adrian
Thanks. I've set extra=0 and added an element to the list, and now the last form on the page is half-initialized - the date is set but the time is not! What could cause that?? On May 26, 9:20 pm, Sam Chuparkoff wrote: > On Tue, 2009-05-26 at 17:27 -0700, adrian wrote: > > This

form.initial and ManyToMany

2009-05-27 Thread adrian
I'm writing a view to edit a model that has ManyToMany fields. The form appears with all the fields properly filled out based on the existing model instance, except the ManyToMany fields show all the options but none are selected. My question is, what do I have to do to have the form appear ex

Re: form.initial and ManyToMany

2009-05-27 Thread adrian
Oops, the title of this thread should have been "instance" instead of "initial". --~--~-~--~~~---~--~~ 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.co

multiple modelforms for model

2009-06-04 Thread adrian
I need to show Telephone and Address modelforms in the middle of another big form, so I decided to organize the big form into smaller modelforms and display each in a separate fieldset. This works well until the next time I clear the DB and run syncdb. At that point, syncdb completely ignores th

HttpResponseRedirect doesn't redirect in this case

2009-11-17 Thread adrian
The LOGIN_REDIRECT_URL setting points to this view, where I want to redirect again according to the group the user is in: @login_required def after_login(request): print "after_login" groups = request.user.groups.all() if groups: # use first one name = str(groups[0].na

Re: include(admin.site.urls) mangles with the URL

2010-05-30 Thread adrian
this is what you had: (r'^admin/(.*)', admin.site.root), then you changed it to this (which is incorrect with the regex) (r'^admin/(.*)', include(admin.site.urls)), # WRONG this is correct: (r'^admin/', include(admin.site.urls)), -- You received this message because you are subscribed to the Go

setting DEBUG=False disables flatpages

2010-06-07 Thread adrian
or is also mentioned - but it is still unreviewed since more than a week. Best Regards, Adrian -- 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 thi

Re: User permission confusing

2010-06-08 Thread adrian
> BTW: There are many links in the administration page, that I do not > know where to map. Such as "View on website" (http://127.0.0.1:8000/ > admin/r/3/2/) in an user profile please read: http://docs.djangoproject.com/en/1.2/ref/models/instances/#the-permalink-decorator -- You received this mes

Re: User permission confusing

2010-06-08 Thread adrian
> BTW: There are many links in the administration page, that I do not > know where to map. Such as "View on website" (http://127.0.0.1:8000/ > admin/r/3/2/) in an user profile of course including: http://docs.djangoproject.com/en/1.2/ref/models/instances/#get-absolute-url and http://docs.djangopr

Re: Need subset on Admin interface

2010-06-08 Thread adrian
> I need when I create User or change User, and choose some Switch to > have Ports only related to that Switch in Option Box. does http://docs.djangoproject.com/en/1.2/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to help? -- You received this message because you are subscribed t

Re: setting DEBUG=False disables flatpages

2010-06-08 Thread adrian
tracked the problem more down... the problem appeared when using own handler404/handler500 views and returning the invalid HttpResponse instead of HttpResponseNotFound/ HttpResponseServerError. This is not documented and needs doc improvement ... -- You received this message because you are subs

dev server smtplib error

2010-06-10 Thread adrian
I have seen this error now on 3 projects and two OS (Mac & Linux), but only with the dev server. The view will begin the response and then hang for a long time (30+ seconds), then this error is generated and it continues normally. Usually it occurs on a page that either parses or uploads files.

encrypted model field

2010-09-23 Thread adrian
I want this field to be saved encrypted in the db, but appear unencrypted everywhere else: class EncryptedCharField(models.CharField): __metaclass__ = models.SubfieldBase def save_form_data(self, instance, data): setattr(instance, self.name, encrypt(data)) #def get_prep_valu

encrypted model field

2010-09-23 Thread adrian
I want this field to be saved encrypted in the db, but appear unencrypted everywhere else.My question is which combination of field methods should I use? I have gotten parts of this working with various combinations of the methods below, but can't get it all to work. Using one method makes

HttpResponseRedirect waiting for something

2010-02-25 Thread adrian
I have a view that takes a form submission with a file, loads orders from the XML file by parsing it and saving records. After it is all done it redirects to another view, but the redirect hangs for about 30+ seconds then I get this message and it continues normally: Traceback (most recent call

unique_together across tables?

2005-08-08 Thread adrian
Is there a way to create multiple tables which share an id field? My meaning is that ids would be unique over both tables. It is already possible to indicate that two fields in the same table share this constraint, using the "unique_together" option. This would be useful for creating a "transla

Re: unique_together across tables?

2005-08-08 Thread adrian
I think unique_together is not actually the behavior I mean. I mean for the two fields to be unique in the sense that if a value is found in one field then it won't also be found in the other field. My question stands. Anyone know how to do this?

Re: SetEnv in mod_python

2005-08-23 Thread adrian
django currently requires apache2.0+ and mod_python3.1+ That's probably something that should be made more clear in the docs. Maybe they're planning support?

Postgres on OSX Lion

2011-09-26 Thread adrian
Postgres comes pre-installed in OSX Lion for the first time (and mysql is no longer present). Yeah! I installed psycopg2 using pip. Then I kept getting the error message: psycopg2.OperationalError: could not connect to server: Permission denied Is the server running locally and acceptin

Custom form on formset does not use Meta 'widgets', bug?

2011-06-23 Thread adrian
Django dev, Python 2.6.6 Just wondering if I should file a bug report or am I just doing something wrong. I have an inline: class ProductImageInline(admin.StackedInline): model = ProductImage formset = ProductImageFormset ...the form declaration and formset factory call: class Produ

Re: time help (again)

2008-12-02 Thread Adrian Klaver
seconds = dt_diff.seconds print 'Seconds= '+str(seconds) total_secs = (days * 86400) + seconds return total_secs So: timeclkfunc.timeDiff(hittime,n) dt_1 = 2008-12-01 22:02:59 dt_2 = 2008-12-01 22:32:47.391199 Days= 0 Seconds= 1788 Out[17]: 1788 -- Adrian Klaver [EMAIL PROTECTED]

Re: Djangobook Revisions for 1.0 release

2008-09-07 Thread Adrian Holovaty
p today at DjangoCon during the "Future of Django" session, and the audience approved of the idea, but I'll need to explore the amount of work involved. Adrian -- Adrian Holovaty holovaty.com | everyblock.com | djangoproject.com --~--~-~--~~~---~--~-

Re: Changing field error messages

2008-09-27 Thread adrian olaru
You can try this: class AAForm(forms.ModelForm): fullname = forms.CharField(max_length=20, error_messages={'required': 'Be there no name?'}) class Meta: model = AuthorArtist On Sep 22, 11:59 am, Donn <[EMAIL PROTECTED]> wrote: > Hi, > I would like to change the 'already exists' m

Re: can't connect with dbshell

2009-03-20 Thread Adrian R.
Same problem here and no additional information. Could somebody please help us? Thank you! On 18 Mrz., 23:23, waltbrad wrote: > First time I think I've ever tried this. I'm using postgres and the > database is configured correctly and I have psql.exe on my path. > > So at the dos prompt I can: >

Re: can't connect with dbshell

2009-03-20 Thread Adrian R.
On 20 Mrz., 17:21, Ramiro Morales wrote: > On Wed, Mar 18, 2009 at 7:23 PM, waltbrad wrote: > > > First time I think I've ever tried this. I'm using postgres and the > > database is configured correctly and I have psql.exe on my path. > > > So at the dos prompt I can: > > > C:\>psql -d postgre

Re: Accessing dictionaries in templates in a sorted manner

2009-06-10 Thread Adrian Rogers
inker around with my data structures before putting them into the template. Anyone able to confirm if this is an intended use that I can rely on for the future? -- Adrian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: mmmmm

2009-12-26 Thread Adrian Maier
7; works ) If i remember correctly, the django-admin.py is copied to /usr/local/bin which is not in the default PATH. So for conveninience you might want to add /usr/local/bin to your PATH . Good luck, Adrian Maier -- You received this message because you are subscribed to the Google Gr

Re: Anonymous Visitors vs. Registered User Preference Juggling

2010-01-02 Thread Adrian Maier
ill store to > database to some kind of preference table with a 1-1 Foreign key to > the user). > > But I figure I'm going to facepalm myself when it turns out Django > already solves this problem (like it does for most other "core" > problems ;) > > Hell

Re: multidb - partitioning

2010-01-08 Thread Adrian Maier
es creation of a new table , and modifying the insert trigger). After creating the tables you should do some testing to see that using partitioning is indeed giving better performance. Adding some indexes could be an alternative solution, and the only way for knowing what's the best solution is

Re: multidb - partitioning

2010-01-10 Thread Adrian Maier
On Sat, Jan 9, 2010 at 15:20, tom wrote: > Hi Adrian, > > thanks for your answer! > The problem is, that i don't know how many projects will be created. > Every user > of the application can create and delete new projects. > Maybe it's possible to execute s

Re: Using the form field values in templates

2010-01-29 Thread Adrian Maier
Shawn, Ondrey, Thanks for your answers. I ended up using to ModelForm and ModelFormSet. Cheers, Adrian On Tue, Jan 19, 2010 at 16:12, ondrey wrote: > Hi, > > if the form is bound (i.e. form.is_bound is true) then you can access > its data attribute, which contains the data

Looking for a Django/AJAX dev/contractor

2010-02-17 Thread Adrian Aoun
iving a very nice referral bonus if we hire someone you recommend! We're fine with remote working, though ideally the person could come to Seattle for a few weeks. Thanks adrian. -- You received this message because you are subscribed to the Google Groups "Django users&quo

Looking for a wiki or cms created with django

2010-02-23 Thread Adrian Maier
henticated users . Does anyone happen to know about a project similar to what i've described above ? Cheers, Adrian M. -- 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

Re: Looking for a wiki or cms created with django

2010-02-24 Thread Adrian Maier
ngo? Obviously I have already tried to search this on the internet, but the ' wiki ' keyword is a tricky one to search. Most projects have their own wiki , so the results for searches like 'django wiki' typically point me to "the wiki of the Django project". C

Re: Best Practices to Make your Apps Portable

2007-07-25 Thread Adrian Holovaty
* a good method to use if you want to distribute your application, however. We need better documentation about best practices to make apps portable. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because

Re: Anybody used Google app engine, and wanna share their experience?

2008-04-07 Thread Adrian Holovaty
URLCONF='blog', ) handlers.CGIHandler().run(WSGIHandler()) if __name__ == "__main__": main() Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | everyblock.com --~--~-~--~~~---~--~-

Re: Anybody used Google app engine, and wanna share their experience?

2008-04-08 Thread Adrian Holovaty
> wsgi.multiprocess > wsgi.multithread > wsgi.run_once Here you go, Graham: 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': True, 'wsgi.url_scheme': 'http', 'wsgi.version

Re: Newforms, form_for_model, help_text and unicode.

2007-02-19 Thread Adrian Holovaty
..): > self.help_text = smart_unicode(help_text) Thanks, Sandro. I fixed the bug in changeset [4543]. Note that the patch wasn't exactly that, as it had to account for the case of empty help_text (help_text is None). Adrian -- Adrian Holova

  1   2   3   4   5   6   7   8   9   10   >