imagefiled don't Work

2012-01-20 Thread cha
Hello I reading this tutorial https://pype.its.utexas.edu/docs/tutorial/unit6.html#answers it's work OK But When I want improve it and add ImageField in Category Model i have problem with ImageField It's Not uploaded file = models.ImageField(upload_to='img/%Y') see code please : _ views.py

Re: How to use a DB table for choices=tuples in ChoiceField?

2012-01-20 Thread Bill Beal
Thank you, Dennis. I'll study your answer. I have to do this kind of thing for a lot of different tables. And I discovered another thing: In the template I was reading the table in again from the database! Before my problem was solved, I could populate the selection list from the DB table,

Re: How to use a DB table for choices=tuples in ChoiceField?

2012-01-20 Thread Bill Beal
Well, I put the code in line, thus: class BolForm(forms.Form): - q = Scac.objects.all() - scaclist = [] - for x in q: --- scaclist.append((x.code, x.name)) - scac = forms.ChoiceField( - label=u'Ocean Carrier', choices=scaclist) - bill_of_lading = forms.CharField( - label=u'Bill of Lading

Model-driven Django development

2012-01-20 Thread Alec Taylor
At University I've learned various techniques for model-driven developments, such as: - Class diagrams (generate code) - ERD Diagrams (generate db code [e.g. SQL]) Can any of these sorts of—or for that matter, any sort of—model-driven development techniques be used for Django? -- You received

Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-20 Thread Chris Seberino
I get the following error when attempting to delete an object of my model... "AssertionError: Question object can't be deleted because its id attribute is set to None." The class definition is thus... class Question(django.db.models.Model): """ Represents a database table.

How to use a DB table for choices=tuples in ChoiceField?

2012-01-20 Thread Bill Beal
Hi All, When I looked in the docs for how to fill in the "choices=" attribute for a ChoiceField in a form, I could only find static sets of tuples for examples. I need to use a table from the DB for the tuples. I thought I could make up the choice list myself from the table, but I'm getting a

Re: ANN: Releasing Django Media Tree, a media file management application for the Django admin

2012-01-20 Thread Samuel Luescher
I'm not planning to create Fein CMS plugins myself, but I'm very much hoping the community will take a stab at this. Actually, now that I think of it, the actual output generated by the CMS plugins should be abstracted from the CMS and moved to the media_tree.contrib.widgets package so that

Groups in Forms

2012-01-20 Thread James
I have a Jquery Notebook that has common options on one tab and more advanced options on another tab. The model referencing this data has both tabs of data and a description field as well. Initially, I broke out the form manually, but I decided that this would be a major pain to write {{

Re: Need help with userena - assign user to group at signup

2012-01-20 Thread Jesramz
>you just make your choice in the backend depending what your database says Would I have to go into the admin myself? (please, I have the mind of a four year-old) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: ANN: Releasing Django Media Tree, a media file management application for the Django admin

2012-01-20 Thread Gabriel - Iulian Dumbrava
Great job guys !!! Why don't you list your Django CMS integration here: https://www.django-cms.org/en/extensions/ ? Are you going to make some Fein CMS integration also? I believe that these two CMS systems are two of the best, and I like them both. Gabriel -- You received this message

Re: Need help with userena - assign user to group at signup

2012-01-20 Thread Andres Reyes
What do you mean with the employee choosing the employer option? You normally don't give a choice in the frontend, you just make your choice in the backend depending what your database says 2012/1/19 Jesramz : > > > The problem with that, if I'm understanding

DatabaseError: execute used with asynchronous query

2012-01-20 Thread j_syk
I was testing one my apps today with a form that features a drop-down field that initiates a json lookup for additional detail. You choose a location, it populates address fields. It's been working for weeks. Today, when I clicked an entry, the target detail field didn't change. I have debug off,

Re: A problem with a solution, but is it the right one?

2012-01-20 Thread Jeff Heard
Yeah, I started doing that after I posted... Thanks for the advice. I'll be posting this code up on GitHub in a few days, as it's part of a reasonably complete implementation for Django of ISO 19142, Open Geospatial Consortium's Web Feature Service. -- Jeff On Fri, Jan 20, 2012 at 7:30 AM,

Re: A problem with a solution, but is it the right one?

2012-01-20 Thread francescortiz
I would pass bound data instead of calling from_request: https://docs.djangoproject.com/en/dev/ref/forms/api/#ref-forms-api-bound-unbound This way you don't have to worry about forms logic, but just about filling the default data. Francesc On Jan 18, 8:42 pm, Jeff Heard

Re: django-localeurl and SEO

2012-01-20 Thread ionic drive
thank you very much, I found out, that this issue is already addressed. its possible to make multi_locale sitemaps with django-localeurl. I did not see that this is possible in the first glance. sorry! link to tutorial: http://packages.python.org/django-localeurl/usage.html#sitemaps greetings

Re: django-localeurl and SEO

2012-01-20 Thread Thorsten Sanders
You could add sitemaps in the google webmaster tools or make a sitemap in the root dir which contains links to the other sitemaps. On 19.01.2012 17:59, ionic drive wrote: Hello django friends, I have installed "django-localeurl" successfully. After some redirecting troubles... don't worry

Re: Need help with custom search using admin queryset

2012-01-20 Thread Raoul
Is there nobody using such extended search functions in Django? Does anyone have a similar method for filtering querysets before returning to admin result list? Thanks for any hint! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Handling copy on a small project

2012-01-20 Thread Daniel Roseman
On Friday, 20 January 2012 04:39:44 UTC, Jeremy Boyd wrote: > > Hi all, > > For my side project, we have the need to rapidly iterate on the app's > copy. As I see it, we have two options: make copy db-driven, or hardcode it > into the templates. I'm leaning toward putting text in the db for now