e to 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
> app
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 of t
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
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 received
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-framework-2-docs/a
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 stop receiving emails from it, send an email
to django-user
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
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
/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
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
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
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
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
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
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:
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
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
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
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'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
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'
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
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.
24 matches
Mail list logo