Hi,
How can I restrict the number of file upload sessions. Say suppose I
want only 100 user at any instant of time and I
also there is no problem of Denial of Service attacks.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Hi,
How to restrict the size of file being uploaded. I am using django
1.1 with apache. Can I use apache for this and show some html error
page if say size is bigger then 100MB.
I can use LimitRequestBody for restricting the file size in apache,
My problem is I wanted to show some error page if
Hi,
I have 2 list and want to iterate as one in template.
How can I do it.
example->
list1 = [10,20,30,30]
list2 = [aa,bb,cc,dd]
{% for item in list1 and item1 in list2 %}
{{item}} {{item1}}
{% endfor%} {% endfor %}
which is wrong.
How can I fix this.
I cant do this:
{% for item in list1 %}
{%
Hi,
I have a form with 2 buttons. depending on the button click user is
taken to different url.
view function is :
friend_id = request.POST.get('selected_friend_id_list')
history = request.POST.get('statushistory')
if history:
print "dfgdfgdf"
return
Hi,
My DB looks lie:
id
date msg
2011-2-09
abcd
2015-2-09
abcd
20
20-2-09 abcd
20
1-3-09abcd
20
5-3-09
Hi,
How to convert mysql 10 digit date format to django date format?
example:
mysql date - 1219848914
to django date - "22-05-09"
thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Hi,
Hi,
my_date_list = ['01', '02',
'03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31']
str_date_list=[]
for item in my_date_list:
str_date_list.append(item+'-'+'05' + '-' +'09')
counter= 0
i =
Hi,
My model is :
id val msg
20 1234 text
20 1245text
20 1275 text
20 1356
Hi,
class Status(models.Model):
someid = models.IntegerField()
value = models.IntegerField()
status_msg = models.CharField(max_length = 2000)
so my database look like:
20 1234567890 'some mdg'
20 4597434534 'some msg2'
20 345394593'sdfgsdf'
10 450348534
hi,
I am trying to write a facebook app where user can see the status
history of his friends.
Everything seems to work fine until I try to save the status
information in my DB.
here is code :
class UserStatus(models.Model):
facebookid = models.IntegerField()
time = models.IntegerField()
hi, I am trying to get status msg of the user in my facebook app. But
getting error in loading page.
here is the code:
user, created = FacebookUser.objects.get_or_create(id =
request.facebook.uid)
key = request.facebook.session_key
some =
Hi,
I am trying to build facebook app but ran into problem.
here is the code:
from django.http import HttpResponse
from django.views.generic.simple import direct_to_template
import facebook.djangofb as facebook
from fblaspal.models import FacebookUser
@facebook.require_login()
def
hi,
Does anyone has a working example of django mptt. I am not able to
implement it.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
hi,
I am trying to get list of selected checkbox from the listing.
here is my code:
html
{% for companies in companylist.object_list %}
{% endfor %}
{% if is_paginated %}
Prev
| Page {{cur_page}} of {{paginator_company_list.num_pages}} |
Next
{% endif %}
and
Young <[EMAIL PROTECTED]> wrote:
> On Nov 25, 12:27 am,laspal<[EMAIL PROTECTED]> wrote:
>
> > Exception Type: FieldError
> > Exception Value:Cannot resolve keyword 'callreports_meetingdate'
> > into field.
>
> Your error indicates a missing mod
Any one???
On Nov 25, 4:09 pm, laspal <[EMAIL PROTECTED]> wrote:
> Hi,
>
> ***view
> company_list = Company.objects.order_by('name')
> selected_companies_id_list = request.POST.getlist
> ('selected_companies_id_list')
> companies_li
Hi,
***view
company_list = Company.objects.order_by('name')
selected_companies_id_list = request.POST.getlist
('selected_companies_id_list')
companies_list =[]
for company_id in selected_companies_id_list:
company = Company.objects.get(id = company_id)
No It give me error
Exception Type: FieldError
Exception Value:Cannot resolve keyword 'callreports_meetingdate'
into field.
Thanks.
On Nov 25, 12:21 pm, Donn <[EMAIL PROTECTED]> wrote:
> On Tuesday, 25 November 2008 09:11:36 laspal wrote:
>
> > sortby = callr
Hi,
Code :
***Model**
class Company(models.Model):
name = models.CharField( max_length=100)
created_on = models.DateTimeField(auto_now_add=True)
updated_on = models.DateTimeField( auto_now = True)
class CallReport(models.Model):
company =
hi,
I am writing cron job for my application but run into problem
from django.core.management import setup_environ
import settings
setup_environ(settings)
from test.crm.models import CronEmail
Basically the problem is I am not able to import any model.
I tried this too:
pathname =
Got it fixed. I was making mistake -)
On Nov 20, 12:22 pm, laspal <[EMAIL PROTECTED]> wrote:
> OK I got the point but still having some problem dealing with excel
> file.
>
> code:
> abspath = '/home/laspal/work/test/tmp/'
> * view***
> if not
OK I got the point but still having some problem dealing with excel
file.
code:
abspath = '/home/laspal/work/test/tmp/'
* view***
if not os.path.isdir(abspath + str(_user.username)):
os.mkdir(abspath + str(_user.username) )
filepathwithname
('/home/laspal/work/test/', 'static/media')
MEDIA_URL = '/static/media/'
***view**
emailform = SendMailForms(request.POST, request.FILES)
cronemail = CronEmail()
attach = request.FILES['attach']
cronemail.subject = subject
and so on
cronemail.save()
So my
Ok I got the point but I run into some other problem.
when I run python /home/laspal/test/test.py It run without giving any
error.
but when I do crontab -e and add the file
-> */5 * * * * /home/laspal/work/ibms/triget_mail.py > /tmp/foo.log
2>&1
and go to /tmp/foo.log I am
Hi,
I am trying to write cron job for trigger mail whenever task is
overdue.
Here is the code for simple sending mail.
import sys
import os
def setup_environment():
pathname = os.path.dirname(sys.argv[0])
sys.path.append(os.path.abspath(pathname))
hi,
I am trying to create folder.
here is the code:
if not os.path.isdir(str(_user.username)):
os.mkdir(str(_user.username) )
filepathwithname = os.path.join(str(_user.username), file_name)
if not os.path.isfile(filepathwithname):
So how can I fix it.
I am not able to fix it.
Thanks
On Oct 30, 4:26 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> laspalwrote:
> > Any one can help me out.
> > Thanks.
>
> > On Oct 29, 11:41 am,laspal<[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
Any one can help me out.
Thanks.
On Oct 29, 11:41 am, laspal <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to create Excel file usingpyExceleratorbut my problem is
> I am not able
> to attach file to response.
>
> code :
> workbook = Workbook()
> worksheet
Hi,
I am trying to create Excel file using pyExcelerator but my problem is
I am not able
to attach file to response.
code :
workbook = Workbook()
worksheet = workbook.add_sheet('My Test Sheet')
worksheet.write(0,0, 'Company', font_style('left', 1, 'red'))
worksheet.write(1,1,
d do it like this:
> try:
>
> except:
> logging.error('...')
> raise # reraise exception
>
> - Why do you use HttpResponse for the canvas? You could use cStringIO or
> a tempfile.
>
> - Please post the traceback, if you ask for help. It shows where the
>
Hi,
I am trying to generate pdf file and send the generated file by mail
to the user.
But I am getting value error as I am not sure how to attach file.
here is my view function:
def companies_report(request, companyid):
_user = request.user
sender = _user.email
company =
Hi,
I am getting
MultiValueDictKeyError -> Exception Value: "Key 'attach' not found
in "
I have made filefield as required false but in the form when attach
field is empty I am getting above error..
but when all the fields are filled its work fine.
Can someone help me out why I am
>>In other words, why can't you just call it directly as a Python function and
>>pass it the list of mail ids you want to send?
I tried returning the python function.
View contact( request):
if request.method == 'POST':
return SendMail_Selected(request, new_mailing_list)
view
Hi,
I have a listing of contact from which I choose contact and get the
mailid.
Now I want to send mail to the selected mailid by using another form.
So right now what I am doing is :
view contacts( request):
if request.method == 'POST':
return
Hi,
I am using 1.0 version ran into problem.
My model :
from django.db import models
from django.contrib.auth.models import User
IPSecurity = True
class IPAccess(models.Model):
ip = models.IPAddressField(_('ip'), unique=True, db_index=True)
location = models.CharField(max_length
Hi,
I am trying to port my apps from django 0.96 to 1.0.
I have made all the changes required for it but when I run
/usr/bin/python manage.py runserver
I am getting error :
Error: Can't find the file 'settings.py' in the directory containing
'manage.py'. It appears you've customized things.
hi,
My view function is:
_user = request.user
sender = _user.email
contact_list =Contact.objects.all()
mailing_list = []
if request.method != 'POST':
emailform = EmailForm()
return render_to_response('email.html', locals())
if request.method == 'POST':
Hi,
I am trying to send mail using sendmail. Getting the error 'unicode'
object has no attribute 'user'
My view function:
def send_mail(request):
_user = request.user
sender = _user.email
mailing_list = []
if request.method != 'POST':
emailform = EmailForm()
So is there any way of attachment to mail using send_mail() in 0.96
version
On Sep 18, 11:24 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-09-17 at 23:23 -0700, laspal wrote:
> > Hi,
> > I am using 0.96 version of django and I am not able to import
&g
Hi,
I am using 0.96 version of django and I am not able to import
EmailMessage.
I have to send attachment with the mail and for that I am using
EmailMessage but not able to import it.
Does any one has a idea how to do it.
here is my code:
if emailform.is_valid():
subject =
Which documentation are you talking about??
On Sep 17, 3:49 pm, Erik Allik <[EMAIL PROTECTED]> wrote:
> A few months ago I had a similar need and I believe the documentation
> helped me out.
>
> Erik
>
> On 17.09.2008, at 11:23, laspal wrote:
>
>
>
> > Hi
Hi,
I wanted to know how I can attach a file while sending mail to the
user.
Sending mail is working fine but now I have to send a file with a
mail.
What are the things I have to use??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
hi,
I am trying to sort my tables depending upon the header.
Its working fine if my models does have any ForeignKey or
ManyToManyField.
but if its does sorting is not working.
class Meeting(models.Model):
created_by = models.ForeignKey(User, blank=True, null=True)
meeting_desc =
Can anyone give a link for doing corn job.
Thanks
On Aug 19, 4:43 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Wiadomość napisana w dniu 2008-08-19, o godz. 13:31, przez laspal:
>
>
>
> > hi,
> > I wanted to know how can I automatically tiger mail if some task
hi,
I wanted to know how can I automatically tiger mail if some task is
overdue by 1 day.
I have idea of using send_mail but wanted to send mail when the task
is overdue...
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
hi,
My modes is :
class Company(models.Model):
name = models.CharField( maxlength=100)
met_by = models.CharField(null=True, maxlength=200)
primary_contact = models.IntegerField(null=True, blank=True)
business_overview = models.TextField(null=True, maxlength = 2000 )
Hi,
I am getting the error "object is unindexable"
code :
company = Company.objects.get( id = companyid)
for ss in company.financials.all() :
ss[1].year
ss[1].revenue
ss.year and ss.revenue gives me the correct values for the entire list
but I am want to get only the first one.?
Hi,
I have a app called crm in which I have (model.py, views.py ,
forms.py, urls.py and __init__.py)
Now the problem is my code has become too big to handle in 1 file.
So I wanted to know how can I separate my views.py into multiples
files.
My models is as follows:
Industry:
Deals:
Hey I am able to run the test by using :
class IndustryTest(TestCase):
fixtures = ['/fixtures/initial_data.xml']
def setUp(self):
self.client = Client()
response =self.client.post('/ibms/login/',
{'username':'laspal', 'password':'abcd'})
def test_addIndustry( self
Hey I am able to run the test by using :
class IndustryTest(TestCase):
fixtures = ['/fixtures/initial_data.xml']
def setUp(self):
self.client = Client()
response =self.client.post('/ibms/login/',
{'username':'laspal', 'password':'abcd'})
def test_addIndustry( self
()
response =self.client.post('/ibms/login/',
{'username':'laspal', 'passwords':'abcd'})
print response
test case is as follows:
Loading 'initial_data' fixtures...
Installing xml fixture 'initial_data' from '/home/laspal/work/ibms/../
ibms/crm/fixtures'.
Installing xml fixture
ttest
from django.test import TestCase
class IndustryTest(TestCase):
def setUp(self):
self.client = Client()
response =self.client.post('/ibms/login/',
{'username':'laspal', 'passwords':'abcd'})
print response
I am still getting the error."""Your user
> More info here:http://www.djangoproject.com/documentation/testing/
>
> On Jul 1, 5:51 pm, laspal <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I am writing the test case but I am getting errors.
>
> > Test case is as follows:
>
> > import unittest
&g
):
self.client = Client()
response =self.client.post('/ibm/login/',
{'username':'laspal', 'password':'abcd'})
print response
Getting error :
Your username and password didn't match.
Please try again.
Username :
Password :
So
hi,
I am writting unit test for the views.
class IndustryTest(unittest.TestCase):
def setUp( self):
self.client = Client()
self.client.post('/ibm/login/', {' usrename' :'admin',
'password' : 'abcd'})
def test_addIndustry( self):
url = '/ibm/crm/industries/add/'
hi,
I have a list of employee and i want to sort it.
Employee( this is my header)
under which i have list of employee.
So now my question is on clicking employee header I want to change the
list.
Like it happens for user in django admin.
Please help me out.
Thannks.
Hi,
I have a model in which i have a function
class somemodel(models.Model)
def greater( self, num1, num2) :
if num1 > num2:
return True
else:
return False
In view function I am passing:
abcd = somemodel.object.all()
and in template i want to use greater function,
How can I use it.
hi,
my project is as follows.
project.app.candidate
url patter are as follows:
urlpatterns = patterns('',
(r'^project/app/', include('project.app.urls'))
for app it is:
urlpatterns = patterns('',
(r'^candidateprofile/',
Hi,
I have a form with the following field.
1)Title
2)Descriptions
3) No of person
3) Drop down box containing the previous filled form title..
Now my question is how to auto fill the form field when a user choose
any title from the drop down box.
I am doing that so that user can choose any
hi,
{% blocktrans with form.errors as err %} {{ err }}{% endblocktrans %}
for my login page gives me
__all__
* username password mismatch or does not exist..
I wanted to know how to display only * username and password does not
exist. I dont want to show
__all__ ...
Thanks.
Thanks a lot. Its works
On Mar 27, 8:33 pm, Peter Rowell <[EMAIL PROTECTED]> wrote:
> Specifically, you might look athttp://www.djangosnippets.org/snippets/9/.
>
> This allows you to do something like:
>
> {% expr candidate.vote_set.filter(vote='TU').count() as count %}
>
> and now
Thanks ..
On Mar 27, 1:15 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Thu, Mar 27, 2008 at 1:12 AM, django <[EMAIL PROTECTED]> wrote:
> > How do i convert {{ candidate.vote_set.filter(vote='TU').count()}} in
> > my view_candidate to work it properly
> > Right now it give me
Thanks a lot..
On Mar 27, 2:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Alternatively you can create a templatetag to accomplish this.
>
> On Mar 27, 3:14 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
> wrote:
>
> > On Thu, Mar 27, 2008 at 3:52 PM, django <[EMAIL PROTECTED]> wrote:
>
Hi,
I have a base template with with tabs like create user, edit user and
so on.
My base.html is as follows:
View User
Create User
Edit
User
quot;Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
> > On Jan 17, 2008 2:32 AM, laspal <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I wanted to know how can I load template without adding any
> > > functionality to it.
> > > Ba
Hi,
I wanted to know how can I load template without adding any
functionality to it.
Basically I just wanted to see how does my template looks.
MY view.py is :
from django.template.loader import get_template
from django.template import Context
def Main_Page(request):
t =
"James Bennett" <[EMAIL PROTECTED]> wrote:
>
> > On Jan 15, 2008 1:08 AM, laspal <[EMAIL PROTECTED]> wrote:
>
> > This:
>
> > > (r'^static/(?P.*)$', 'django.views.static.serve',
> > > {'document_root': '/home/laspal/trytemplate/Templ
Hi,
I am still not able to fix it.
Can u please let me know what should my should be depending upon the url.
Do I have to make any change in my setting.py file.
Thanks.
On Jan 15, 1:00 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Jan 15, 2008 1:08 AM, laspal <[E
import *
from django.conf import settings
urlpatterns = patterns('',
(r'^time/$', current_datetime),
(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': '/home/laspal/trytemplate/Template/',
'show_indexes' : True}),
)
if settings.DEBUG:
urlpatterns += patterns
69 matches
Mail list logo