Ah, turns out all you have to do is specify -
fixtures = [ 'initial_data' ]
... in the TestCase and it'll load all the initial_data fixtures from
all apps. Still a bit odd that loading initial_data fixtures isn't the
default in tests though.
On 3 October 2013 16:49, Sam Lai wrote:
> I'm try
Hello everyone was requesting for help on this micro-finance software am
developing, needed to make the account balance reflect updated
amount/value on the database when deposits/withdraws are made on either the
account or loan repayment
*class Branch(models.Model):*
time_stamp =model
Maurice,
please remember not everyone on this ML knows finance and noone knows your
application but you.
Moreover, people on ML cannot spend hours trying to figure out what is your
problem: sometimes just solving the problem needs a lot of work, so make
things easy.
You posted your models, but I
Hello everyone was requesting for help on this micro-finance software am
developing, needed to make the account balance reflect updated
amount/value on the database when deposits/withdraws are made on either the
account or loan repayment
*class Branch(models.Model):*
time_stamp =model
The report can't be reporduced later on - as the data is constantly
changing, so I need to store the result.
Storing the data on which the report is based is very complex and would be
too expensive regarding storage space just for this purpose.
But I also have now found how to use StringIO an
I have now created a test view that basically does what I want:
def reporting_new(request):
output = StringIO.StringIO()
book = Workbook(output)
sheet = book.add_worksheet('test')
sheet.write(0, 0, 'Hello, world!')
book.close()
# construct response
output.seek(0)
Hi,
Here is an example of using XlsxWriter from SimpleHTTPServer or Django. It
probably doesn't do 100% of what you are looking for but it may help anyway.
https://xlsxwriter.readthedocs.org/en/latest/example_http_server.html
John
--
You received this message because you are subscribed to
hai everyone!!
im a beginner to django,dont have prior knownledge about django!!
Help me step by step,rit frm installation!
for ur ref im using windows 7! dont have any open source,so help me with
windows process
--
You received this message because you are subscribed to the Google Groups
"
>
> Hi Mark,
>
Interesting if you finally have found some solution or not?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroup
I've been trying to reduce some code in a new project, and I have a
number of objects where I have the main class, and an archival
version of the same class, something like
def Thing(Model):
last_updated = DateTimeField(...)
who_updated = ForeignKey(User)
field1 = ...
field2 = ..
Hey champ!
Watch this video on installation on windaz
www.youtube.com/watch?v=rIVwVOpwpsA
Then tackle this tutorial
https://docs.djangoproject.com/en/dev/intro/tutorial01/
On 3 October 2013 20:20, Manimaran R wrote:
> hai everyone!!
>
> im a beginner to django,dont have prior knownledge about
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
V
I disagree that breaking the back button is always bad. For example suppose
you have a series of forms (i.e. a "wizard"):
Page 1) fill in form. On POST creates a new Model() and saves it to the
database
2) do stuff to the object (e.g. add inlines, whatever).
3) whatever comes next
At stop t
Hi guys.
I'm here with a problem that does not quite know how to solve.
I have this query:
result = json.dumps([a.get_json() for a in
Player.objects.filter(name=namepost)])
But now I want to return the result with paging, and do not really know how
to do ... I've been seeing in the documentatio
Hi Hélio,
It looks like you're applying pagination to the rendered JSON string itself.
You want to be paginating the queryset itself.
queryset = Player.objects.filter(name=namepost)
paginator = Paginator(queryset, 20)
return json.dumps([item.to_dict() for item in paginator.object_list
I'm doing this:
*queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 20)*
*return json.dumps([item.get_json() for item in paginator.object_list])*
And my Document is thus:
http://plnkr.co/edit/FHH2hZh26OiLMKTk2ToO
But it gives me the following error:
'st
Already got it, I did so:
*queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 1)*
*return HttpResponse(json.dumps([item.get_json() for item in
paginator.object_list]) , content_type='application/json')*
But I return all the records ... I should not retur
Already got it, I did so:
*queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 2)*
*return HttpResponse(json.dumps([item.get_json() for item in
paginator.object_list]) , content_type='application/json')*
But I return all the records ... I should not retur
Better to say:
*queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 2)
page = request.GET.get('page')
try:
players = paginator.page(page)
except PageNotAnInteger:
players = paginator.page(1)
excep
Try this (I have not tried the code myself, but I think that it should
work):
*queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 2)
page = request.GET.get('page')
try:
players = paginator.page(page)
except PageNotA
You can certainly write a custom filter. And if you do that, you can divvy
up your value into footnote links and other, and escape the other parts
yourself, returning the result as a safe string.
On Thu, Oct 3, 2013 at 2:55 AM, Mike Dewhirst wrote:
> I made a custom template filter (ref_href)
doing so:
*queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 2)*
*
*
*page = request.GET.get('page')*
*try:*
*players = paginator.page(page)*
*except PageNotAnInteger:*
*players = paginator.page(1)*
*exc
On 10/03/2013 04:13 PM, Roberto López López wrote:
> *return HttpResponse(json.dumps([players]) ,
> content_type='application/json')*
better without the square brackets
*return HttpResponse(json.dumps(players) ,
content_type='application/json')*
--
Roberto López López
System Developer
Paral
thus still giving the same error
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to
I have a django model:
class Person(models.Model):
Modelo criado com referencia ao modelo remoto """
name = models.CharField(max_length=300)
age = models.PositiveIntegerField()
born = models.DateField()
I want to group all the people by birthday (group by born date). I'm t
Am creating this project in that a client has an account in a micro-finance
and can also Take Loans which loan is credited onto this very account.
The problem is am trying to find a way of having an Account_balance which
will be changing when deposits and withdrawals are made to the account
and a
Thanks for the help guys, I managed to solve, so I did:
* queryset = Player.objects.filter(name=namepost)*
*paginator = Paginator(queryset, 2)*
*
*
*try: *
* page = int(request.POST.get('page','1')) *
*except ValueError: *
* page = 1 *
*try:
Use one model with a field to indicate whether or not this is the archival
(backup?) version. This could be your original_id field, which might be
better represented as a null-able foreign key field on self. Update step:
delete any instances whose "original" is this field (the reverse
refere
work through the tutorial.
Cheers, Nigel
07914 740972
On 3 October 2013 13:28, jasvir sandhu wrote:
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email t
Hi Leonardo. managed to make the implementation of the cart. not used the
card but django django carton. There are the same but they are similar.
veleu for help. I'm passing the objects by post. Thanks for the help.
Em 02/10/2013 04:10, "Leonardo Giordani"
escreveu:
> Hi Ricardo,
>
> well this is
First of all, i suggest you start working in django in a virtualenv. This
helps as you can have your own virtual env for installing additional django
modules. if you want to host and check it on the web, i suggest you
checkout this page :
https://devcenter.heroku.com/articles/getting-started-with-d
Use signals:
https://docs.djangoproject.com/en/dev/topics/signals/
post_save check the amount deposited or withdrawn and update the balance
On Thursday, October 3, 2013 9:42:48 AM UTC-5, MAurice wrote:
>
> Am creating this project in that a client has an account in a
> micro-finance and can als
I have a MySQL server with hundreds of dbs... is there a way to be able to
connect to all these without breaking DRY principles?
On Friday, 2 August 2013 14:26:23 UTC+1, Christian Schmitt wrote:
>
> You could use django's inbuild ORM:
> https://docs.djangoproject.com/en/dev/topics/db/multi-db/
>
Thanks for the update and the code. Been trying to make sense of the code
and trying to get it to work. This is my first project so I still have some
challenges:
- My model contains a field examperiod = models.CharField(max_length =
100) which I need to use to filter. How exactly do I ap
Have someone figure it how can someone deploy Django 1.5 with Python 3.3 on
Windows Server 2008 R2? Because i search internet i think 4 months ago, and
i didnt found anything working. So How can it be done?
--
You received this message because you are subscribed to the Google Groups
"Django us
Hi,
My custom user model requires unique email addresses, which are the users'
identifiers.
My user registration modelform works great. If a user tries to register
with an email that is already in the system, the form fails to validate and
the 'unique' invalid message is displayed back to the
I think when they hit the browsers back button, the form will have the
data they entered previously. When they submit it, since it was
already submitted previously, you could just make it an edit action,
or do whatever is appropriate given that they are submitting the same
form again. I think the
Hi Alexander,
Although I no longer use captcha on the form in question anymore, I recall
that I did eventually get it working by adding something like the following
in my html to generate the captcha component:
{{ signup_form.captcha.label
}}
{{ signup_form.captcha }}{{
signup_form.ca
On 4/10/2013 12:21am, Bill Freeman wrote:
You can certainly write a custom filter. And if you do that, you can
divvy up your value into footnote links and other, and escape the other
parts yourself, returning the result as a safe string.
So you mean I detect any non-footnote html in the custom
On Thu, Oct 3, 2013 at 6:15 AM, graeme wrote:
> I disagree that breaking the back button is always bad. For example suppose
> you have a series of forms (i.e. a "wizard"):
>
> Page 1) fill in form. On POST creates a new Model() and saves it to the
> database
> 2) do stuff to the object (e.g. add i
Hello,
I'm battling with Django in order to try avoiding object persistence when
initialising foreign key model attributes. The app I'm using Django for
implements a facade for an already existing database. It's main purpose is
to be used as a (read-only) ReST server returning objects built by
On 4/10/2013 9:44am, Mike Dewhirst wrote:
On 4/10/2013 12:21am, Bill Freeman wrote:
You can certainly write a custom filter. And if you do that, you can
divvy up your value into footnote links and other, and escape the other
parts yourself, returning the result as a safe string.
So you mean I
42 matches
Mail list logo