Re: Admin foreign key widgets Dont quote Keys that the unicode of the Primary key (value=number) is a special character.

2023-02-13 Thread Dev Femi Badmus
https://chat.whatsapp.com/IVvrrF9Wq7OHWk5x4XNk9K On Wed, Feb 8, 2023 at 3:40 PM Oluwayemisi Ismail < ismailoluwayem...@gmail.com> wrote: > Hello everyone, > > I'm Working on a ticket, "Admin Foreign Key widgets don't quote keys". > When I reproduce the

Customizing field widgets and classes from model.Field (aka fields, fields and widgets)

2022-12-01 Thread Bernd Wechner
and widgets as needed, and is quite flexible. But it's called implicitly in Generic views. It strikes me this simple elegance could be conserved, and permit more flexible specification of form fields and/or widgets with a very small change to the code and associated docs. I would pr

Re: django testing: widgets

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Thu, 1 Oct 2020, 6:32 pm albert, wrote: > Hi > due to the impact of corona/covid19 I am wo

django testing: widgets

2020-10-01 Thread albert
Hi due to the impact of corona/covid19 I am working in a django-web-project. (I am a beginner to those Technologies...) At the moment I am writing tests for a django application. Basic tests for creating get- and post-request with the test server (client) are working. But now I am facing a file

Re: Widgets not working for dynamically added formset forms

2019-10-08 Thread Dmitri S.
At first I hoped not to dive in JS and mostly use django things, but ok, now I see it's not that simple. Thanks for help. вторник, 8 октября 2019 г., 16:49:08 UTC+3 пользователь lemme smash написал: > > okay, i think i got it. you probably need to provide some snippet to > reload list of choice

Re: Widgets not working for dynamically added formset forms

2019-10-08 Thread lemme smash
ormset with fields with Select2 widgets and a calendar > (date-picker) from django app. > > And I use dynamic addition of formset forms. > > > When I render a template for the first time, all widgets work fine. *But > when I add new formset form, widgets of this new form

Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread Dmitri S.
an using django empty_form? or to make autocomplete and calendar with pure JS? or...? воскресенье, 6 октября 2019 г., 17:42:49 UTC+3 пользователь lemme smash написал: > > okay, but what you actually mean by "widgets don't work"? > also, from my experience I can say that when you

Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread Dmitri S.
писал: > > okay, but what you actually mean by "widgets don't work"? > also, from my experience I can say that when you have to work with some > dynamic forms is't much better to use pure js on client and only validate > it on backend > -- You received this me

Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread lemme smash
okay, but what you actually mean by "widgets don't work"? also, from my experience I can say that when you have to work with some dynamic forms is't much better to use pure js on client and only validate it on backend On Tuesday, October 1, 2019 at 11:41:28 PM UTC+3, Dmitri

Re: Widgets not working for dynamically added formset forms

2019-10-04 Thread Dmitri S.
and after clicking on widgets also no errors пятница, 4 октября 2019 г., 17:58:22 UTC+3 пользователь Dmitri S. написал: > > Unchecked runtime.lastError: The message port closed before a response was > received. in Opera after page loading for the first time and no errors in > Chrome

Re: Widgets not working for dynamically added formset forms

2019-10-04 Thread Dmitri S.
Unchecked runtime.lastError: The message port closed before a response was received. in Opera after page loading for the first time and no errors in Chrome. When I add new form no other errors appear. пятница, 4 октября 2019 г., 10:41:58 UTC+3 пользователь lemme smash написал: > > and you have n

Re: Widgets not working for dynamically added formset forms

2019-10-04 Thread lemme smash
and you have no errors in browser console? On Tuesday, October 1, 2019 at 11:41:28 PM UTC+3, Dmitri S. wrote: > > I have a formset with fields with Select2 widgets and a calendar > (date-picker) from django app. > > And I use dynamic addition of formset forms. > > > When

Widgets not working for dynamically added formset forms

