On Dec 13, 9:30 pm, DavidA wrote:
> I have two models, Trade and Fill. A Trade can have many fills. Fill
> has a FK to Trade:
>
> class Trade(models.Model):
> trade_date = models.DateField(auto_now_add=True, editable=False)
> side = models.CharField(max_length=12, choices=SIDE_CHOICES)
>
On Dec 13, 10:12 pm, DavidA wrote:
> The problem is that trade is required so is_valid will fail.
>
So exclude it from the form:
class AddFillForm(forms.ModelForm):
class Meta:
exclude = ('trade',)
--
DR.
--~--~-~--~~~---~--~~
You received this messa
On Dec 13, 9:08 pm, volk23 wrote:
> i've made a modification in a App i created. run syncdb, it dont show
> changes made. what could be wrong? thanks in advance
>
What's wrong is that you didn't read the documentation:
http://docs.djangoproject.com/en/dev/ref/django-admin/#syncdb - see
the big b
On Dec 14, 5:19 am, Marc DM wrote:
> If you want to edit them together in the admin then do this for your
> admin class
>
> #
> class BookInline(admin.TabularInline)
> model = Book
> extra = 2
>
> class AuthorOptions(admin.ModelAdmin)
> inlines = [B
On Dec 16, 6:53 am, JF Simon wrote:
> Hello, i'm new with python (and french so my english may seem very
> poor, sorry about that).
> I would like to list a model's fields and return a dict, here is the
> example :
>
> I have a model class with :
>
> meta_title : CharField(...)
> meta_description
On Dec 16, 6:48 pm, "3lancer.eu" wrote:
> Hi,
>
> As I read
> onhttp://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-me...,
> the files defined in Media classes' js and css attributes will only be
> added to html on the add/change page. So as far as I understand, it's
> only possib
On Dec 17, 12:49 pm, marty3d wrote:
> Hi!
>
> I've been stuck with this for some days now, and can't find any
> answers whatsoever. Please bare with me since I'm a newbie with Python/
> Django.
>
> I have this form that's created and populated using
> 'modelformset_factory'. What it's supposed to
On Dec 18, 9:41 am, Chris wrote:
> Hello all,
> I am trying to popular a multi-select form field by passing in a user
> object suchas request.user so that I can filter a table based on that
> object. Below is what I came up with but it is still not working.
> I get the following error: 'ChoiceFor
On Dec 18, 6:16 am, sagi s wrote:
> I'd like to use the test client to verify that when there's an error
> in a form field, the input field in the
> response is populated with the original input.
>
> So I'd like to do something like:
>
> iteration = 'bad data'
> response = self.client.post('/metr
On Dec 18, 9:30 am, "Arnoud Tijssen" wrote:
> I`m a python newbie so bear with me
>
> I use the django framework and get the following error:
>
> DoesNotExist at /
> UserProfile matching query does not exist.
>
> Since python is fairly new to me I don`t know where to start.
> Any help would
On Dec 18, 7:18 pm, Cortland Klein wrote:
> I'm using inlineformset_factory in one of my views, which is working
> great, except now I'd like to change the widget for one of the fields
> (in case anyone's curious, an AdminFileWidget). For clarification this
> is my own view and has nothing
On Dec 19, 2:32 pm, "Martin Lundberg"
wrote:
> Hello everyone!
>
> What do I need to do to be able to put my tests in a folder (called "tests")
> inside my application folders and make django run them?
>
> I want something like:
>
> /project/app1/tests/module_tests.py
> /project/app1/tests/module
On Dec 19, 8:11 pm, nbv4 wrote:
> I have a model with a field called date_format. That field is an
> integer value from 1 to 9 corresponding to "D m-j-y", "m-d-Y", etc. I
> have the model defined with a 'choices' set so the database can store
> the number, and a dropdown is created with the choic
On Dec 19, 8:28 pm, nbv4 wrote:
> On Dec 19, 3:15 pm, DragonSlayre wrote:
>
> > profile_form.user = user;
> > profile_form.save()
>
> The problem is that you can't assign fields in forms directly like
> this. The only way to input data into a form is when you initially
> create the form object a
On Dec 19, 7:45 pm, "James Bennett" wrote:
> On Fri, Dec 19, 2008 at 12:41 PM, lekvar...@gmail.com
>
> wrote:
> > Hi, I wanna know wich of the well known frameworks is the best choice
> > for myspace-clone community website.
>
> Since you're basically going to be throwing money away no matter wh
On Dec 20, 3:58 am, Shuge Lee wrote:
> how to do following querying in Django 1.0 ?
>
> mysql> select product.name, os.name from product inner join os where
> product.id = os.id ;
> +-+-+
> | name| name|
> +-+-+
> | MS Word | All |
> |
On Dec 21, 7:40 pm, Kaaia wrote:
> Hi,
>
> I am very new in django (and python) so my question may be quite
> dummy, so be patient please. I am playing with example based on
> django's tutorial.
>
> I have following class:
>
> class Pilot(models.Model):
> ...
> cn = models.CharField('So
On Dec 21, 7:02 am, schwim wrote:
> OK, I'm a total newbie. I ran through the tutorial on the django site,
> and decided to extend the poll system a bit just to learn more. I
> figured quite a bit out, but on this one I'm stuck.
>
> I want to provide a page at polls/new to add a new poll. I'm t
On Dec 22, 5:20 am, eldonp2 wrote:
> Please help me understand the execution logic of a view. I have copied
> the example from the official Django documentation:
>
> def contact(request):
> if request.method == 'POST': # If the form has been submitted...
> form = ContactForm(request.P
On Dec 22, 4:49 am, "Greg Schwimer" wrote:
> On Sun, Dec 21, 2008 at 1:47 PM, Daniel Roseman <
>
> roseman.dan...@googlemail.com> wrote:
>
> > You won't see errors because you haven't included them in your
> > template. Either render the whole
On Dec 22, 4:43 pm, nbv4 wrote:
> I have a model which is defines kind of like this:
>
> MyModel(models.Model)
> field1 = models.BooleanField()
> field2 = models.BooleanField()
> field_num = "1"
>
> And then I have a form thats pretty much this:
>
> MyModelForm(models.ModelForm)
>
On Dec 22, 12:30 pm, Aldo wrote:
> Hi folks,
>
> Simple enough problem but cant find the functionality - if it exists.
>
> this_week = datetime.date.today() - timedelta(7)
> Cars.objects.filter(created_date>this_week)
>
> I basically want to find all cars that were created in the last 7
> days. I
On Dec 22, 9:14 pm, Ana wrote:
> Hello,
>
> I migrated my MySQL tables to Postgres. Generally, the migration was
> fine with one exception. I have a table researchproj that included
> two foreign keys (institution_id and contact_id). I received the
> following error:
>
> Caught an exception wh
On Dec 23, 8:11 pm, "dick...@gmail.com" wrote:
> i'm working on a simple concept i'm sure others have solved, but i
> can't get it.
>
> basically, given some input, i parse it, find which objects to
> create, and do it.
>
> so with a model:
>
> class Foo(models.Model):
> name = models.Char
On Dec 28, 5:35 am, tsop wrote:
> Hey,
> I'm quite new to django but I ran into a small problem maybe someone
> can shed some light onto:
>
> models.py
>
> class Comic(models.Model):
> title = models.CharField(max_length=80, help_text='Title of
> comic.')
> series = models.Foreign
On Dec 27, 6:20 am, Vicky wrote:
> Is there a way to access the previous value of a for loop in
> templates. Can anyone tell the template representation for the python
> code like:
>
> for i,j in enumerate(item):
> ...
I think the various forloop
On Dec 29, 10:58 am, Bobby Roberts wrote:
> On Dec 29, 10:48 am, Briel wrote:
>
> > A solution, not sure if it's the best, would be to make a function in
> > basicly any file, that generates a quote. Then you can import the
> > function to every view you want and call it to get the random quote.
On Dec 29, 9:02 pm, garagefan wrote:
> below is the code... the first def doesn't return anything... (def
> get_gal_teaser(self))
> i'm using a custom tag to return the Gallery class to the base
> template file, which works... so calling the method get_gal_teaser
> works as well... and returns a
On Dec 29, 11:04 pm, garagefan wrote:
> awesome... it was all in that [:1]!
>
> now, next issue...
>
> "OperationalError at /admin/galleries/gallery/
> (1054, "Unknown column 'galleries_gallery.status' in 'field list'")"
>
> i just added the status field as i wasn't worried about any of that
> pr
On Dec 30, 8:22 pm, ldm999 wrote:
> Eg:
> Lists (books, movies, restaurants) and multiple items per list.
>
> Web forms would allow user to:
> - Add/change/delete lists
> - Add/change/delete list items
>
> TIA
Have you actually read the tutorial on the Django site? The Poll
application covers ex
On Dec 30, 7:15 am, janedenone wrote:
> Hi,
>
> this must be really simple, but all the references to ordering fields
> did not explain how to do this: How can I change the order of entries
> in foreign key lists in the admin change view?
>
> Kind regards,
> Jan
Django will just use the default
On Dec 31, 11:13 am, phoebebright wrote:
> I have a model that has a car and a car has a foreign key to carmodel
> via the field model (too many models!)
>
> This is the line for the form which appears to run:
>
> carmodel=forms.ModelChoiceField(queryset=Car.objects.all().values
> ('model','mode
On Dec 30, 11:40 pm, schwim wrote:
> I'm trying to build a model that will store the counts of each of 10
> possible choices, e.g.:
>
> v1 = models.IntegerField(default=0)
> v2 = models.IntegerField(default=0)
> v3 = models.IntegerField(default=0)
> ...
> v10 = models.IntegerF
On Dec 31, 12:18 am, Chuck22 wrote:
> class ContactForm(forms.Form):
> email = forms.EmailField(required=True,
> widget=forms.TextInput(attrs=
> {'size':'30'}),
> error_messages={'required':'Please fill
> out your Email'})
>
On Dec 31, 12:31 pm, "dick...@gmail.com" wrote:
> was looking for some info on how ROOT_URLCONF setting is supposed to
> be used? i am trying something very simple. i have a single django
> project. there are two apps.
>
> i want to run one app, call it foo, with a specific settings file,
> and
On Dec 31 2008, 11:58 pm, gkelly wrote:
> I am having the following error sent to my email from a live site. I
> haven't been able to reproduce the error myself, but was hoping
> someone could point me in the right direction as to how to solve this.
>
> First of all, is it something in my code, o
On Jan 4, 10:18 am, Niall Mccormack
wrote:
> Hi there,
>
> I'm trying to override the edit_inline_stacked template so I can
> dynamically add in extra inline data via javascript - similar
> tohttp://www.arnebrodowski.de/blog/507-Add-and-remove-Django-Admin-Inli...
>
> I can override the change
On Jan 4, 2:35 pm, Berco Beute wrote:
> I'm still searching for a solution for this problem.
> Which other forums should I try?
>
> Thanks,
> 2B
>
This is the right forum, but apparently no-one knows the answer to
your question.
Personally, I can't see how that redirect could be causing a sessio
On Jan 4, 9:33 pm, Mark Jones wrote:
> You need a process running outside the bounds of the webserver that
> reads the database every so often, and then sleeps with a wakeup every
> so often, and a list of when things "expire". It updates the
> database, the webpage reflects the update.
>
> You
On Jan 4, 8:30 pm, Patrick wrote:
> Ok, I will rephrase that with a concrete example:
> I have those to models:
>
> class Modelo(models.Model):
> nome = models.CharField(max_length=10)
> manageable = models.BooleanField()
>
> class Equipamento(models.Model):
> modelo = models.ForeignK
On Jan 4, 9:29 pm, Mark Jones wrote:
> For the discussion below, ALL the code is in .../intomec/tenq
>
> I wrote some code in tests.py like so:
>
> from tenq.models import *
> self.expectedValue = Answers((1,2,3,4))
>
> within the to_python() method of AnswersField in models.py:
>
On Jan 4, 11:24 pm, Malcolm Tredinnick
wrote:
> On Sun, 2009-01-04 at 20:14 -0800, Daniel Roseman wrote:
>
> [...]
>
> > I don't know why you say filtering Equipamento based on the value in
> > Model 'seems to be not possible'. On the contrary, it is pe
On Jan 5, 5:39 pm, "django_fo...@codechimp.net"
wrote:
> I have a pretty simple template that needs to print some data in a
> bunch of table rows. I have done something like this:
>
>
> {% if my_art_list %}
> {% count = 0 %}
> {% for art in my_art_list %}
> {% if
On Jan 6, 12:20 pm, Max wrote:
> Hello,
>
> Using the tutorial for detail.view, I changed the radio button to a
> drop down. I kept the view the same as the tutorial.
> Seehttp://dpaste.com/106018/
>
> When I select the choice on the drop down, I receive the error saying
> I didn't make a choi
On Jan 6, 2:59 pm, rabbi wrote:
> Hi everyone,
> I've gone through the Django tutorial and it worked fine when using
> the default development server that is provided with Django (python
> manage.py runserver)
>
> I want to deploy my little test site though, so I've been trying to
> get it runnin
On Jan 7, 7:47 am, jeffhg58 wrote:
> I have a 2 forms. One to add a new author and then another form for
> Articles which has a drop down list to reference the authors. The
> behavior I am seeing is that when I add a new author and then go to
> the New Article form which references the author it
On Jan 7, 10:35 am, EagerToUnderstand wrote:
> I am referencing a self defined model method in list_display option of
> ModelAdmin. I would like to do the same in the fiedsets option of
> ModelAdmin, but I get an error saying my method is missing from the
> form when the page is rendered. It se
On Jan 12, 6:35 pm, jazztpt wrote:
> I'm building my first django app and having a few problems in my dev
> environment. I have a couple of images that I want to use in my
> base.html template. I have tried various configurations, but none of
> my images show up. I've tried putting the images
On Jan 12, 5:38 pm, Matias Surdi wrote:
> Hi,
>
> I've two models related by a ForeignKey field.
>
> I'd like to have the possibility of adding child objects (side "One" of
> the relation) from the admin interface of the parent ("Many" side of the
> relation).
>
> Example:
>
> class Child(models.
On Jan 12, 8:59 pm, jazztpt wrote:
> Nope, that's not the problem. I had read that page, and another that
> suggested a slightly different syntax for the urlpatterns
> (fromhttp://rob.cogit8.org/blog). Sorry that I forgot to mention that I
> had already put Rob's version in my code -- I wasn't
On Jan 13, 8:26 am, Matias Surdi wrote:
> hmm... Not really... from your point of view, think about this: I want
> to edit the children from the parent admin view, and *not* assign
> parents to children from children's admin view
>
> Do you see? the relation is the same, but from the other s
On Jan 13, 2:53 am, Adam Tucker wrote:
> I am working on a site where a page is loaded which replaces part of itself
> with another view using a simple ajax replacement (the load funciton in
> jQuery.) The view that is called iterates a loop anywhere from 3 to 10 times
> before getting to a rende
On Jan 13, 9:40 pm, Manfred wrote:
> Hello,
>
> I wrote a special kind of blog- or news application. One of the
> specialities of this application is, that authors are able to make
> entries visible/invisible by a date range or by a simple switch to
> hide the entry. This works well. But (the aut
On Jul 15, 8:38 pm, Frantisek Malina <[EMAIL PROTECTED]> wrote:
> Project is in the folder httpdocs, in this folder there is a symlink
> to satchmo.
> settings.py, manage.py, urls.py... files are placed in the httpdocs
> folder.
>
> Can I set a project name to something else?
>
Have you got a bla
On Jul 21, 7:52 pm, "Andre Meyer" <[EMAIL PROTECTED]> wrote:
> hi again
>
> so, auto_now is deprecated and can be replaced by overriding the
> save()method. but what about
> auto_now_add?
>
> how to distinguish between creation and update in save()???
>
You can tell whether or not it's a new obje
On Jul 21, 8:28 pm, truebosko <[EMAIL PROTECTED]> wrote:
> {% if is_new_row forloop.counter %}
> ...
> {% endif %}
>
You can't use a tag inside another tag - in this case, the 'if' tag.
What you can do, though, is use a filter. So you need something like
this:
@register.filter
def is_new_row(c
On Aug 18, 12:08 pm, Will Rocisky <[EMAIL PROTECTED]> wrote:
> I have a datetime object '2008-15-06 11:12:13'
> I want to display it like 'June 6, 2008 at 11:12'
http://www.djangoproject.com/documentation/templates/#date
--
DR
--~--~-~--~~~---~--~~
You received th
On Aug 19, 6:18 am, "Jorge Vargas" <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote:
>
> > On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:
> >> I want to use text stored in field title to generate slugs.
> > In the svn (> 0.96) you have to use Model
There's quite a lot wrong with this code, quite apart from the
list_display issue. Comments interspersed below.
On Aug 19, 2:33 pm, saeb <[EMAIL PROTECTED]> wrote:
> No, that is not the real code. The real code as you mentioned is split
> into models.py and admin.py. And I am referring to the fun
On Aug 19, 7:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> My urls.py looks like this:
>
> project_info = {
> "queryset" : project.objects.all(),
>
> }
>
> (r'^project/(?P[-\w]+)/',
> login_required(list_detail.object_detail), dict(project_info,
> slug_field='slug')),
>
> Projects ha
On Aug 19, 5:28 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm trying to use the datetime picker widget from the admin widgets.
>
> My form is displaying, but the datetime picker is not. When I check
> the error console, I see the message:
>
> Error: gettext is not defined
> S
On Aug 19, 9:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> Thank you for your reply.
>
> Following your advice I tried the following:
>
> task is the model that relates to project.
>
>
> {% for task in project.task.all %}
> {{ task.title }}
> {% endfor %}
>
>
> It doesn't s
On Aug 19, 7:48 pm, Zinovii Dmytriv <[EMAIL PROTECTED]> wrote:
> I'm very happy that django is very flexible - this is great. But Rule
> of thumb is to avoid extensions of framework code unless it's really-
> really necessary. ifless is not that case. It just should be built-in.
But we're not tal
On Aug 19, 10:24 pm, Robert <[EMAIL PROTECTED]> wrote:
> Great! that works perfectly. However, it seems to have opened up
> pandora's box of problems that I'm not able to solve. I've pinpointed
> the problem now, and I'll summarize it below as follows, although
> perhaps it deserves a new thread.
On Aug 19, 11:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Daniel,
>
> I am working my way
> throughhttp://www.djangoproject.com/documentation/db-api/#related-objects
> at the moment trying to get a better grasp on how django handles SQL
> relationships.
>
> The way I got the above cod
On Aug 20, 7:14 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
> I am actually making a sort of wizard in which all values have to be
> saved at the end.
> I want to pass a variable from one action to another after pressing
> 'Next' with HttpResponseRedirect
There's various ways. The easiest would b
On Aug 21, 4:42 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I have a column, 'position', which is a PositiveIntegerField, to allow
> my end-user to order records with. I would like to pre-populate the
> field when creating a new record, with the count of the model objects
> +
On Aug 23, 2:33 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> There is no reason that you couldn't include multiple forms in an HTML
> post operation. You just have to make sure that there won't end up being
> duplicate fields across forms.
>
In fact, there isn't even any reason to worry about t
On Aug 24, 7:38 am, rmschne <[EMAIL PROTECTED]> wrote:
> I'm new to Django, and have played with Python for a few years on and
> off (not a real programmer). I'm keen to use Django to explore some
> data because of its custom data models which I plan to rely on
> extensively (putting the complex
On Aug 24, 1:51 am, Rodolfo <[EMAIL PROTECTED]> wrote:
> Just for curiosity, why would one have two forms in a single page?
> I don't think it is possible to submit the two in a shot.
>
> Maybe only of them is intended to be filled per access?
>
> []s
>
> Rodolfo
You can't have two HTML forms per
On Aug 26, 10:12 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
> I am taking an input from user in text area, like comments.
> but when I print them, they all display in one line.
> how can I format them to display exactly how use entered them? (new
> lines, tabs etc)
When you say 'print' I presume
On Aug 28, 3:01 pm, Greg Taylor <[EMAIL PROTECTED]> wrote:
> I'm getting the following error on some of my models with
> DateTimeFields. Any ideas?
>
> Traceback (most recent call last):
>
... snip. ...
>
> File "/home/clemsoncrew/site-packages/django/forms/widgets.py", line
> 662, in decompress
On Aug 29, 7:18 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I can get user_utilization but member.user gives me django object. How
> can I get that information?
>
> In [199]: for member in prj_members:
> .: member.user
> .: member.user_utilization
> .:
> Out[1
On Aug 28, 11:24 pm, Greg Fuller <[EMAIL PROTECTED]> wrote:
> I would like a way to to adjust settings based on information in the
> http header. I've seen a similar question asked before, but I don't
> need all the django request object, just the http header information.
> More specifically, us
On Aug 29, 4:19 am, Issac <[EMAIL PROTECTED]> wrote:
> I have installed python2.5 on RH3L-AS4 successfully.
> And already installed Django1.0-beta2 successfully.
>
> After i create a project test, when i use python manage.py runserver
> to start the dev server, the log shows error during the start
On Aug 29, 10:30 am, Martin Gilday <[EMAIL PROTECTED]> wrote:
> Is it possible to run a single test using manage.py test, rather than
> the whole suite? I have defined a tests.py in one of my apps and
> would just like to run those tests, as the auto generated tests take
> far to long to be runni
On Aug 30, 10:54 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Sorry but I didnt get it :(
> (Perhaps you should actually call the field user rather than user) .
> Could you please explain more ?
Sorry, that should have been "you should call the field users" - i.e.
plural, because it refe
On Sep 1, 1:05 pm, joune <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm totally new to Django and i'm starting to play with templates...
> I have a list to display and a separate list of elements considered
> special;
> so i'd like to display the first list with a different style if the
> element is c
On Sep 1, 10:21 am, babatu <[EMAIL PROTECTED]> wrote:
> how to use queryset to get some attribute but not all of the modle.
>
> for example:
>
> queryset = Entry.objects.all()
>
> i just want to sql like this" select id from Entry "
>
> but not "select * from Entry",
See the documentation:
http:/
On Sep 1, 1:52 pm, "Weber Sites" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm trying to get the the tutorial02 (mysite) to work with apache.
> No matter what I do I keep getting this error :
>
> EnvironmentError: Could not import settings 'mysite.settings' (Is it on
> sys.path? Does it have syntax erro
On Sep 1, 2:53 pm, Nick Day <[EMAIL PROTECTED]> wrote:
> Would somebody be able to provide a simple example of using get_form()
> within the ModelAdmin to retrieve the currently logged-in user?
>
> Thanks in advance,
> Nick
>
Not difficult:
class MyAdmin(admin.ModelAdmin):
def get_form(self,
On Sep 1, 3:10 pm, "Weber Sites" <[EMAIL PROTECTED]> wrote:
> Thanks, looks like we are making progress :)
>
> Now I get
>
> Page not found (404)
> Request Method: GET
> Request URL:http://django.weberdev.com:82/mysite/
>
> Using the URLconf defined in mysite.urls, Django tried these URL patterns,
On Sep 1, 5:39 pm, "Weber Sites" <[EMAIL PROTECTED]> wrote:
> How do I know which ver?
What does it say when you start up the development server?
Or in the shell, you can do
>>> import django
>>> django.get_version()
u'1.0-alpha-SVN-8210'
To be honest, I'm not sure you actually want the /mysite/
On Sep 2, 4:04 pm, flynnguy <[EMAIL PROTECTED]> wrote:
> Found out what was causing the error but not why...
>
> It seems that when I tell my model to not exclude the "pet" field,
> that everything works fine. (ie, I select a pet from the dropdown)
> When I add it to the exclude list and try to se
On Sep 2, 6:10 pm, cArkraus <[EMAIL PROTECTED]> wrote:
> Hey everyone,
>
> am pretty new to Django and Python in general.
> I seem not be able to let the 'initial' value of a form-field be
> calculated by its parent form.
>
> I'd like to do sth like this:
>
> class AbstractForm(forms.Form):
>
On Sep 4, 12:36 pm, [EMAIL PROTECTED] wrote:
> Guys,
>
> I have the following model :
>
> from pypo.contracts.models import job_id
> from pypo.suppliers.models import Company
>
> ##Create your models here
>
> class ponum(models.Model):
> contract = models.ForeignKey(job_id)
> sup
On Sep 8, 9:47 am, nsash <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I use latest Django official version - 1.0. I want to use in my admin
> view
> filter_vertical('categories',) or
> filter_horizontal('categories',) for a ManyToMany Field.
>
> But I only get the error message "name 'filter_v
On Sep 8, 4:37 pm, [EMAIL PROTECTED] wrote:
> Hey all,
>
> I have this code:
>
> http://dpaste.com/76671/
>
> When I go to the URL it doesn't display the page, but it also doesn't
> display and errors with the URL. What is wrong with the permalink
> instance?
>
> Also, is there a workaround for us
On Sep 8, 8:14 pm, KillaBee <[EMAIL PROTECTED]>
wrote:
> I am editing my Admin.py to use the new ModelAdmin. All my change has
> no effect. I wanted it to come up with all my app automaticlly.
>
> I have this in my urls.py:
> from django.contrib import admin
> .
> .
> .
> (r'^admin/(.*)', admin.
On Sep 8, 7:55 pm, Kurczak <[EMAIL PROTECTED]> wrote:
> On 8 Wrz, 20:37, David Zhou <[EMAIL PROTECTED]> wrote:> On Sep 8, 2008, at
> 2:30 PM, Kurczak wrote:
>
> > > Is there any way to disable/remove the delete checkbox for inline
> > > formsets ( in admin) ?
> > > I found nothing about it in doc
On Sep 8, 9:16 pm, KillaBee <[EMAIL PROTECTED]>
wrote:
> I keep getting this error on this view named timesheets, the code
> looks like this.
>
> ViewDoesNotExist: Could not import intraweb.apps.timesheets.views.
> Error was: cannot import name entrys
The traceback quite clearly states that th
On Sep 9, 4:47 am, "Efrain Valles" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have a basic question, I am currently adding new items using a form
> that is generated using ModelForms, I have html for the form I need
> using {{ form.as_table }} in the html. Now I am trying to do CRUD for
> data
On Sep 9, 7:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote:
> Hi all, starting to think there is so much stuff in django and python
> that I will never learn it all. I am building a site that used the
> admin piece for most of the CRUD and a few other pages for the rest of
> my requirements. I link
On Sep 9, 8:56 pm, Anakin <[EMAIL PROTECTED]> wrote:
> im using 10.5.2 osx Leopard. and im working with django 1.0 final
> release.
>
> i have some screenshots about this error, settings - traceback and if
> you need terminal log. you can see in this
> url.http://www.deneloper.com/django-error/in
On Sep 10, 8:56 am, David <[EMAIL PROTECTED]> wrote:
> whereas once you had
>
> p = get_object_or_404(Person, pk=pID)
> MyForm = forms.form_for_instance(p)
> f = MyForm(request.POST.copy())
>
> how on earth do you do it now?
> I've tried simply f = MyForm(request.POST.copy()) where MyForm is
> pre
On Sep 10, 9:56 am, David <[EMAIL PROTECTED]> wrote:
> Thanks, are they also any example of the case of form_for_model (as I
> am assuming the above is only with respect to form_for_instance)
>
> Thx.
> D.
But that's just what you had already:
> > > I've tried simply f = MyForm(request.POST.copy
On Sep 10, 9:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi
>
> I'm having a problem with inline formsets containing file field, i've
> had a good google but couldn't find an answer, so apolgies if this is
> a stupid or repetative question.
>
> I have a model Applicatant, which has a o
On Sep 12, 1:04 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> [OT question: Why does top-posting seem to be the default response mode on
> this list?]
> As a follow-up to this question, how would one cast the output as a table
> where the major field is only displayed on change. I.e., how to pro
On Sep 13, 9:25 am, Gerard Petersen <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I need to create a field with a choice set that looks like this:
>
> BTW_CHOICES = (
> ('0.0', '0%'),
> ('6.0', '6%'),
> ('19.0', '19%'),
> )
>
> This works as expected when using dropdown
On Sep 13, 10:56 am, Gerard Petersen <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> > If you want a field that's populated with values from another model,
> > you should use a ForeignKey.
>
> Is it then still possible to use filters and such, and keep it in the model
> logic?
>
> Because the Meta model
101 - 200 of 2396 matches
Mail list logo