Hello,
I want to export file from database and from two objects;
I'm use MYSQL,
I have two objects:
1, attendance object:
2. get_work object:
I now can export one object's datas;
So, i how can export datas of two objects;
My the views.py is here:
def export_excel(request):
response = Htt
On Wednesday, 14 May 2014 21:08:11 UTC+4, Avraham Serour wrote:
>
> it looks like your error occurs when using django ORM with oracle, but in
> the beginning of your email you mention that you don't want to use it, so
> what's the problem here?
>
>
I want to reuse established connection with t
Hello everyone,
I have to do a web application at my work. I use to program with Python
every day but never for web application. So I wanted to know if Django is
the best choice for my problem. Here it is, in my application there will be
only one form (with some file uploading). After the submi
On May 15, 2014 2:36 AM, "G Z" wrote:
>
> So I read the documentation on passing csrf tokens, however its giving me
an issue i think its because im trying to pass it as a dictonary variable
with my form and customers.
>
> This is from the documentation
>
> from django.views.decorators.csrf import
follow the django tutorial
On Thu, May 15, 2014 at 12:33 PM, Amelie Bacle wrote:
> Hello everyone,
>
> I have to do a web application at my work. I use to program with Python
> every day but never for web application. So I wanted to know if Django is
> the best choice for my problem. Here it is,
On Thu, May 15, 2014 at 10:33 AM, Amelie Bacle wrote:
> Hello everyone,
>
> I have to do a web application at my work. I use to program with Python
> every day but never for web application. So I wanted to know if Django is
> the best choice for my problem. Here it is, in my application there will
Hi,
I've just created a really basic django site, its got the tutorial polls
and thats about it.
I've added in the metro UI and added it to the static files directory under
the appropriate app.
I've also used the collectstatic command and it picks up the files.
But both with Apache and using run
Hi all,
I am thinking of developing a web application where users will have to
login by their email address instead of using their usernames.
Now I know I can do this by writing my own auth backend, but I'm just
curious how the rest of you handle this. Do you normally use third party
packages to
On Thu, May 15, 2014 at 5:26 PM, Frankline wrote:
> Hi all,
>
> I am thinking of developing a web application where users will have to
> login by their email address instead of using their usernames.
>
> Now I know I can do this by writing my own auth backend, but I'm just
> curious how the rest
Hi,
django-allauth will work for your needs. Give it a try.
http://django-allauth.readthedocs.org/en/latest/
V.
On Thu, May 15, 2014 at 5:26 PM, Frankline wrote:
> Hi all,
>
> I am thinking of developing a web application where users will have to
> login by their email address instead of usi
Hi,
From my Django application's template, I need to post some data to the
same Django application's view, and there is a method in view that should
perform further operations with them. From my JavaScript, I am trying to
send a bunch of requests at the same time, like this:
$.when(fun
Django-allauthhttps://github.com/pennersr/django-allauth
—
Sent from Mailbox
On Thu, May 15, 2014 at 7:58 AM, Frankline wrote:
> Hi all,
> I am thinking of developing a web application where users will have to
> login by their email address instead of using their usernames.
> Now I know I can do
Ok thanks for your answers. Yeah maybe that best suits not here, I meant is
Django able to do what I plan to do before I start studying the framework
and loss time. Let's see the tutorial then !
On Thursday, May 15, 2014 11:33:05 AM UTC+2, Amelie Bacle wrote:
>
> Hello everyone,
>
> I have to d
On Wednesday, May 14, 2014 11:35:46 PM UTC-7, G Z wrote:
>
> So I read the documentation on passing csrf tokens, however its giving me
> an issue i think its because im trying to pass it as a dictonary variable
> with my form and customers.
>
> This is from the documentation
>
> from django.views
Amelie,
Django may be overkill for your application. However, it is very easy to
use, and takes care of all the little, and big, details of getting a web
application to work. The documentation is very good, and the community is
very helpful. Good luck!
Mark
On May 15, 2014 6:13 AM, "Amelie Bacle"
What do you mean,
If i take it out of the ctx dictionary how do I pass it. if I just declare
the @csrf_protect I still get the token error trying to post my form,
infact the csrf issue is the only thing I have left to fix. How are you
supposed to do the csrf token because im following the docume
solved it
from django.shortcuts import render
from django.http import HttpResponse
from vmware.models import Customer
from django.shortcuts import render_to_response
from vmware.models import Vms
from .forms import SignUpForm
from vmware.models import Vmspecs
from django.views.decorators.csrf imp
I want to call three models into one form on my page but it doens't like
the way that i am doing it. Any help would be awesome if i call them
idividually it just displaces the last one i call.
from django import forms
from .models import Customer, Vms, Vmspecs
class SignUpForm(forms.ModelForm
>
> so I changed it a bit after doing some more research however formb, and
> formc don't display, if I change the 'formb' to 'form' it will overwrite
> the first one and only display the second one.
> This is how i read the forignekey associate between multiple forms to be.
>
from django.sho
Hi.
I'm trying to reverse urls to other languages and I'm having some
difficulties:
Consider a new project in python 3.3 Django 1.6.4 with the adittional
settings
LOCALE_PATHS = (BASE_DIR + '/locale',)
LANGUAGE_CODE = 'en-us'
LANGUAGES = (
('en-us', 'English'),
('de', 'Germ
Hi,
use ugettext_lazy for translation of urls, models and other stuff which
is loaded before language is determined (it's usually done in
Middleware or later in view, otherwise all strings will be translated
into default language).
You can also write:
url(_(r'^about$'), views.about, name='about
Why not just do this? (Not sure if this is the most efficient way..)
models.py:
> class SignUpForm(forms.ModelForm):
> class Meta:
> model = Customer
>
class VmForm(forms.ModelForm):
class Meta:
model = Vms
class VmSpecForm(forms.ModelForm):
>
> Why not just do this? (Sorry for the crappy indentation.. tab doesn't work
> on here for some reason)
>
> models.py:
>
>
>> class SignUpForm(forms.ModelForm):
>> class Meta:
>> model = Customer
>>
>
> class VmForm(forms.ModelForm):
> class Meta:
>
Hi,
i also write the views but the column was freaking After output to excel in
this code.
def export_excel(request):
response = HttpResponse(mimetype='application/vnd.ms-excel;
charset="Shift_JIS"')
response['Content-Disposition'] = 'attachment; filename=file.csv'
writer = csv.wri
Hi,
I am having some issues with making my form/model fields not required.
Currently this is the code that I have:
forms.py:
class startRound(forms.ModelForm):
player_2 = forms.CharField(widget=forms.TextInput(attrs={'disabled':'True',
'hidden':'True', 'id':'player_2'}))
player_3 = forms.CharF
25 matches
Mail list logo