| Name | Herbert Poul |
|---|---|
| Email Address | herbert.poul@gmail.com |
| ICQ UIN | 50647169 |
| Jabber Id | kahless@sphene.net |
| Website URL | http://herbert.poul.at |
| Avatar | ![]() |
| Posts | 189 |
| Board Signature | |
SCT - http://sct.sphene.net | |
-
- 2011-07-26 10:38:46
- Re: File Upload Problem
- Board » General Category » General Discussion
-
hi,
i fear this is currently not handled in django - you would have to save the file, even if the form is invalid and handle rePOSTs yourself.. the problem is that the file was already uploaded and you can't prefill a file input field for the user..SCT - http://sct.sphene.net
-
- 2011-05-31 07:03:29
- Re: external link in django
- Board » General Category » General Discussion
-
umm.. i guess you could try implementing a reverse proxy in django .. i did a quick google search and found this project: http://pypi.python.org/pypi/dj-revproxy
maybe you could give it a trySCT - http://sct.sphene.net
-
- 2011-05-31 04:23:57
- Re: external link in django
- Board » General Category » General Discussion
-
the easiest way would be handle it with your webserver, not with django.. so with apache i would suggest ou take a look at mod_rewrite.. something like the following should work in your apache configuration (with mod_rewrite and mod_proxy enabled)
RewriteEngine On RewriteRule /other(.*) http://other.mydomain.com$1 [P]
maybe you want to take a look at the mod_proxy documentation: http://httpd.apache.org/docs/current/mod/mod_rewrite.html - the above code would simply include all content from other.mydomain.com under /other through an internal proxy
--- Last Edited by Herbert Poul at 2011-05-31 04:24:08 ---SCT - http://sct.sphene.net
-
- 2011-05-30 05:08:58
- Re: output txt file
- Board » General Category » General Discussion
-
hi,
you can also pass in a mimetype = 'text/plain' into the render_to_response function.. i think this should solve your problem?SCT - http://sct.sphene.net
-
- 2011-05-26 09:07:32
- Re: How to order choice set on m2m field using ModelForm
- Board » Django » Models
-
hi,
have you tried setting the ordering attribute of the Meta class directly on the model? see https://docs.djangoproject.com/en/1.3/ref/models/options/#ordering
it would change the default ordering of this model, but i assume you want the same ordering in the manytomany choices as for example in the django admin for that model..SCT - http://sct.sphene.net
-
- 2011-05-26 07:52:08
- Re: Welcome to the Django Forum
- Board » General Category » General Discussion
-
codemonkey19 said @ 2011-05-26 07:34:19:So can you suggest me some good stuff to read for django (free download please) I've been trying to create a blog site powered by djangoi would suggest to walk through the tutorial on the official django site: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ which will make you build a simple poll app. afterwards simply play around with what you have learned - you should already be able to get off the ground.. and if not, you at least can get as far as having specific problem to ask here
- i would also recommend to take a look at the (free) django book: http://www.djangobook.com/en/2.0/
hope that helps, and welcome to django
SCT - http://sct.sphene.net
-
- 2011-04-15 12:54:16
- Re: Django admin set up error.
- Board » Django » Models
-
hi,
which version of the django book are you reading? i think you are using the mechanism for the old admin site.. how does your urlconf look?
you should be looking at this: http://www.djangobook.com/en/2.0/chapter06/ (version 2.0 of the book)
# Include these import statements... from django.contrib import admin admin.autodiscover() # And include this URLpattern... urlpatterns = patterns('', # ... (r'^admin/', include(admin.site.urls)), # ...SCT - http://sct.sphene.net
-
- 2011-04-14 09:13:06
- Re: User profile in Template
- Board » Django » Templates
-
Annatar said @ 2011-04-14 06:52:57:I'm glad I can help on this forum and I hope to see more activity around here.i would very much appreciate it if you'd stick around
it is slowly gaining traction.. i usually try to answer most questions, but sometimes it gets really frustrating or time consuming if a question is not that throughly formulated, and sometimes i'm also not up to date (i haven't worked with the latest django release yet
there is still much to catch up for me).
thanks for your really helpful answers in the other threads! if you have an idea on how to improve this forum to get users more engaged let me know
SCT - http://sct.sphene.net
-
- 2011-04-14 09:08:42
- Re: Adding Model after Sync DB
- Board » Django » Models
-
yes exactly.. maybe you have removed those models, or you had temporarily an app installed which created those tables? but i would say it is save to drop those tables.. (as usual i would suggest you create a back of your database - or at least of those tables, before dropping them though
just to be sure..)SCT - http://sct.sphene.net
-
- 2011-04-14 06:10:48
- Re: User profile in Template
- Board » Django » Templates
-
Annatar said @ 2010-06-27 16:31:59:Because if it does, it's not a good idea and I must find a way to cache that.hi, i guess you already found your answer.. (sorry for that) but to close the issue, get_profile already caches the result.. if you look at the code in django/contrib/auth/models.py:
def get_profile(self): """ Returns site-specific profile for this user. Raises SiteProfileNotAvailable if this site does not allow profiles. """ if not hasattr(self, '_profile_cache'): [...] return self._profile_cache
so no matter how often you call get_profile on the user object the work will only be done once..
p.s.: @annatar: i have moved your answer for abhishek into his thread: http://thedjangoforum.com/board/thread/854/how-can-design-uml-from-django-model/?page=1#post-854 thanks for your effort!SCT - http://sct.sphene.net



