What i wound up doing was to create a custom ModelField which deals with
timezone-naive datetimes/timestamps: https://gist.github.com/smcoll/8405914
Then, i created schema/data migrations in South to convert existing values.
On Saturday, January 11, 2014 11:05:54 AM UTC-6, smcoll wrote
UTC-6, smcoll wrote:
>
> i have timezone support enabled for my project, but there is one
> application which i would like to behave as timezone-naive. How can this
> be accomplished?
>
--
You received this message because you are subscribed to the Google Groups
"
i have timezone support enabled for my project, but there is one
application which i would like to behave as timezone-naive. How can this
be accomplished?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and
Take a look at https://github.com/tkaemming/django-orderable. i've used it
several times.
On Saturday, December 1, 2012 3:24:49 AM UTC-6, Andrew Brown wrote:
>
> Greetings,
>
> I'm hopeful someone can point me in the right direction to improve the
> admin UI for my app. I need to allow for
The 'timesince' filter (based on django.utils.timesince) doesn't return a
datetime.timedelta object, but a formatted string. So it would be hard to
compare the resulting string with anything. i think you're going to need
to do one of the following:
- do the comparison in your view and add
You want to include a rendered template in a JSON response? Take a look at
https://github.com/eldarion/bootstrap-ajax and this related blog post:
http://paltman.com/2012/08/23/twitter-bootstrap-and-ajax/
It's designed with the intention of supporting bootstrap markup, but i
believe it's
It's true: the Run model does not have a "lines" attribute; the
RunHasSample model does. Also, `s1` is not a Line nor a Sample, it's an
instance of the intermediary RunHasSample. So you're not going to be able
to directly add a Line instance to a Run instance- you'll have to add it to
the
i think you'd have to make a method on UserProfile that returns a dict of
some of its attributes, and iterate over the result of that method in your
template. That, or create a templatetag that adds it to the context.
On Thursday, October 18, 2012 10:52:39 PM UTC-5, David Lee wrote:
>
> how
i'm not clear about your models:
- the admin inline refers to a RunHasSample model that i don't see in
your models.py
- the Sample model has an FK to Sample, but looks like the
run_has_sample table. Should i presume that's the RunHasSample
intermediary model instead?
- i
You can add GIS support to your existing project, but as you suspected,
your current db will not be sufficient. Unless someone knows how to
convert an existing database, i believe you'll need to set up a new
database from the postgis template, and move all your data to it. That
process might
i need to interact with an existing MySQL database table, so i built a
models.py file in a new app via introspection and then cleaned it up a
bit. For the TIME types, i am using models.TimeField, which maps to a
TIME type when using the MySQL backend.
Here's a sample from that models.py file:
This is probably a dead thread, but... i think the answer given is
incorrect.
'order_with_respect_to' adds an '_order' integer field to the model.
Each set of instances that share a parent object of the relation
specified by 'order_with_respect_to' get ordered as a set. So in the
example, three
i'm having trouble getting some instances to show up as inlines in the
admin. Since i'm managing multiple sites from one domain, many of
those instances won't show up because the condition in their default
manager ("is it on this site?") fails.
i'd like my admin to use `objects` for everything,
i was having trouble enabling comment moderation in my app, so i
decided to make a test app that would follow the docs at
http://docs.djangoproject.com/en/dev/ref/contrib/comments/moderation/
as closely as possible.
Unfortunately, moderation still isn't working for me:
- If i create an Entry
i have a project running multiple sites. One of the apps in the
project has a model with a FileField and an M2M to `Site`. Since each
site has its own MEDIA_ROOT, a model instance saved from SiteA
(publishing on both SiteA and SiteB) can only display the file from
SiteA, because the file only
i'm looking for advice on how to make the admin add_view better for
the Registration model. The 'sessions' m2m and 'fee' fk should be
filtered based on the 'event' fk (both Session and RegistrationFee
have an 'event' fk as well). Of course, the filtering can't happen
until the admin user
Found help on IRC:
Since my TagField is named "tags", i have to set
``tag_descriptor_attr`` to some other name when registering it.
tagging.register(Post, tag_descriptor_attr='_tags')
On Oct 2, 12:01 pm, smcoll <[EMAIL PROTECTED]> wrote:
> Can someone tell me if i set up
Can someone tell me if i set up the model and admin correctly?
On Sep 30, 2:05 pm, smcoll <[EMAIL PROTECTED]> wrote:
> i'm trying to get a TagField working in the admin for my model using
> django-tagging 0.2. i get an IntegrityError when i save my model from
> the admin- it lo
i'm trying to get a TagField working in the admin for my model using
django-tagging 0.2. i get an IntegrityError when i save my model from
the admin- it looks like django is trying to send a python list to the
database, where string is expected. i suspect i haven't set it up
right. Can someone
i have created a UserProfile model to extend the User. i'd like to
show the 'first_name', 'last_name',
and 'email' fields from the User model in the UserProfile admin change
view, with a link to change the User record. How can this be done
using the latest newforms-admin branch?
i can't inline
20 matches
Mail list logo