One of the stated goals of the newforms-admin branch (
http://code.djangoproject.com/wiki/NewformsAdminBranch ) is to allow
developers to specify custom widgets for particular fields in a model.
I have not been able to find documentation regarding this new feature.
Has it been implemented yet?
Th
By the way, I did find the hook in django/branches/newforms-admin/
django/contrib/admin/options.py for specifying the form field for a
given database field. But that's different than allowing a developer
to specify the widget for a given field in the model itself.
--~--~-~--~~--
Hi there. I'm new to Django and Python, so I appreciate any help you
guys can provide.
I am working on an app that allows a user to create extended profiles
with text and photos. In addition, each profile is associated with a
single ZIP code via a ForeignKey.
As it stands now, the admin add-prof
Very good point, Tim. I'll consider that issue as I move forward with
my application.
My main problem, though, is figuring out how to create a text input
lookup field for the ZIP code foreign key. Do I need to code a new
widget? A new form field class? A function to hook into newforms'
validation
> Django's existing admin uses oldforms. The newforms-admin branch is
> working to rewrite admin to be more flexible and use newforms. If you
> need it on trunk now, you'll need to use oldforms.
Thanks for the input, Jeremy. I've actually decided to use newforms-
admin since I won't be going to
Great advice -- thanks! I'll work on it today and let you know how it
comes together.
--~--~-~--~~~---~--~~
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@googlegro
Does anyone have information on this topic? I have a feeling I'm not
the only one who's wondering this. Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
/activate appenv
(appenv)$python manage.py load_data data_file.csv
I would like to deploy this script to my client. I don't want to send the
entire code of web application. How do I do it?
Thank you in advance for your help.
Best,
Leif
--
You received this message because you are subscribed t
Hi Dylan,
Thank you for the great input. Hopefully django REST interface will be able
to handle the post for large amount of data (~500k rows) without problem.
Best,
Leif
On Saturday, February 10, 2018 at 10:14:29 AM UTC-5, Leif wrote:
>
> Dear Django,
>
> Sorry if this quest
Thank you, Jani,
I will try.
Best,
Leif
On Saturday, February 10, 2018 at 10:14:29 AM UTC-5, Leif wrote:
>
> Dear Django,
>
> Sorry if this question has been answered. I have a Django based web
> application and I just developed a loading script to upload data to
> database
ude XyzSerializer(serializers.ModelSerializer) so
all three objects will be included in json output.
Thank you very much in advance,
Leif
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and
;?
How to do reverse relation in this case?
Best,
Leif
On Wednesday, March 14, 2018 at 11:14:49 AM UTC-4, Leif wrote:
>
> Dear Django,
>
> I have a question about django rest framework relations. I am looking at
> the example in
> http://www.tomchristie.com/rest-framewor
Dear Django Experts:
Somehow I deleted the files under migrations directory. Now I am no longer
able to migrate new changes. I got 'No change detected' message when I
apply python manage.py migrate. Anway I can restore files under migrations
directory?
Best,
Leif
--
You rec
there is a suggestion here but not clear:
https://stackoverflow.com/questions/34919650/deleted-migration-files-how-to-makemigrations-without-losing-data
On Wednesday, June 6, 2018 at 8:54:48 AM UTC-4, Leif wrote:
>
> Dear Django Experts:
>
> Somehow I deleted the files under migratio
Hi Kirby,
Thank you very much. That is very helpful. It is working now. Now the
migrations directory is tracked in code repository to prevent from
happening again.
Best,
Leif
On Wednesday, June 6, 2018 at 10:23:01 AM UTC-4, C. Kirby wrote:
>
> If you don't need the history
replace the deleted migrations.
>
> *Connected by Motorola*
>
>
> Leif > wrote:
>
> Dear Django Experts:
>
> Somehow I deleted the files under migrations directory. Now I am no longer
> able to migrate new changes. I got 'No change detected' message when I
OK, I've been tinkering with this all day, and I'm still having one
big problem
As Jeremy suggested, I created custom ZipCodeField and MyAdmin
classes. In addition, I created a custom ZipcodeLookupInput widget.
I've tested this in the shell and on the test server, and the clean
and render functi
OK, I've been tinkering with this all day, and I'm still having one
big problem
As Jeremy suggested, I created custom ZipCodeField and MyAdmin
classes. In addition, I created a custom ZipcodeLookupInput widget.
I've tested this in the shell and on the test server, and the clean
and render functio
Yes, the ModelAdmin is registered with django.contrib.admin.site. And
the change and add pages for the model are displaying correctly. It
even provides the expected error message if I enter an invalid Zip
code.
But when I enter a correct Zip code and Save, it gives me an Integrity
Error:
---
Yes, the ModelAdmin is registered with django.contrib.admin.site. And
the change and add pages for the model are displaying correctly. It
even provides the expected error message if I enter an invalid Zip
code.
But when I enter a correct Zip code and Save, it gives me an
Integrity
Error:
Here's a bit of the testing I have run in the shell...
>>> from mysite2.profile.models import Profile
>>> from django import newformms
>>> from mysite2.admin import ProfileOptions
>>>
>>> # instantiate a Profile object
>>> test_profile = Profile.objects.get(id=1)
>>>
>>> # instantiate the admino
Here's a bit of the testing I have run in the shell...
>>> from mysite2.profile.models import Profile
>>> from django import newforms
>>> from mysite2.admin import ProfileOptions
>>> # instantiate a Profile object
>>> test_profile = Profile.objects.get(id=1)
>>> # instantiate the adminoptions cla
I figured it out!
The problem was that my custom zip code field's clean() function was
returning the profile object's *id*, not the actual zip code
instance.
> zip_code_id = Postal_Code.objects.get(postal_code=value).id
> return int(zip_code_id)
As it turns out, the function should have retur
Looks great. Good work!
For those of us still stuck in alpha, can you share a bit about your
implementation? Are you using Apache? Squid? What's your approach to
caching? Did you use Django's built-in User model for your registered
site users? What DB did you opt for?
Any information would be a
After some digging around, it looks like the newforms-admin branch
does not allow widget declarations within the model class itself.
However, adding a custom widget is quite easy.
In the branch, almost all of the admin app functionality has been
moved out of the inner Admin class and into a separ
25 matches
Mail list logo