2019-10-01 Thread Dmitri S.
I have a formset with fields with Select2 widgets and a calendar (date-picker) from django app. And I use dynamic addition of formset forms. When I render a template for the first time, all widgets work fine. *But when I add new formset form, widgets of this new form don't work.* I

Django forms versus widgets versus crispy forms

2018-11-26 Thread TimT Vogt
Is there a good tutorial for Posting forms in the database? I have a model and views and able to post name adres from the admin on local host:8000. Now try to decide what is best for name adres and shipping. On two separate forms So I am figuring out how my models need to look. Verstuurd vanaf

Re: AutocompleteSelect and AutocompleteSelectMultiple admin widgets.

2017-11-28 Thread Daniel Gola
On Monday, November 27, 2017 at 3:27:30 AM UTC-5, Daniel Gola wrote: >> >> Hello, >> >> Where I can find more detailed information about AutocompleteSelect and >> AutocompleteSelectMultiple admin widgets? >> >> I have not been able to find any informa

Re: AutocompleteSelect and AutocompleteSelectMultiple admin widgets.

2017-11-28 Thread Daniel Gola
On Monday, November 27, 2017 at 3:27:30 AM UTC-5, Daniel Gola wrote: >> >> Hello, >> >> Where I can find more detailed information about AutocompleteSelect and >> AutocompleteSelectMultiple admin widgets? >> >> I have not been able to find any informa

Re: AutocompleteSelect and AutocompleteSelectMultiple admin widgets.

2017-11-27 Thread Tim Graham
ailed information about AutocompleteSelect and > AutocompleteSelectMultiple admin widgets? > > I have not been able to find any information in the documentation. > > I will be grateful for your help. > > > Best regards > Daniel > > > -- You received this me

AutocompleteSelect and AutocompleteSelectMultiple admin widgets.

2017-11-27 Thread Daniel Gola
Hello, Where I can find more detailed information about AutocompleteSelect and AutocompleteSelectMultiple admin widgets? I have not been able to find any information in the documentation. I will be grateful for your help. Best regards Daniel -- You received this message because you are

How to set default css classes for all built-in form widgets

2016-12-25 Thread jxrossel
like something as follows instead: 1. Define somewhere (e.g. in the settings file) a default mapping between form fields / widgets and css classes, e.g. 'textinput': 'my_default_css_class_for_text_inputs' 2. By default, for all automatic generation and ren

Re: How to use django.contrib.postgres.forms widgets in the admin site

2016-08-16 Thread François Schiettecatte
gt; But when I have used that email it is invalid, so I continue to receive > dozens of emails? > > Any ideas? > > Thanks, > Liz > > > From: django-users@googlegroups.com on behalf > of Jay Sheldon > Sent: 16 August 2016 08:55 > To: Django users > Subject: H

Re: How to use django.contrib.postgres.forms widgets in the admin site

