Your form need a attribute named enctype, and the value is
multipart/form-data, try it.
在 2012-5-19 晚上10:55,"Michael Ackerman" 写道:
>
> I have a generic view:
>
> class create_ticket(CreateView):
> model = ticket
> form_class = ticket_form
> template_name = "create_ticket.html"
> suc
what's your '@login_required(login_url='/login/')'?
seems like the decorator leads to the redirection.
2012/8/8 mapapage
> for the login I do (username must be the id field(pk) of an 'owners'
> table and password is a field of the same table):
>
> def login_user(request):
> c = {}
> c
是不是可以用异步来完成? ajax upload
2012/8/8 Russell Keith-Magee
> On Wed, Aug 8, 2012 at 2:42 PM, 春燕 李 wrote:
> > Thanks !
> >
> > In my application, I want to upload image files(such as *.iso) which
> > are always large, it will take long time before the uploading
> > completed. During this time, I can
"d:/wwwroot/djtest/djtest/" was already in system path, so I think you
should set DJANGO_SETTINGS_MODULE like this:
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"settings")
try it![?][?][?]
2012/9/11 DJ-Tom
> Am Dienstag, 11. September 2012 00:43:44 UTC+2 schrieb Mike Dewhirst:
>
>>
>> Try d
decorator?
2011/8/27 NISA BALAKRISHNAN
> Hi,
>
> I am new to django.
> i am making a django app for a logged in user to add movies he
> watched.
>
> how can i block a logged in user from accessing the log in form ?
> the url .../accounts/login
>
> --
> You received this message because you are s
size limitation?
it is wired.
[?]
2011/9/28 @@
> Hi
> I got a image can't upload while other image works fine, and i use paint
> open this image and save it as another file, then the other file can be
> uploaded.
> The debug page shows the request.FILES is None.
> The attachment is the image can
Did you set Debug=False?
在 2011-9-27 上午4:21,"nara" 写道:
> I am having trouble getting STATICFILES to work. I have read the docs,
> and followed the instructions, but I never get my css files to load.
> My current workaround is to put all the css inline in my template
> file, but that should not be a
Fisrt,it's not multiple forms as your description.
You can use request.GET.getlist('text','') to get the every text in one list
在 2011-9-26 下午11:34,"sakthi" 写道:
> In a page i made multiple text forms with the same name. i cannot get
> the values of all the forms. only the last form's value is avail
request.GET.getlist('txt','')
sorry!
在 2011-10-2 上午4:37,"Jian Chang" 写道:
> Fisrt,it's not multiple forms as your description.
> You can use request.GET.getlist('text','') to get the every text in one
list
> 在 2011-9-26 下午11:34,"s
yes, you need the decorator @models.permalink
2011/11/15 Rubén Dugo Martín
> You forget the decorator:
>
> @models.permalink
> def get_absolute_url(self):
> return ('blog_post_detail', None, {
>'year': self.publish.year,
>'month': self.publish.strftime('%b').lower(),
>
u can test by yourself.
yes, i don't know the answer, neather
在 2011-11-27 上午12:08,"Addy Yeow" 写道:
> If I use cache_page() decorator for my view function, will the TIMEOUT be
> able to take precedence over CACHE_MIDDLEWARE_SECONDS?
>
> In my settings.py,
>
> CACHES = {
> 'default': {
>
Yes, you need ajax
在 2012-12-13 中午12:29,"Mario Gudelj" 写道:
>
> Hey,
>
> First you need to add some id to that field and then use a jQuery
selector to get the value from it on blur or input:
>
> $('#some_id).on("blur", function(){
>//make your ajax call here
> });
>
> To make the Ajax call you c
you can use unicode.
2013/1/16 armagan
> Turkish chars
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...
you mean two different databases?
you can't do the transaction between two different databases.
Anyway you can control the transactions by yourself.
like:
commit all or rollback all if all actions are ok or not,
2013/1/21 Sandeep kaur
> Hello Django users,
> I have created a django application w
Rest in peace
2013/3/21 Ernest Mundia
> M.H.S.R.I.P
>
>
> On Wed, Mar 20, 2013 at 6:16 PM, Javi Romero wrote:
>
>> El martes, 19 de marzo de 2013 18:01:39 UTC+1, Jacob Kaplan-Moss escribió:
>>
>> Hello fellow Djangonauts,
>>>
>>> We have difficult news: Malcolm Tredinnick has passed away.
>>>
>>
postgres!
do what you like
2013/3/18 frocco
> Hello,
>
> What is the recommended database for django?
>
> I have used MySQL, but am interested in Postgres.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from
Using raw sql is a better idea
2011/7/11 Jonas Geiregat
>
>
> In order to find the places in near by area I want to make following
> mysql query. but I am not sure how should I translate it using django
> models and managers.
>
>
> You could execute the raw sql query string, see:
> https://docs.
Try DBUtils
http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html
2011/7/13 Kejun He
> hi,
> I am sorry. My English is very bad.
>
> Yes, i want to make persistent databases connection on each session.
>
>
> and yesterday i try to modify the code on
> "site-packages\django\db\__init__.py
django doesn't have,
but you can extent based on django.core.paginator.Paginator.The attachment
is what i use, you can change it by your needs
2011/7/16 Kase
> realy i dont know how to expres this..
>
> i need this
> (is a blog app)
>
> 1) post
> 2)post
> 3)post
> ...
> 10)post
> page 1,2,3,4
2011/7/16 Jian Chang
> django doesn't have,
> but you can extent based on django.core.paginator.Paginator.The attachment
> is what i use, you can change it by your needs
>
>
>
>
> 2011/7/16 Kase
>
>> realy i dont know how to expres this..
>>
>>
try this: reverse("mysites.views.index")
2011/7/16 Squeesh
> I have run into an issue using reverse() to lookup named urls with
> capturing groups before an include().
>
> Code:
>
> mysite/urls.py
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('',
>url(r
Using copy_from is easy to solve it. And if you want to a get a speical
format file from that csv, use a scirpt to handle it.
http://www.initd.org/psycopg/docs/cursor.html#cursor.copy_from
2011/7/25 nixlists
> On Sun, Jul 24, 2011 at 2:46 PM, Jarilyn Hernandez
> wrote:
> > Hi, Thanks for the res
Since you don't want to use forms class, you can write elements in your
templates directly.
2011/8/9 Hayyan Rafiq
> Hi I wanted to know if there was a way in which we could use widget
> directly in an HTML file
> By widget i mean elements of a form such as input boxes,calendars,Buttons
> etc wi
you should figure out what it is based on to order these urls.
i use time stamp to order them.
2011/8/10 Andre Lopes
> Hi,
>
> I'm testing Django for my first project using it.
>
> I have a model like this:
>
> from django.db import models
> import datetime
>
> class Directory(models.Model):
24 matches
Mail list logo