don't hesitate to email me :-)
Brian Rosner
http://twitter.com/brosner
--
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/-/ahnYC8wsFNIJ.
To post to t
before diving into Pinax. NOTE: the
documentation linked is for the development version of Pinax.
--
Brian Rosner
http://twitter.com/brosner
--
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@
drops in activity. I use it everyday and am constantly thinking of things
to do to improve it. Activity will pick up over time. There has been a ton of
changes since 0.7. See http://github.com/pinax/pinax/compare/0.7.X...master
(Github won't even load the full list since it so big :-) )
B
been recently using
http://github.com/ask/ghettoq for a database backend. This makes dealing with
the queue dependancies much better since you can run it off SQLite for
development. As long as the designer has access to Python 2.5+ (and your code
can run on it) pretty much everything is there
urceRoleForm.__init__ after this slight modification. Then you can
simply check for None and deal with the fields attributes that way.
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
dictToSend,
> context_instance=RequestContext(request))
One thing I am noticing here is that if the formset fails to validate
you are not putting the formset in the dictToSend to be rendered with
the error messages. The best way to do this is just simply unindent
the formset assignment t
ides model
formsets that know how to deal with this internally. Go read up on
inline formsets which is a layer on top of model formsets.
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--
nce is passed
to the template. Also, don't call a FormSet class or instance 'form'.
That is just going to be confusing. It is better named FormSet (or
some variant depending on the models) for a class and formset for
instances. This will help you see the differences and when you are
On Wed, Nov 19, 2008 at 10:23 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
>
>
> On 20 nov, 06:01, "Brian Rosner" <[EMAIL PROTECTED]> wrote:
>> On Wed, Nov 19, 2008 at 9:53 PM, [EMAIL PROTECTED]
>>
>> <[EMAIL PROTECTED]> wrote:
>
I have written some
information on that ticket that may be of use to you.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
On Wed, Nov 19, 2008 at 9:14 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> On 20 nov, 05:01, "Brian Rosner" <[EMAIL PROTECTED]> wrote:
>> On Wed, Nov 19, 2008 at 8:59 PM, Brian Rosner <[EMAIL PROTECTED]> wrote:
>> > On Wed, Nov 19, 2008
On Wed, Nov 19, 2008 at 8:59 PM, Brian Rosner <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 19, 2008 at 8:43 PM, Luper Rouch <[EMAIL PROTECTED]> wrote:
>> For django to save the formset correctly when it is submitted, I have to
>> manually set INITIAL_FORMS to 0 in javascri
ying to shove a square object through a round
hole. Why are you using a model formset when there is "real" queryset?
Model formsets are simply a thin layer over formsets. It sounds like
you need to those to cleanly write your code and not resort to hacking
a model formset to work without a
rather be 'group' if anything.
> The resulting admin tool generates a separate Membership ID field
> (table row) with a spyglass next to it. Each spyglass sets or replaces
> the single ID in that row.
I presume you are asking a question here? That extra row is
technica
oaded to their own background
process for processing as well.
>
> Advice?
If you want more direct feedback, check out the #pinax channel on freenode. :)
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed
o differentiate between the two you can put
a conditional around kwargs["add"] and/or kwargs["change"] which will
be True in their respective cases.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are su
of the save() methods?
>
Looks like you are hitting http://code.djangoproject.com/ticket/7888.
I am working on a fix today actually. Keep an eye out there.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are su
"my_own_argument"] = "my value"
return super(MyBaseFormSet, self)._construct_form(i, **kwargs)
>
> On Aug 20, 5:21 pm, "Brian Rosner" <[EMAIL PROTECTED]> wrote:
>> On Wed, Aug 20, 2008 at 9:10 AM, patrickk <[EMAIL PROTECTED]> wrot
> extra=5).
> question is: where do I set path_server & path?
You must subclass django.forms.formsets.BaseFormSet and override
_construct_form to pass in your parameters. Then you can pass your
FormSet subclass as the base of the FormSet returned by
formset_factory like so: formset_fa
e
app you would also keep around register calls for the default
AdminSite instance for the user common case.
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&qu
On Jul 18, 2008, at 6:22 PM, Ariel Mauricio Nunez Gomez wrote:
> BTW: Bryan, you've gotta redo the commits visualization[1] for
> another big explosion!!
I plan on updating the visualization right after we release 1.0. :)
--~--~-~--~~~---~--~~
You received thi
branch is now closed.
Onward to 1.0!
[1]: http://code.djangoproject.com/changeset/7967
[2]: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribe
ck into
how model formsets work. It might help you uncover why this is.
> >
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
On Jun 26, 2008, at 1:23 PM, timc3 wrote:
>
> Might be a stupid question but how did you apply the patch?
Get inside your Django directory and execute::
patch -p0 < the_path.diff
That should get it going. Let me know if you have any more questions.
Brian Rosner
http://oe
hed your copy of
Django from newforms-admin to trunk.\
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
On Jun 19, 2008, at 11:34 AM, Leon Yeh | New Avenue.net wrote:
>
> def thumbnail(self):
> return """""" % (self.photo)
After the function add thumbnail.allow_tags = True.
Brian Rosner
http://oebfare.com
--~--~-~--~~---
the newforms-admin branch. See ticket
#6470 [1]. At this point your best bet is to hardcode the URLs.
[1]:http://code.djangoproject.com/ticket/6470
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
sure
that the ORM generates the SQL you would expect from a foreign key.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
elopment closely [2] most pain can be mitigated.
[1]: http://code.djangoproject.com/wiki/NewformsAdminBranch
[2]: http://code.djangoproject.com/log/django/branches/newforms-admin
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because
lean_name(self):
> value = self.cleaned_data["name"]
> if name == "Brian":
> raise forms.ValidationError, u"You are not allowed to be named
> Brian."
> return value
Oh, and if name == "Brian" should
.register(Person, PersonAdmin)
That is the code required, I haven't tested it, but it should work.
Clearly don't drop it into one file as it is best to split that code
out, but shown for ease of coding ;) Let me know if you have any
furth
On May 9, 4:31 am, Nuno Mariz <[EMAIL PROTECTED]> wrote:
> I'm using newforms-admin and I've got a "duplicate key violates unique
> constraint" when I'm added new record(with the same value on field
> that already exists in the db) in admin interface.
> I've an "unique=True" in the field, should
> Of course, you'll have to develop a good workflow so that either your
> user is notified on that page when the import is completed (possibly
> through some ajax-y interface either by polling or using a Comet
> system) or, the easy way out, just provide a page that provides a
> status, where your
> I gave a look at newforms.models and I see this "InlineFormSet" class,
> but I can't really understand how to use it, nor I can find docs on
> this matter, the only thing I found (don't ask me how) is
> http://code.djangoproject.com/ticket/6632 .. that explains the various
> FormSets (including
> "Hold down "Control", or "Command" on a Mac, to select more than one."
>
> and NO select boxes, search input etc!
What revision of newforms-admin are you using? Also, what browser is
this behavior is displayed i
b [1] python library.
[1]: http://www.reportlab.org/
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
ge.
I look forward to seeing you at PyCon this year!
[1]: http://code.djangoproject.com/wiki/SprintIdeas
[2]: http://code.djangoproject.com/wiki/SprintPyCon2008
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are su
It
should be "extra" without the "s".
[1]: http://code.djangoproject.com/ticket/6075
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
n issue in trac if you can't find
> anything matching.
http://code.djangoproject.com/ticket/5878 -- I am still unsure of the
correct way to fix this, but it is a known issue.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this mess
port PYTHONPATH=/home/user/django-trunk
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroup
't
need to be switching between versions very often or it is a production
server, for example.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
using the RequestContext to ensure {{
MEDIA_URL }} is displayed correctly in your templates. (This will only
work if you are using HEAD of Django trunk, otherwise you must write
your own context_processor).
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~---
ield1 is filled, field2 is not required.)
As I pointed out above this is still newforms. This type of validation
is very possible since the form clean_FIELD methods are never passed
its own value. It is the job of the developer to pull out the values
from cleaned_data that a clean_FIELD
est.FILES, instance=instance)
if form.is_valid():
form.save()
else:
form = MyModelForm(instance=instance)
return render_to_response("mytemplate.html", {
"form": form,
}, context_instance=RequestContext(request))
--
Brian Rosner
ht
uest.user #excluded in PlaceForm
> newplace.save()
Wow, you are so close to making this work :) You are passing in "False"
to commit which will always be a True statement. Remove the quotes to
pass in the boolean value False. It should then work.
>
> Exeption after exe
red
in memory then written to disk. Clearly you can see this being a
problem with large files of 600-900 MB.
Check out [1] which has patches to stream large files to disk before
saving it in its destination directory as defined by upload_to in your
FileField.
[1]: http://code.djangoproject.com/t
zero-based, but
> page_range (for the template-output) is one-based.
>
> this wouldn't be a problem if i could switch to 1-based object-
> pagination. so how do i dow? write my own object-pagionation-subclass?
>
>
--
Brian Rosner
http://oebfare.com
--~--~
database won't be hit until it is evaluated. Ex. it
is iterated over in a for loop, you do a[0].id, or you provide a step
in the slice a[::2]. .get will actually hit the database when called.
--
Brian Rosner
http://oebfare.com
--~--~-~--~~~---~--~~
You re
Yes, you can. This is called edit_inline in Django. Check out [1] and
read that section. It will show you how to accomplish edit_inline.
[1]:
http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships
Thanks.
--
Brian Rosner
http://oebfare.com
--~--~-~--~--
What you really need is to use the formfield_callback argument to
form_for_instance. This allows you to override the default fields
that are returned for a given field in the model [1]. There is an
open bug, [2], that will allow for an easier way of overriding the
queryset that is ultimately ren
moved from it. Patches are welcome. (And no Malcolm,
> that's not directed at you ;)
Your wish is my command ;)
http://code.djangoproject.com/ticket/5720
>
> Joseph
>
> [1]
> http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/options.py#L503
> If I added the join table manually would Django still work? Or does it
> need to "know" about the table?
Yes, it would work fine. Django is expecting it and doesn't find it
and throws that error about not finding it. Until a schema evolution
solution gets merged into trunk
Err, my bad. I wasn't thinking. I need to stop writing replies after
having a few beers. ;)
On Aug 21, 9:09 pm, Brian Rosner <[EMAIL PROTECTED]> wrote:
> There isn't a solution to your particular problem. Your problem is
> that you are accepting invalid data. Nobody can
There isn't a solution to your particular problem. Your problem is
that you are accepting invalid data. Nobody can be born on a day that
doesn't exist. I'd recommend verifying that the data be entered into
the database is valid.
On Aug 3, 5:37 am, Bram - Smartelectronix <[EMAIL PROTECTED]>
wro
with the promotion of
Django and keeping those presentations consistent.
--
Brian Rosner
http://www.brosner.com/blog
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
oach_email`,`coach_phone`,`team_picture`,`_order`)
VALUES
>
> ('2','2005-09-10','2','','','','','',(SELECT COUNT(*) FROM
> `football_team` WHERE `school_id` = '2'))"
>
>
> This error
eate the form from several
> _models_ when the user is trying to add new information and 3) how to
> instantiate the multiple save objects from the POSTed form.
>
> Many thanks for your kind assistance in what I know must be quite a
> simple operation.
You might want to check out
You may also want to check out http://code.djangoproject.com/ticket/3990.
On May 22, 5:19 am, "Seiji - technics" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there a way to show as specific field in the admin screens but
> without permitting to edit it?
> I want something similar to "editable=Fals
ement
this? I first thought about using generic relations, but not 100%
sure on how to go about it.
--
Brian Rosner
http://www.brosner.com/blog
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&
key/
> value pair to the end of the link.
>
> /?object_id__exact=2
>
> How then, does this get implemented into the query to yield correct
> results?
>
> Sincerely,
>
>
>
Check out the ChangeList class here:
http://code.djangoproject.com/browser/django/tr
>
I don't think it's possible to add a class attr to the label tag that
Django generates through its lazy form methods. You can pass an attrs
dictionary to a widget. Check into widgets, there are some good
examples in the newforms_admin branch. The only other alternative to
specifyi
You will want to check out how to create widgets. Here might be an
example you are looking for as well as a an example in general.
http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/widgets.py
On
2007-04-14 11:32:53 -0600, Ray Cote <[EMAIL PROTECTED]> s
provide, but I have a quick question about the
UI of it. How would something this this handle a foreign key model
that had more than one required field to save itself? Just wondering
if you came across something like that.
To me it would seem that creating a custom widget that
orms-admin is on its way to help resolve this
issue. Take a look at newforms-admin branch:
django/newforms/formsets.py. This is what is going to be used for
edit_inline functionality which does enable the functionality to be
there.
--
p_id into SalesForm. It sounds
like there is a simpler solution to this as opposed passing it into the
form class which shouldn't really care about p_id at all.
--
Brian Rosner
http://www.brosner.com/blog
--~--~-~--~~~---~--~~
You received this message because
o server: /etc/httpd/
> modules/mod_python.so: undefined symbol: apr_table_compress
>
> i've seen on some other forums that my apr version needs to be 0.9.4,
> and that is the version i'm running. any idea what that might be?
>
> thanks again!
>
> On Mar 7, 10:34 am, Brian
l put
itself where it should go. I believe this is in /etc/httpd/modules
which symlinks to /usr/lib/httpd/modules. Restart apache and you
should be ready to go.
--
Brian Rosner
http://www.brosner.com/blog
--~--~-~--~~~---~--~~
You received this message because you
If I have the given model in an app:
class Product(models.Model):
name = models.CharField(maxlength=150)
list_price = models.FloatField(max_digits=10, decimal_places=2,
default=0.00, blank=True)
price = models.CharField(max_digits=10, decimal_places=2)
cl
use. You can have multiple forms for
each instance. My ModelInstanceForm uses a prefix since I wrote this
code to allow a form with data in one model and a foriegn key form like
listing the products that belong to a product page. So this may not
work for you out of the box, but y
Hey all,
I am writing a new Django based application that will replace our
current shopping cart system. All is great on that front and Django
has been amazing. I have written xcart_convert.py that sends queries
to the current database to pull out all of the information and move it
over to the
Ah, that does make sense. Yeah I am running with a production server,
but using a virtual host to contain out the production site from
development. I suppose I can just build another Apache and strip it
down for my development needs. Thanks for the tip.
On Jan 26, 11:11 am, "Waylan Limberg" <[
71 matches
Mail list logo