2016-08-16 Thread Elizabeth Mawer
jango users Subject: How to use django.contrib.postgres.forms widgets in the admin site Hi there, I just recently updated my database to postgres, looking to play with the django supported field types HStoreField and JSONField (reference: https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/f

How to use django.contrib.postgres.forms widgets in the admin site

2016-08-16 Thread Jay Sheldon
Hi there, I just recently updated my database to postgres, looking to play with the django supported field types HStoreField and JSONField (reference: https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/fields/ ) I got the install working fine, but in my admin section - the widgets

Re: Dynamically alter a list based on selections on other widgets

2015-09-10 Thread Derek
Try using Django smart selects: https://pypi.python.org/pypi/django-smart-selects/1.1.1 On Tuesday, 8 September 2015 18:45:07 UTC+2, Baktha Muralidharan wrote: > > Hello > > I am looking to develop a GUI (Form?) in which I can display a list the > contents of which change on the fly as the user

Dynamically alter a list based on selections on other widgets

2015-09-08 Thread Baktha Muralidharan
Hello I am looking to develop a GUI (Form?) in which I can display a list the contents of which change on the fly as the user makes other selections. For example, there could be a radio button (a simple yes/no button) - based on the selection, the displayed list needs to change dynamically. the

django-xadmin datetime widgets not working?

2015-04-21 Thread Christian Schulz
modify the values and set them back to NULL. But the widgets not working to select a date and time? Thanks for some advice! Christian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivin

Designing Model Widgets to Business Analytics app

2014-08-15 Thread Daniel Chimeno
es_count = models.PositiveIntegerField(''') And the User model provided by Django. So, now I can write template files with charts embedded on them. (I'm using HighCharts js) doing some ORM calls, manipulating received data in views and writing the js and html in templates. My

How to use custom widgets with dojango?

2014-04-19 Thread voger
I want to move my project from jquery to dojo toolkit and I see that there is a dojango project that integrates dojo with django. The instructions are simple enough and I already managed to run the sample project provided. Unfortunately I need to use some custom dojo widgets that I already

Creating a modular form where widgets depend on the select of another widget

2014-04-10 Thread Zebulon
choices for both widgets are not changed at runtime, but they could be extended in the future. - Ideally, I should use javascript so that the second wiget is rendered upon selection of the first, prior to submitting the request. I have started to implement this using forms, but as you can

Re: Multiwidget internal widgets ID overridden bug?

2014-03-02 Thread Russell Keith-Magee
On Sun, Mar 2, 2014 at 10:29 PM, Sai Prasanna wrote: > I saw that the render method in django.form.widgets. multiwidget class > changes the id of internal widgets .Shouldn't it set internal widget ids if > they are specified in attrs of widgets passed to the init. > Hi Sai, If

Multiwidget internal widgets ID overridden bug?

2014-03-02 Thread Sai Prasanna
I saw that the render method in django.form.widgets. multiwidget class changes the id of internal widgets .Shouldn't it set internal widget ids if they are specified in attrs of widgets passed to the init. -- You received this message because you are subscribed to the Google Groups &q

Re: change buttons or widgets

2013-07-08 Thread Kakar Arunachal Service
Thank you so much That's just what i needed! And while i was searching for this, i came across this: django-crispy ( http://django-crispy-forms.readthedocs.org/en/1.1.1/index.html). Just wanted to share! On Mon, Jul 8, 2013 at 6:48 PM, Derek wrote: > Widgets: https://docs.djangopro

Re: change buttons or widgets

2013-07-08 Thread Derek
Widgets: https://docs.djangoproject.com/en/dev/ref/forms/widgets/ For changing the way buttons look; try Twitter Bootstrap: http://twitter.github.io/bootstrap/components.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

change buttons or widgets

2013-07-07 Thread Kakar Arunachal Service
Hi, I think this is too early for me to ask bcoz m still learning the whole web thig. But i'm just very curious. So my question is, how do i change the button or widgets if i had to? I'm sorry if i named or termed it in a wrong way. Thanks! -- You received this message becau

Overriding CSS class for form widgets with generic editing views

2013-07-01 Thread Branko Majic
Hello all, I'm interested in finding-out the best practices for overriding the form widgets styling by assigning appropriate CSS classes to them. In particular, I'm trying to determine the best place (tm) to modify that information when using the generic editing views (CreateView/

Re: Does Django support general reusable UI widgets?

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 10:46 AM, Dong Wang wrote: > It seems "django.forms.widgets" is designed to support only reusable input > widgets used in forms, does Django support general reusable UI widgets like > tornado.web.UIModule ? > Yes, Django allows you to define custom

Does Django support general reusable UI widgets?

2013-02-28 Thread Dong Wang
It seems "django.forms.widgets" is designed to support only reusable input widgets used in forms, does Django support general reusable UI widgets like tornado.web.UIModule ? Thanks, Dong -- You received this message because you are subscribed to the Google Groups "Django u

"Add another [inline item]" and custom widgets with JavaScript

2013-01-24 Thread Daniele Procida
I work with a rather complex autocomplete widget for admin that works with generic foreign keys (select the content type, then you can do an autcomplete search for the item). The problem is that it breaks when you "Add another [inline item]" in the admin - the issue raised in

Re: Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
Thanks. Worked perfectly. Vikas On Friday, August 24, 2012 6:32:03 PM UTC+5:30, Melvyn Sopacua wrote: > > On 24-8-2012 14:05, Vikas Rawal wrote: > >> > >> < > https://docs.djangoproject.com/en/1.4/intro/tutorial02/#customize-the-admin-form> > > > >> > >> See the fieldsets part. > > > >

Re: Layout of widgets in admin form

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 14:05, Vikas Rawal wrote: >> >> >> >> See the fieldsets part. > > > The examples shown for fieldsets seem to divide the fields into > different groups. But in all the examples, fields still appear, wit

Re: Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
> > > > See the fieldsets part. The examples shown for fieldsets seem to divide the fields into different groups. But in all the examples, fields still appear, within each group, one after another, vertically. V

Re: Layout of widgets in admin form

2012-08-24 Thread Melvyn Sopacua
On 24-8-2012 12:15, Vikas Rawal wrote: > I am new to django. I am trying to develop an application where I need to > work with the admin interface. The usual admin interface (for example in > the poll app of django tutorial) lays out the widgets vertically. How do I > change t

Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
I am new to django. I am trying to develop an application where I need to work with the admin interface. The usual admin interface (for example in the poll app of django tutorial) lays out the widgets vertically. How do I change that? If I want to put two or three widgets side by side

Re: Hot to use widgets with generic views

2012-08-14 Thread Tomas Neme
well, for starters, you won't magically get "on keyup" behavior by adding something on your backend, you'll need to use ajax for this, and, depending on your expected number of elements, it might be better to send everything and do any filtering on the client side (if you're handling, say, up to a

Hot to use widgets with generic views

2012-08-14 Thread mjd
used in the generic view. Can I use widgets with generic views? If not do I simply implement the text input widget in html? -- 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.go

Re: How to change widgets for admin site?

2012-04-16 Thread Guillaume Chorn
Shoot! I was thinking that might be the case originally, but I must have overlooked TextField in the model field docs. Thanks!!! I'm still curious though--how can I find out what all of the CSS classes are that are defined by the default admin style sheet (I guess I'm asking where this style sh

Re: How to change widgets for admin site?

2012-04-16 Thread Daniel Roseman
On Monday, 16 April 2012 06:24:54 UTC+1, Gchorn wrote: > > Hello, I'm trying to create a blog site using Django (with "Post" as > my main model and "text" as the attribute corresponding to the main > body of text for each post). On the admin page, when someone is > filling out fields to create

Re: How to change widgets for admin site?

2012-04-16 Thread Guillaume Chorn
Hi Marc, Thanks for your reply. Are you referring to the "max_length" element of my "text" CharField? If so, I don't think this is the issue; I've set the max length to 10,000 characters which is quite long. Also this setting does not change the size of the text input area relative to my other

Re: How to change widgets for admin site?

2012-04-16 Thread Marc Patermann
Hi, Gchorn schrieb (16.04.2012 07:24 Uhr): Hello, I'm trying to create a blog site using Django (with "Post" as my main model and "text" as the attribute corresponding to the main body of text for each post). On the admin page, when someone is filling out fields to create a new blog post, I wan

How to change widgets for admin site?

2012-04-15 Thread Gchorn
Hello, I'm trying to create a blog site using Django (with "Post" as my main model and "text" as the attribute corresponding to the main body of text for each post). On the admin page, when someone is filling out fields to create a new blog post, I want the "text" entry field to be larger than the

Re: Widgets

2011-11-22 Thread Mengu
new item as text.  As they type, the possible choices are given to them. >  I'm not sure what this is called, I'd call it a > combo-box-with-auto-complete-and-auto-add. > 4) Grids with virtual scrolling > > It seems like I should not have to re-invent the wheel.  Is there a

Widgets

2011-11-22 Thread michael.grant
with virtual scrolling It seems like I should not have to re-invent the wheel. Is there a set of widgets that I can use with django to do these sort of things (and more)? I've seen the documentation on the built-in widgets but they all seem very basic. -- You received this message because

Re: custom widgets: passing data between widget/field/form/model

2011-10-21 Thread Aljoša Mohorović
any other comments/suggestions on this? Aljosa -- 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...@googlegro

Re: In a model field (and subsequently in modelforms, modelform field and widgets) what is "rel"

2011-10-19 Thread Timmy O'Mahony
Wow, thanks for the great reply. It makes sense that it's the related object manager. I have everything working now so thank you very much again! -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://

Re: In a model field (and subsequently in modelforms, modelform field and widgets) what is "rel"

2011-10-19 Thread Andre Terra
Hello, Timmy "rel" is the related manager object that will be used in specific fields, namely those that refer to relationships to other table. These relationships are handled by objects in django.db.models.fields.related[1]. For example, take User and Group from django.contrib.auth.models. Assum

In a model field (and subsequently in modelforms, modelform field and widgets) what is "rel"

2011-10-19 Thread Timmy O'Mahony
I am trying to use a 3rd party form field and custom widget in my own model form and I am having trouble understanding what the "rel" attribute is used for. for example: class SomeFormField(forms.ModelChoiceField): def __init__(self, rel, queryset, to_field_name, *args, **kwargs): ... I see it

Re: custom widgets: passing data between widget/field/form/model

2011-10-19 Thread Aljoša Mohorović
On Wed, Oct 19, 2011 at 1:21 PM, Tom Evans wrote: > I suggest you rethink your approach. Subclassing ForeignKey so that > you can build a better widget does not seem sane. Why do you think > this would help? because the simplest way to make it reusable is to have "from myapp.fields MyCustomField"

Re: custom widgets: passing data between widget/field/form/model

2011-10-19 Thread Tom Evans
ve read https://docs.djangoproject.com/en/1.3/howto/custom-model-fields/ > and similar docs, tried searching through the source code but the best > thing i've found was id or similar. > > is this some kind design decision or am i just missing something obvious? > > what i'm ac

custom widgets: passing data between widget/field/form/model

2011-10-19 Thread Aljoša Mohorović
source code but the best thing i've found was id or similar. is this some kind design decision or am i just missing something obvious? what i'm actually trying to create is a custom widget (would call it advanced compared to basic widgets available in django forms/admin) but i need model

dynamic use of django form widgets in template

2011-08-30 Thread bob the builder
Hi, I have a dictionary of field names and a their type. I want to use this in the html template to render form widgets for the correct type for each field. Am I better off rendering the html in the python view and then passing it through as content? Example: data = {'name' : 

Re: Using Form Elements Widgets direclty in HTML

2011-08-09 Thread francescortiz
th the one from Django widgets?? > > Date: Tue, 9 Aug 2011 18:34:56 +0800 > Subject: Re: Using Form Elements Widgets direclty in HTML > From: changjia...@gmail.com > To: django-users@googlegroups.com > > Since you don't want to use forms class, you can write elements in

RE: Using Form Elements Widgets direclty in HTML

2011-08-09 Thread Hayyan Rafiq
Could you please give an example.. say of a simple input box in html its done like How would i replace the default input box with the one from Django widgets?? Date: Tue, 9 Aug 2011 18:34:56 +0800 Subject: Re: Using Form Elements Widgets direclty in HTML From: changjia...@gmail.com To: django

Re: Using Form Elements Widgets direclty in HTML

2011-08-09 Thread Jian Chang
Since you don't want to use forms class, you can write elements in your templates directly. 2011/8/9 Hayyan Rafiq > Hi I wanted to know if there was a way in which we could use widget > directly in an HTML file > By widget i mean elements of a form such as input boxes,calendars,Buttons > etc wi

Using Form Elements Widgets direclty in HTML

2011-08-08 Thread Hayyan Rafiq
Hi I wanted to know if there was a way in which we could use widget directly in an HTML file By widget i mean elements of a form such as input boxes,calendars,Buttons etc without using the forms class. For example A default normal html input box is : I wanted to replace it with a fancier (more

Re: widgets js

2011-06-28 Thread Andres Pardini
Hi Can you can access to the javascript calendar code from browser?? -- 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

widgets js

2011-06-28 Thread Alex Kutsan
I am try to do litle widget class My_widjet(forms.widgets.TextInput): class Media: js = ( 'js/my_calendar/cal.js', ) def render(self, name, value, attrs=None): to_return = u""" %s """ %self.media

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

2011-06-23 Thread adrian
ProductImageForm(forms.ModelForm): class Meta: model = ProductImage widgets = { 'picture': AdminImageJCropWidget(auto_enable=True, jcrop_options=JCROP_OPTIONS) } ProductImageFormset = inlineformset_factory(Product, ProductImage, form=ProductImageForm,

Custom fields and widgets in a ModelForm

2011-04-22 Thread James
Hey all, A question about form fields and widgets: I want to use custom ones in a ModelForm, but I'm not sure where to specify this. I see the widgets dict in the ModelForm Meta class to control the custom widgets, but no equivalent for custom form fields. http://docs.djangoproject.com/e

Re: how to compose templates with widgets (that has dynamic contents in it)

2011-03-20 Thread Shawn Milochik
1. Create a Django form. 2. Add a ChoiceField to the form. 3. Populate the ChoiceField's 'choices' properly with an iterable (tuple or list) full of iterables containing the key and value you like. 4. Put the form into your template somewhere within your HTML form. Shawn P.S. I recommend doing

how to compose templates with widgets (that has dynamic contents in it)

2011-03-20 Thread django beginner
hi django experts! May I know how to create templates that has django widgets in it? please refer to my should-be template output below: Name: here is the sample model: class Name(models.Model): name_id = models.AutoField(primary_key=True

Re: How do I use widgets on Templates and (not on Forms)?

2011-03-18 Thread Daniel Roseman
On Friday, March 18, 2011 7:29:09 AM UTC, django beginner wrote: > > Hi all, > > How do I use widgets on the field of a template(not forms)? Let's say > I have a field called Member, and this field should be in select form > that has choices from members table (field: m

How do I use widgets on Templates and (not on Forms)?

2011-03-18 Thread django beginner
Hi all, How do I use widgets on the field of a template(not forms)? Let's say I have a field called Member, and this field should be in select form that has choices from members table (field: member_name)? tried using select option on html, but it ain't seem to work. any inputs? Thanks

Form Field Default Widgets

2011-02-08 Thread hank23
Is it possible to code something to cause the default widget of a field to not be displayed on a screen and code the desired html element manually instead? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: Pythonish approach to widgets

2011-02-05 Thread Mike Ramirez
On Saturday, February 05, 2011 07:02:17 am Alex Polovjan wrote: > Hi list, > > > Django.forms have a great system of widgets. But customizing them can > be a pain. Writing complex html in the python code is write-only and > error-prone approach. > > I know that js files

Pythonish approach to widgets

2011-02-05 Thread Alex Polovjan
Hi list, Django.forms have a great system of widgets. But customizing them can be a pain. Writing complex html in the python code is write-only and error-prone approach. I know that js files can be included in admin: class ModelAdmin(admin.ModelAdmin): class Media: css

Question about custom form widgets and validation

2010-12-29 Thread Brandon Taylor
Hi everyone, I'm working on a custom form widget to input length values in feet, inches and a fraction of an inch. So far, everything is working as expected, except for validation. It takes a value input as: 1' 10 1/2" and converts it into inches: 22.5, for storage in a database. My widget combi

Re: Can Admin Widgets be used in non-admin templates?

2010-11-12 Thread mathphreak
ehavior, of > the admin pages.  But I can't give my users that much control.  Is > there a way to reuse the admin widgets in non-admin pages?   I want to > give them limited filter, find, and editing capabilities for only a > few tables.  Are there any examples how to do this? > >

Can Admin Widgets be used in non-admin templates?

2010-11-11 Thread codingJoe
Hi all, Django newbie question here. I am building some pages to let my users manage lists of data. I really like the look, feel, and behavior, of the admin pages. But I can't give my users that much control. Is there a way to reuse the admin widgets in non-admin pages? I want to give

Javascript error on multiple choice widgets

2010-09-20 Thread wchildsuk
Hi, I'm trying to implement the same type of widget the admin interface has for many-to-many fields where you select the field and it moves across to the chosen list but on a non-admin page. I've tried implementing two quite different solutions this afternoon [1] but both have failed to work full

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-09-01 Thread refreegrata
"C:\Python25\lib\site-packages\django\forms\models.py" in > > > > fields_for_model > > > >   178.         formfield = formfield_callback(f, **kwargs) > > > > > Exception Type: TypeError at /newsmail/manage/ > > > > Exception Value: () got a

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-09-01 Thread Jason
forms\models.py" in > > > fields_for_model > > >   178.         formfield = formfield_callback(f, **kwargs) > > > > Exception Type: TypeError at /newsmail/manage/ > > > Exception Value: () got an unexpected keyword argument

Re: How to create custom form widgets ?

2010-08-18 Thread Nick
Here's an example: http://joshourisman.com/2008/11/19/custom-fields-and-widgets-django-forms/ Another good way to go would be to look at the django widgets in the source code and follow their example On Aug 18, 1:44 pm, ydjango wrote: > I am using a 3rd party javascript library w

How to create custom form widgets ?

2010-08-18 Thread ydjango
I am using a 3rd party javascript library with some custom components like combo box. I want to use this 3rd party combo box instead of the default combo box that django forms modelchoicefield(widget= forms.select(...),...) displays. I guess I will have to create another widget replace widget= f

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-08-13 Thread Matthew R
Python25\lib\site-packages\django\forms\models.py" in > > fields_for_model > >   178.         formfield = formfield_callback(f, **kwargs) > > > Exception Type: TypeError at /newsmail/manage/ > > Exception Value: () got an unexpected keyword argument &

Re: add attributes to a field without widgets

2010-08-11 Thread refreegrata
Opps, I forgot to mention that I work with "Django 1.2.1". Apparently is a Django bug. Other persons has the same question "http://groups.google.com/group/ django-users/browse_thread/thread/c4899b0806e67ee7/d938f33a5f100af8? show_docid=d938f33a5f100af8&fwc=1" I will try to implement the solution y

Re: add attributes to a field without widgets

2010-08-11 Thread Roald de Vries
thing like this -- class MyForm(forms.ModelForm): myField = forms.BooleanField() class Meta: model = Format fields = ['name'] widgets = {'name' : forms.TextInput(attrs={ something }),} FormsetMyForm= forms.models.modelformset_fac

add attributes to a field without widgets

2010-08-11 Thread refreegrata
m): myField = forms.BooleanField() class Meta: model = Format fields = ['name'] widgets = {'name' : forms.TextInput(attrs={ something }),} FormsetMyForm= forms.models.modelformset_fac

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-07-29 Thread Jason
78.         formfield = formfield_callback(f, **kwargs) > > Exception Type: TypeError at /newsmail/manage/ > Exception Value: () got an unexpected keyword argument > 'widget' > > On Jul 28, 12:00 pm, Daniel Roseman wrote: > > > On Jul 28, 7:08 

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-07-28 Thread Jason
28, 7:08 pm, Jason wrote: > > > > > For example: > > > class ArticleForm(ModelForm): > >     class Meta: > >         model = Article > >         widgets = { > >              'pub_date': SplitSelectDateTimeWidget(), > >              &

Re: Django 1.2 modelformset_factory fails with meta: widgets

2010-07-28 Thread Daniel Roseman
On Jul 28, 7:08 pm, Jason wrote: > For example: > > class ArticleForm(ModelForm): >     class Meta: >         model = Article >         widgets = { >              'pub_date': SplitSelectDateTimeWidget(), >              'expire_date':

Django 1.2 modelformset_factory fails with meta: widgets

2010-07-28 Thread Jason
For example: class ArticleForm(ModelForm): class Meta: model = Article widgets = { 'pub_date': SplitSelectDateTimeWidget(), 'expire_date': CalendarWidget(attrs={'class':'date- pick'}) } And in

Re: Custom widgets in Model Formsets

2010-06-27 Thread ses1984
Thanks for spotting this! I can't believe I let myself make such a basic error. On Jun 27, 5:51 am, Daniel Roseman wrote: > On Jun 27, 7:47 am, ses1984 wrote: > > > I am trying to use custom widgets in a model formset. I have tried to > > achieve this by first defining th

Re: Custom widgets in Model Formsets

2010-06-27 Thread Daniel Roseman
On Jun 27, 7:47 am, ses1984 wrote: > I am trying to use custom widgets in a model formset. I have tried to > achieve this by first defining the custom widget, then a form that > uses this widget, then passing this form as an argument to > modelformset_factory(). > > I don&#x

Custom widgets in Model Formsets

2010-06-26 Thread ses1984
I am trying to use custom widgets in a model formset. I have tried to achieve this by first defining the custom widget, then a form that uses this widget, then passing this form as an argument to modelformset_factory(). I don't think something is working right because if I check the type o

Re: Twisty Little Passages... widgets, fields, forms

2010-06-01 Thread derek
On Jun 1, 1:24 am, Michael Davis wrote: > I'm trying to implement a simple grade book application using a > modelformset where the students' names are READONLY and the grades are > the only thing the teacher can edit. I've been looking for sample code > to implement the readonly portion and one fe

Twisty Little Passages... widgets, fields, forms

2010-05-31 Thread Michael Davis
I'm trying to implement a simple grade book application using a modelformset where the students' names are READONLY and the grades are the only thing the teacher can edit. I've been looking for sample code to implement the readonly portion and one fellow (on another site) suggests I use his, but he

Call for discussion: Loading js assets of widgets without clashing with others?

2010-04-18 Thread Stefan Foulis
Hi I hope to start a discussion to find a consistent way to include javascript frameworks for custom widgets. It should prevent clashes between the javascript dependencies. We'll need to find a best practice that developers can follow to allow re-usable widgets to coexist site-by-side. I&#x

Re: Use admin widgets in inlineformset_factory

2010-03-30 Thread Paulo Almeida
This may point you in the right direction: http://stackoverflow.com/questions/559361/inline-formset-in-django-removing-certain-fields Take home message is that you can pass a ModelForm subclass to the fomset constructor, so you can have a custom form. There is no example in that link though, and

Use admin widgets in inlineformset_factory

2010-03-29 Thread Fredrik
Hi, I have this forms.py file --- # -*- coding: utf-8 -*- from django.contrib.admin.widgets import FilteredSelectMultiple from django.forms.models import inlineformset_factory from djan

Admin widgets in my page

2010-03-06 Thread Alexis Selves
Hello everyone, I am trying to use datetime picker from django.contrib.admin I am succesful, but my picker has no style. I see only numbers, but no border, background.. html(shortened) Find parking {% block stylesheet_extra %}{% endblock %}

Re: inlineformset_factory widgets

2010-02-19 Thread FadeOUT
OK, got it: Rather than specifying meta/widgets, each form field has to be specified in the ModelForm in forms.py, thus: class CompanyContactForm(ModelForm): contact_name = forms.CharField(widget=forms.TextInput(attrs={'size': '20'})) #Field name as in model #..

  1   2   3   >