Related objects save after `host`. So insertion into M2M table happens after
save method of host object has executed. In your example - after
`Ticket.save`
On Mon, Nov 17, 2008 at 14:49, Marco Minutoli <[EMAIL PROTECTED]>wrote:
>
> I have this model:
>
> class Ticket(models.Model):
>## Forei
There is ticket and patch for this issue
http://code.djangoproject.com/ticket/9522
On Sat, Nov 15, 2008 at 16:38, AndyH <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a custom model field class that stores event recurrence
> information. In python this is an instance of dateutil.rrule.rule, and
>
Hmm... Why in template tag you wrote `conversions` as view name but in error
traceback there is `my_site.conversions`?
On Thu, Nov 13, 2008 at 06:27, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
> Hi everyone,
>
> So I have a question/problem with a named URL pattern...
>
> #urls.py
> url(r'^resou
How have you noticed that view was triggered twice?
On Fri, Nov 14, 2008 at 00:17, Jeff Gentry <[EMAIL PROTECTED]>wrote:
>
>
> Actually I lied a little bit - a completely blank file doesn't trigger
> this (I can also seem to put in a and tag), but adding
> anything else will cause the view to
Hi, Ropley!
Try this:
jobs.objects.exclude(viewed_jobs=True)
On Thu, Nov 13, 2008 at 14:47, Ropley <[EMAIL PROTECTED]> wrote:
>
> Noob question, but I've been running around in circles. I'm building
> an in-house jobs board, and have 2 models:
>
> class jobs(models.Model):
> ...
>
> class view
Hi, Alex!
Look at the small merging framework [1]. It allows to track changes of
objects and merge them when they change. Here is [2] a usage example formed
as unit test:-)
[1]: http://svn.turbion.org/turbion/trunk/turbion/utils/merging.py
[2]: http://svn.turbion.org/turbion/trunk/turbion/utils/t
Do you use RequestContext [1] in your views?
[1]: http://docs.djangoproject.com/en/dev/ref/templates/api/#id1
On Tue, Nov 11, 2008 at 23:43, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am having issues acquiring the user context from templates other
> than the template I spec
Why not simple fetch `old version` of object from database and compare its
fields. For example:
def save(self, *args, **kwargs):
if self._get_pk_val():
old = self.__class__.objects.get(pk=self._get_pk_val()
for field in self.__class__._meta.fields:
old_value = field._ge
http://docs.djangoproject.com/en/dev/topics/settings/#designating-the-settings
On Mon, Nov 10, 2008 at 07:13, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> >>> from django.db.models import Q
>
> Traceback (most recent call last):
> File "", line 1, in
> File "/usr/lib/python2.5/site-packa
rrors }}
>
>{% endif %}
>
> type="submit" value="Login" />
>
>
>
Do you have `login` function in this module?
On Mon, Nov 10, 2008 at 00:17, nkulmati <[EMAIL PROTECTED]> wrote:
>
> Hi guys!
>
> Ok this really pisses me off, because I am using the code directly
> from the documentation:
>
> def my_view(request):
>username = request.POST['username']
>pa
Please show complete template code
On Sun, Nov 9, 2008 at 20:55, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
> Hi everyone,
>
> I'm leveraging auth and have a login form that uses contrib.auth.forms
> AuthenticationForm.
>
> When displaying non-field-specific errors, I get interesting results:
>
Use database backend for caching while testing. Tests create temporary
database so it will have no side effects.
On Sun, Nov 9, 2008 at 03:13, Adam Seering <[EMAIL PROTECTED]> wrote:
>
> Hi,
>I have a Django app that relies heavily on caching. I'd like
> "./manage.py test" to run on its
I think you have a typo in this line, May be you write `Image.new` with
lowercase "L" not uppercase "I" as first char.
On Sun, Nov 9, 2008 at 02:54, Tsinga <[EMAIL PROTECTED]> wrote:
>
> Hi Djangonauts,
>
> I need your help
>
> I am trying to test a view using PIL(Python Imaging Library). This i
Did you read the documentation?
http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey
On Sat, Nov 8, 2008 at 09:58, sunn <[EMAIL PROTECTED]> wrote:
>
> How do I make a foreign key to self?
>
> class Page(models.Model):
>title = models.CharField(max_length=128)
>display = mod
Try to connection handler without `sender` specified. And filter needed
models inside it.
def my_handler(sender, **kwargs):
if not isinstance(sender, CustomModel):
return
signals.pre_save.connect(my_handler)
On Fri, Nov 7, 2008 at 20:03, Vitaly Babiy <[EMAIL PROTECTED]> wrote:
> if
For example you can use `thread locals` to store there request object
On Fri, Nov 7, 2008 at 10:58, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> I have the following:
>
> ## MODELS
>
> class Category(models.Model):
>user = models.ForeignKey(User)
>name = models.CharField(max_length=200)
>
>
The is not way to get list item by variable index with standard django
template tags.
On Fri, Nov 7, 2008 at 03:52, jago <[EMAIL PROTECTED]> wrote:
>
> I have a for loop over a list A.
>
> inside the loop I want to print out the item of list B at the index
> 'forloop.counter0' of list A.
>
> It
GenericForeignKey and content type application itself look very doubtful for
me. If you have a ForeignKey to the ContentType model then you depends on
order with ContentType objects creates on syncdb. Because ContentType that
references to some model can have different primary key any time you flus
Hi, John
Try this:
Category.objects.exclude(bulletpoint__report=r)
On Fri, Nov 7, 2008 at 01:54, John M <[EMAIL PROTECTED]> wrote:
>
> i have a model at http://dpaste.com/88760/
>
> for a particular Report (r), I'd like to get all categories that
> aren't in it's bulletpoints.
>
> For example,
`example.com` is default Site added by the project setup into sites contrib
application [1]
[1]:
http://docs.djangoproject.com/en/dev/ref/contrib/sites/#ref-contrib-sites
On Fri, Nov 7, 2008 at 00:12, webcomm <[EMAIL PROTECTED]> wrote:
>
> I don't understand the documentation. I am able to get
There is no other way to do this in python/django layer. But you can try to
add your temp data in database layer and sort where.
On Thu, Nov 6, 2008 at 22:58, dexter <[EMAIL PROTECTED]> wrote:
>
> I have a queryset which I have looped thru and added a (temporary)
> data attribute to each instanc
The is no way to do "redirect to login page, if i hit back button
after logout". But what is wrong that user can see non-actual old
data? I think it has no matter.
On Nov 6, 8:27 pm, jai_python <[EMAIL PROTECTED]> wrote:
> Please help me out
--~--~-~--~~~--
Django-multilingual has its own discussion group:
http://groups.google.com/group/django-multilingual.
Try to ask there.
On Thu, Nov 6, 2008 at 18:44, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
> Hi Everyone,
>
> I'm having a hard time getting django-multilingual to work the way I
> expect.
>
>
Django uploading mechanism allow you to add date-bases values to path. See
`upload_to` section in [1]
[1]: http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield
On Thu, Nov 6, 2008 at 15:45, sadeesh Arumugam
<[EMAIL PROTECTED]>wrote:
> Hi Friends,
>
> I need a help from you. How to
Try to set meta [1] `ordering` setting
[1]: http://docs.djangoproject.com/en/dev/ref/models/options/
On Thu, Nov 6, 2008 at 14:51, MikeKJ <[EMAIL PROTECTED]> wrote:
>
> Got something like this
>
> class A(models.Model):
>x
>class Admin:
>x
>
> class B(models.Model):
>
If you have `serverid` field in database so you can add reference with
custom column name [1]. For example:
server = models.ForeignKey(Server, db-column="serverid")
[1]: http://docs.djangoproject.com/en/dev/ref/models/fields/#db-column
On Thu, Nov 6, 2008 at 15:10, gv <[EMAIL PROTECTED]> wrote:
lt;[EMAIL PROTECTED]> wrote:
>
> Hey Alex,
>
> I tried this hard coded JSON the other day:
>
> results = []
> results.append( { 'date' : '2008-11-04 00:00:00', 'dayEvents' :
> [ { 'title' : 'Event 1', 'location' :
> Profile.objects.create(name=name, foo=foo)
How do you get this `name` and `foo` variables in `save` method?
On Thu, Nov 6, 2008 at 08:20, meppum <[EMAIL PROTECTED]> wrote:
>
> I've run into a funny case and I'm not sure how to best deal with it.
> Basically, I have the following classes.
>
>
The is an existing db internalization application -
http://code.google.com/p/django-multilingual/. Try to look at it.
On Thu, Nov 6, 2008 at 11:20, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
> Hi everyone,
>
> I'm tasked with translating a mostly database-driven site into
> Spanish. I'm familiar
And what error message do you receive?
On Thu, Nov 6, 2008 at 09:46, Pawel Pilitowski
<[EMAIL PROTECTED]>wrote:
>
> Hi all,
>
> I'm in the process of trying to write an Upload Progress Bar for my app.
>
> I'm using the latest trunk version of Django, mod_python 3.3.1,
> Memcached, Apache 2.2.8 p
With simplejson module (that is part of django distribution) you can covert
to JSON any python objects. So create data structure you need and pass it to
simplejson dump/dumps functions.
On Thu, Nov 6, 2008 at 01:17, Darthmahon <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Ok I'm using the following cod
And how about to ignore `next` param in `create_account` view and explicitly
redirect user to his restricted area?
On Wed, Nov 5, 2008 at 17:12, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:
>
> Hello,
>
> I have the following situation:
>
> 1) User goes to a restricted area and is offered a cha
Make `update_stock_status` a free function not `Sale` method.
On Wed, Nov 5, 2008 at 12:43, Low Kian Seong <[EMAIL PROTECTED]> wrote:
>
> My code is here
>
> http://dpaste.com/88831/
>
> It's not working I really don't know why the other part of the
> post_save is not even being executed
>
> On W
Hi, Antonio.
Try to replace `datetime.date.today()` with `datetime.datetime.now()` calls.
On Tue, Nov 4, 2008 at 23:58, Antonio Volpon <[EMAIL PROTECTED]>wrote:
>
> Hello.
>
> I am very new to Django and I'm having some problems in overriding the
> save method for a simple class. In particular,
There is not way track M2M field change with post_save signal. You can
write your own derived M2M field class with needed hooks.
On Oct 12, 9:01 pm, Viktor <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have three simple models Project and Member, where Project.member is
> a ManyToManyField to User throu
If you what to provide some init state for form - use `initial` param
On Sep 30, 2:31 am, globophobe <[EMAIL PROTECTED]> wrote:
> I would like to instantiate a modelform with a dictionary to work with
> an existing object, e.g.
>
> a = Article.objects.get(title='Big news')
> f = ArticleForm({'tit
Hi.
`permalink` - is a decorator [1], not an 'ordinary' function. So it
can be used like this:
@permalink
def get_url(self):
return ('experiment_view', (), {'exp_id': self.id})
[1]:
http://www.djangoproject.com/documentation/model-api/#the-permalink-decorator
On Jul 22, 1:30 pm, mwebs <[
like this:
>
> {{ message.users.all }}
>
> It prints out something like:
>
> [,]
>
> So I know that it is working...
>
> On Jul 13, 12:52 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> > I`UserMessage` model has `users_read` field why do you write i
I`UserMessage` model has `users_read` field why do you write in
template `message.users`?
On Jul 13, 2:56 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I'm writing a messaging module at the moment. I'm printing out the
> list of messages fine, but when I loop through each message I want to
While you don't have an exception if using ORM so it isn't bug it is
feature.
On Jul 8, 10:07 pm, Peter <[EMAIL PROTECTED]> wrote:
> When I look at generated sql from connection.queries, it doesn't show
> any quotes around strings.
>
> For example:>>> from django.db import connection
> >>> from d
Oh, `required=True` of course
On Jul 6, 10:31 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Field for `author` created with `required=False`. And `clean` method
> doesn't call `clean_author` if `author` data isn't present.
>
> On Jul 6, 10:14 pm, "Rob Hudson&quo
Field for `author` created with `required=False`. And `clean` method
doesn't call `clean_author` if `author` data isn't present.
On Jul 6, 10:14 pm, "Rob Hudson" <[EMAIL PROTECTED]> wrote:
> Is it possible to supply a clean_[fieldname] method to a ModelForm for
> custom validation rules like you
There is[1] special parameter named `data` that represents GET query
as dictionary. Or you can pass QUERY_STRING parameter with raw GET
string
[1] http://www.djangoproject.com/documentation/testing/#making-requests
On Jul 3, 9:42 am, Thomas <[EMAIL PROTECTED]> wrote:
> Weird problem,
>
> I am do
Or may be a custom template tag for common stuff.
On Jul 2, 5:59 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Brrr... Try to use context
> processorshttp://www.djangoproject.com/documentation/templates_python/#subclass...
>
> On Jul 2, 5:43 pm, Mario <[EMAIL PROTE
der_by('-
> created')[:5]
> return render_to_response('index.html', context)
>
> Please, help me to write good code. I don't want repeat code in every
> view...
>
> On Jul 2, 3:42 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
>
Of course. But author don't write where he create context in some view
function or in module scope.
On Jul 2, 4:42 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 2, 2008 at 7:09 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> > Client-side cach
Client-side caching. Use the `never_cache` decorator
On Jul 2, 3:43 pm, Mario <[EMAIL PROTECTED]> wrote:
> Hi, all!
> I have a some little project that consists news list, several text
> blocks and else
> All worked... But after adding, for example news, it not publish on
> main page while apache
`unique_together` is a database level feature so it cannot depend on
web-server and its modules.
When you don't give any code to see where you add new entry and
retrieve.
On Jun 29, 10:32 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Since I switched my site from mod_python to mod_wsgi, the met
Try this http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
On Jun 17, 6:02 am, saxon75 <[EMAIL PROTECTED]> wrote:
> I'm working on a CMS application and had a question about
> automatically setting certain model fields.
>
> Suppose I have the following model (this is simplified from
Pass it through form custom constructor
On Jun 23, 7:12 pm, Adi <[EMAIL PROTECTED]> wrote:
> How do you pass model objects that you may need access to when
> implementing the clean() or clean_ methods?
>
> In other words, how can a form access model objects that it may need
> access to perform it
try `class_prepared` or `post_syncdb` signals
On Jun 21, 3:43 pm, mwebs <[EMAIL PROTECTED]> wrote:
> I want to register a specific model(not an object of the model, the
> model itself) in another model.
> This should be done the first time the model is deployed with syncdb.
>
> So what I need is
What is this `pid = models.ForiegnKey()` ?
On 9 июн, 23:44, Huuuze <[EMAIL PROTECTED]> wrote:
> I have the following models in my models.py file:
>
> >> class Person(models.Model):
> >> pid = models.AutoField(primary_key=True)
> >> fname = models.CharField(max_length=50)
> >> lname = models
Check if your cookies are enabled.
On 9 июн, 22:47, bcrem <[EMAIL PROTECTED]> wrote:
> Sorry, get_user(request) was a blind alley; I'm actually using 'user =
> request.user' right now, and my first attempt was 'if
> request.user.is_authenticated():' as you suggest. Behavior's the
> same.
>
> On
That fields accepts `model class` as first argument which is more
important then `verbose_name` in this case.
On Jun 9, 8:10 pm, pihentagy <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> In the docs
> here:http://www.djangoproject.com/documentation/model-api/#verbose-field-n...
>
> Each field type, exc
http://www.djangoproject.com/documentation/db-api/#month
On Jun 8, 10:32 pm, Jason K <[EMAIL PROTECTED]> wrote:
> So I'm building the archive pages for a blog. In the sidebar I have a
> list of months that contain posts, linking to the archive month page.
> I've made an inclusion tag for this whi
t_var_viewname)) i
> work in this
>
> thnaks
>
> On Jun 8, 10:54 am, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > No. Built-in {% url %} tag doesn't support variable as view name. To
> > solve this you can write your own url-like template tag with needed
No. Built-in {% url %} tag doesn't support variable as view name. To
solve this you can write your own url-like template tag with needed
functionality. Or refactor you code to avoid using the view name as
variable:)
On Jun 8, 12:39 pm, ferran <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> The tag {% ur
When in your first example you call `[0]` it replaced earlier
`[22:44]` slicing.
In second example before `[0]` slice query set is converted into list
(for `repr` call and output) and then you apply `[0]` to result list.
On Jun 7, 7:54 pm, birkin <[EMAIL PROTECTED]> wrote:
> I just posted some c
Hmm..
def __unicode__( self ):
return "%s" % self.team1 # if Teams model has its own __unicode__
method
On Jun 7, 5:34 pm, nikosk <[EMAIL PROTECTED]> wrote:
> Hi all
>
> Does anyone know how to do something like this :
>
> class Game(models.Model):
> team1 = models.ForeignKey(Teams, relat
You can set `urlconf`(plain string - path to the needed urlconf)
attribute to request object that is passed into `process_request`.
Then django will use it not default.
On Jun 6, 8:42 pm, Siah <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to select different urlpatterns in my middleware's
> process
If you have `django.core.context_processors.request` context processor
enabled and you use RequestContext so the `{{request.path}}` will
return current path. Or you can simple pass `request.path` variable to
the template context manually.
On May 16, 8:58 pm, "M.Ganesh" <[EMAIL PROTECTED]> wrote:
No, in python each module evaluates one time - at import process.
On Feb 29, 12:18 am, itodd <[EMAIL PROTECTED]> wrote:
> Ok,
>
> I've figured out models.py was being evaluated multiple times. Where
> should I put my dispatcher code to ensure this doesn't happen?
>
> Thanks,
>
> Todd
>
> On Feb 2
What is `is_ajax` method?
On Apr 19, 4:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I have made up a view to check a request is ajax or not, but the
> function is_ajax() always return false. I used prototype to fire the
> ajax request and I confirmed it with Firebug. The request header
I usually make link to User model not profile. And have no problems
with usage.
On Apr 18, 2:02 pm, andy baxter <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I have built a data model for a virtual library, which contains the
> following classes (among others):
>
> User - the built in user class from d
http://www.djangoproject.com/documentation/templates/#include
On Apr 18, 1:29 pm, Salim Fadhley <[EMAIL PROTECTED]> wrote:
> I'm trying to write a view & template collection that will render
> arbitrary objects in a database. I cannot change these objects and
> make them more view-friendly, so I
Or `Topic.objects.none()`
On Apr 15, 8:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Sure, just give the modelchoicefield Topic.objects.all() to start
> with, as this will never actually get used.
>
> On Apr 14, 11:14 pm, shabda <[EMAIL PROTECTED]> wrote:
>
> > I have a form where I wan
Not render, just load.
I think `django.template.loader.find_template_source` can help
On Apr 14, 4:17 pm, Darryl Ross <[EMAIL PROTECTED]> wrote:
> nandu wrote:
> > Dear Folks,
>
> > I wish to read an entire template into a string or at least use a
> > method in django.template that will output t
Look at the docs:
http://www.djangoproject.com/documentation/templates_python/#parsing-until-another-block-tag
On Apr 13, 8:22 pm, "Claudio Escudero" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> What is block-like tag?
> =/
>
> Thanks,
> Claudio
>
> On Sat, Apr 12, 2008 at 10:26 PM, Malcolm Tredinnick <
Do you use proper django branch with model inheritance support? Trunk
doesn't
On Apr 13, 5:37 pm, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to have a model inherit from another which has a custom
> field:
>
> import uuid
> from django.db import models
> from django.db.models.fields i
Try to use this very good application http://code.google.com/p/django-mptt/.
On Apr 10, 11:15 pm, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote:
> Hi to all.
>
> I have a model that can be described briefly as follows:
>
> class Task(models.Model):
> title = models.CharField(max_length = 250)
>
Manager instance is accessed by model class not instance. So there is
no way to get model instance inside manager method (of course except
situations when you pass it directly). If you need some extra
functionality for instances the best way is to create model methods.
Manager operates with the se
http://www.djangoproject.com/documentation/static_files/
troeten wrote:
> Hi,
> i have a problem with the MEDIA_URL in django.
> My settings.py section looks like this:
>
> # Absolute path to the directory that holds media.
> # Example: "/home/media/media.lawrence.com/"
> MEDIA_ROOT = '/Users/ste
__unicode__ method must return string, so
def __unicode__(self):
return unicode( self.ID )
On Feb 15, 4:23 am, SeanFromIT <[EMAIL PROTECTED]> wrote:
> Any ideas what would cause this?
>
> TypeError at /admin/app/report/
> coercing to Unicode: need string or buffer, long found
>
> The debug
(r'^sitemap.xml$',
and
http://patrickbeeson.com/sitemaps.xml.
are different urls
On Feb 14, 10:56 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I'm using Django to publish my Web site and blog, and would like to
> use the sitemaps app that comes with Django. But I can't get the urls
> or
I use something like this:
(r'^robots.txt$', 'django.views.static.serve', { 'path' : "/
txt/robots.txt",
'document_root': settings.MEDIA_ROOT,
'show_indexes': False } ),
On Feb 14, 10:53 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I built a Django site for my blog and want
Look at idea behind this:
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
On Feb 14, 6:40 pm, Amit Ramon <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm developing a site that need to display ads. The ad to display on a page
> is selected by a function based on the value of a global
Hi
Built-in `authenticate` function takes `**credentials` parameters that
when pass to backend. So if you need request object in backed you have
to pass it to built-in function. Examle:
from django.contrib import auth
def my_view( request ):
#...
auth.authenticare( username = username,
Hi, graham
Imagine that your urls2.py has some number of patterns. And then you
call `reverse('eat')` what of them have to be returned? So to get
proper result you have to write something like this
`reverse('views.func')`
On 14 фев, 02:22, grahamu <[EMAIL PROTECTED]> wrote:
> Lots of people corr
y set as a datefield, but for some reason it seems as
> though my join is converting it into a string and Django doesn't like
> that.
>
> By the way, I am using Django 0.96 and MySQL.
>
> On Feb 13, 10:38 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > If birt
If birthday UserProfile field in DataField you must set date object to
it. Not string.
On 14 фев, 00:50, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hmm I seem to have hit another problem just after another!
>
> I've got a form that lets user's select the birthday via three
> dropdowns (day, month an
You can create a ImageFIeld subclass with needed functionality of
image processing. And use it with some models.
On 10 фев, 14:20, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> i have an ImageField in my model (editable only by staff memebrs), i
> would like to generate a thumbnail everytime a
See schema migration tools for django:
http://code.djangoproject.com/wiki/SchemaEvolution
On 7 фев, 20:40, bobhaugen <[EMAIL PROTECTED]> wrote:
> I am trying to evolve a Django project in piecemeal-growth fashion.
>
> I was happy to learn that I cd easily add tables to an existing model
> using s
No, just now django doesn't support row level permissions.
Look at this branch http://code.djangoproject.com/wiki/RowLevelPermissions
On 1 фев, 02:06, Chris <[EMAIL PROTECTED]> wrote:
> I've been reading up on user permissions and I have found that user
> permissions are on a per-model basis. My
def save( self ):
if self._get_pk_val():
old = MyModel.objects.get( pk = self._get_pk_val() )
if self.field != old.field:
print "Values do not match"
super( MyModel, self ).save()
On 31 янв, 10:54, Julien <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I'd like to ove
Look at thread local storage. Here is an example this user instance
save:
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
On 31 янв, 00:28, Paul <[EMAIL PROTECTED]> wrote:
> I need to access the context from within a filter. The filter needs
> to change its behavior based on the t
for tag in tag_list:
for model in [ 'weblog', 'article', 'project' ]:
print getattr( tag, model ).count()
On 30 янв, 09:22, Chris <[EMAIL PROTECTED]> wrote:
> Hello I have a Tagging app that I have created which could have a m2m
> relation with several other applications suchas a webl
Try this code:
from django.core.management.commands.loaddata import Command
def my_view( request, fixture_label1, fixture_label2 )
Command().handle( fixture_label1, fixture_label2 )
#...
On 20 янв, 20:04, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> To support testing (using Seleniu
Read the docs
http://www.djangoproject.com/documentation/newforms/#binding-uploaded-files-to-a-form
On 19 янв, 15:32, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hey,
>
> Does anyone have a working example of uploading images using Django?
> I've looked extensively and haven't found anything - any id
What path is saved into field?
On 19 янв, 23:38, tom <[EMAIL PROTECTED]> wrote:
> I'm doing local development on XP, and with the exeception of this, it
> has worked really well. In my settings.py, I have
>
> MEDIA_ROOT = 'C:/worker/cms/media/'
> MEDIA_URL = 'http://localhost:8000/docs/'
> ADMIN_
In your template people_list is list of UserProfile instances so
avatar is accessed by {{people.avatar}}
If you try to iterate through friends that you can access to avatar
like so:
{{friend.get_profile.avatar}}
Of course if you set proper AUTH_PROFILE_MODULE setting.
On 19 янв, 22:24, Darthmahon
If you try to iterate through `friends` then you can access to avatar
like so:
{{friend.get_profile.avatar}}
Of course if you set proper AUTH_PROFILE_MODULE setting.
On 19 янв, 22:24, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the built in authentication of Django, so new users who
http://effbot.org/zone/django-memcached-view.htm
On 18 янв, 19:51, bfrederi <[EMAIL PROTECTED]> wrote:
> I am using memcached as my backend for cache, but I am not sure how to
> check the statistics on memcached, to see what it is actually doing. I
> can tell it is working, but I want to see some
http://code.google.com/p/django-multilingual/
Helps you to have translations for database entries
On 15 янв, 20:42, Grupo Django <[EMAIL PROTECTED]> wrote:
> I have a Menu app that takes data from the database and renders it
> into a template. I was wondering if I can translate the output from
>
can't seem to find the proper accessor to grab
> the tag_catagory value from the expression.
>
> Any other suggestions as to why it is not working?
>
> On Jan 14, 12:30 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > You must specify details in pattern
>
The best solution is to separate admin media files and site specific
files. For example:
/media/admin/ - for admin static files
/media/ - for others
On 14 янв, 20:14, "Prof. William Battersea"
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> Does any one have any suggestions for setting up apache so that:
You must specify details in pattern definitian
http://www.djangoproject.com/documentation/generic_views/
On 14 янв, 20:08, Chris <[EMAIL PROTECTED]> wrote:
> Hello I am working with a generic view and I am trying to grab the url
> expression variable and pass it to a dictionary for the generic vi
django-multilingual is more clean and have very good design. I have
used it in some commercial projects.
transdb is ugly in it design and concept.
On 12 янв, 17:04, Grupo Django <[EMAIL PROTECTED]> wrote:
> IMHO Internationalization is useless if there is no support for
> multilingual translatio
{% for cat in client.categories.all %}
{{cat.name}}
{% endfor %}
On 14 янв, 16:41, shocks <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm trying to get a ManyToManyField working in my model. It all works
> fine apart from the functionality in my view template. I'm using it
> to export some XML and h
admin/
> Exception Type: ViewDoesNotExist
> Exception Value:Tried home1 in module prog_innov.views. Error was:
> 'module' object has no attribute 'home1'
> I dont' undestand this expression
>
> On Jan 14, 3:47 pm, Alex Koshelev <[EMAIL PROTECTED
101 - 200 of 320 matches
Mail list logo