| Name | IM NS |
|---|---|
| Email Address | imns81+tdf2@gmail.com |
| Avatar | |
| Posts | 26 |
-
- 2009-09-15 18:14:18
- Re: calender
- Board » Django » Templates
-
Well create a calendar, google how to do it if you don't know, and the append your event to the correct date.
Typing "django calendar" in google produces a lot of results:
http://www.google.com/search?hl=en&source=hp&q=django+calendar&aq=0&oq=django+cale&aqi=g9
-
- 2009-09-15 18:08:06
- Re: upload_file query?
- Board » Django » Views
-
You should always do a redirect after a POST request to avoid duplicate data if the users hits refresh.
-
- 2009-09-04 08:44:17
- Re: dynamic polling
- Board » Django » Models
-
Yeah @dilu720, start coding and let us know what problems come up.
-
- 2009-09-04 08:40:12
- Re: Can't view image on my html page
- Board » Django » Templates
-
At this point you will have to post some code. Include how you are serving your media in your settings file, your html and your url conf for your images folder.
-
- 2009-08-31 10:13:51
- Re: Inserting (passing) html code to template from a view
- Board » Django » Templates
-
You should always keep your html in the template.
Also, it doesn't seem like you need a for loop for what you're trying to do.
-
- 2009-08-31 10:12:23
- Re: satchmo installation problem
- Board » General Category » General Discussion
-
Hey dumkat - do us a favor and wrap your output in BB code tags from now on.
Here's the link if you don't know what that is: http://en.wikipedia.org/wiki/BBCode
Thanks
-
- 2009-08-31 10:10:16
- Re: Can't view image on my html page
- Board » Django » Templates
-
One thing you might not be thinking about it you have to use absolute paths in your templates like this "/path/to/image/..." instead of "path/to/image/...".
Also check out the docs and make sure you have your image folder defined in your url conf.
-
- 2009-08-19 20:05:36
- Re: Django ModelChoiceField initial data not working for ForeignKey
- Board » Django » Views
-
I posted this question on stackoverflow too and somebody said I should do something like this
form = somethingForm(initial = { 'title' : something.title, 'category' : [("database value","display value")], })
but that didn't work either. I ended up just not using django forms for the category and doing it all manually ... checking the post data instead of the form.clean_data. I know it's not the best, but I can't find a solution for this problem, so it will have to do.
-
- 2009-08-19 08:58:30
- Re: Django ModelChoiceField initial data not working for ForeignKey
- Board » Django » Views
-
Hey Herbert
Thanks for the input, but that didn't work.
-
- 2009-08-18 20:27:35
- Django ModelChoiceField initial data not working for ForeignKey
- Board » Django » Views
-
I am filling my form with initial data using the normal:
form = somethingForm(initial = { 'title' : something.title, 'category' : something.category_id, })
The title works fine, but if the category is a ModelChoiceField and a ForeignKey in the model, the initial data won't work. Nothing will be selected in the Select Box. If I change category to an IntegerField in the model it works fine.
I still want to use a ForeignKey for category though, so how do I fix this?


