You can create a model method (with no parameter) that can solve that, so
you can call it from the templates.
something like:
class MyObject(models.Model):
a = models.IntegerField()
b = models.Integerfield()
def miOperation(self):
return self.a + self.b
def miOtherOperti
also sprach Russell Keith-Magee [2014-11-24 07:16
+0100]:
> The right place is in the view.
[…]
> If you want to do "interesting" things like retrieve a specific
> file version, you're not going to be able to use the storage API,
> because most raw
Interesting perspective you have there, which I
On 2014-11-24 10:06, martin f krafft wrote:
> It could come from Git! After all, Git is really a database by
> itself, just like the filesystem could be viewed as a database.
[snip]
> Furthermore, I'd actually like to post-process the data. The Git
> repo would contain reStructuredText files and I'
On Mon, Nov 24, 2014 at 5:06 PM, martin f krafft
wrote:
> also sprach Russell Keith-Magee [2014-11-24
> 07:16 +0100]:
> > The right place is in the view.
> […]
> > If you want to do "interesting" things like retrieve a specific
> > file version, you're not going to be able to use the storage API
also sprach Tim Chase [2014-11-24 11:19 +0100]:
> urlpatterns = patterns('',
> url(r'^blob/([0-9a-f]{40})/$', 'myapp.views.render_blob', ...),
> )
… this is straight-forward, thanks. I'd probably try not to expose
the SHAs to the user but request from the Git library a blob
identified b
Hi
You should consider having a single Barcodeid table and have a one-to-many
relationship between the Hardwareid and Barcodeid.
François
> On Nov 24, 2014, at 1:43 AM, Bovine Devine wrote:
>
> Hello,
>
> I am creating hardware database webapp in django and I have a question for
> how to s
also sprach Russell Keith-Magee [2014-11-24 11:38
+0100]:
> Perhaps I wasn't clear.
No, you were. I am just pushing back a little bit because I come
from another angle and I greatly appreciate your explanations in
helping me understand the Django way of thinking. So in the hope
that you now don'
Thanks, the best bet is the raw query, because I actually need the Sum of
the method result for all the instances in the query...
2014-11-24 3:52 GMT-05:00 monoBOT :
> You can create a model method (with no parameter) that can solve that, so
> you can call it from the templates.
>
> something lik
You can also do that using the ORM instead of SQL, just instead of doing
the calls on the instanced model use a manager and do the calls on all the
objects in the database, something like this:
class Objectmanager(models.Manager):
def SumAB(self):
return sum([(obj.a + obj.b) for obj in
Ext.Ajax.request({
url: 'generate_birt/',
});
in view.py
def generate_birt(request):
url =
'http://10.2.114.2:8080/birt/frameset?__report=report/test.rptdesign&sample=my+parameter&__format=pdf'
return HttpResponseRedirect(url,mimetype='pdf')
following error throws
XMLHttpRequest
Hallöchen!
I have the following model structure:
class A(models.Model):
...
class Meta:
ordering = ["timestamp"]
get_latest_by = "timestamp"
class B(A):
class Meta(A.Meta):
abstract = True
class C(B):
...
Then, cla
Hi,
Django can do all of those things except the native android/ios apps.
Django specializes in websites and especially helpful for handling things
like logging in, querying a database, processing form input, and generating
html.
Here are some ways Django can help with your situation:
You coul
Hi,
Are the form fields in the html source (view source) and then getting
hidden using CSS or removed using JavaScript?
What does this output? {% if form %}Yes, there's a form{% else %}No form{%
endif %}
Collin
On Friday, November 21, 2014 11:33:16 AM UTC-5, Some Developer wrote:
>
> On 21/1
Hi Ian,
You may want to try opening an issue on django-consurrency showing the
error you're getting.
https://github.com/saxix/django-concurrency/issues
Thanks,
Collin
On Friday, November 21, 2014 6:16:14 PM UTC-5, ia...@me.com wrote:
>
> Hey everyone,
>
> One last try. I've given up on django
On 2014-11-24 11:49, martin f krafft wrote:
> also sprach Tim Chase [2014-11-24
> 11:19 +0100]:
> > urlpatterns = patterns('',
> > url(r'^blob/([0-9a-f]{40})/$',
> > 'myapp.views.render_blob', ...), )
>
> … this is straight-forward, thanks. I'd probably try not to expose
> the SHAs to the u
+1 for writing a single RWD (Responsive Web Design) web app
using Django, instead of writing separate web, Android and iOS
apps.
If necessary, wrap the result in PhoneGap to mobile-specific
features, uploading images from the camera, capturing the
GPS location, showing maps, accessing the local f
>Hence I was thinking: how much trouble would it be to have Django
>reach into Git rather than its database and obtain data there to be
>filled into template slots? Ideally, there'd be the possibility of
>running a filter (e.g. reStructuredText) between Git and the
>template rendering.
>What
Arg, Google Groups' mobile interface sucks for posting rather than reading.
As I was trying to say:
On Tuesday, November 25, 2014 2:43:55 AM UTC+7, reduxionist wrote:
>
> >Hence I was thinking: how much trouble would it be to have Django
> >reach into Git rather than its database and obtain data
Hallöchen!
We use crawlers, which in our case a Python scripts that read data
from disk and send a lot of HTTP POST requests to the Django
deployment. The POST requests hit the same URLs/Views that are also
used by the browser to edit something with a web .
If I activate the CSRF middleware, doe
Hi Torsten,
On 11/24/2014 01:00 PM, Torsten Bronger wrote:
> We use crawlers, which in our case a Python scripts that read data
> from disk and send a lot of HTTP POST requests to the Django
> deployment. The POST requests hit the same URLs/Views that are also
> used by the browser to edit someth
From
http://stackoverflow.com/questions/27113466/how-can-i-deploy-django-gunicorn-under-apache-proxy
:
've run through the documentation and am hitting the same pages over and
over again. At present I've found documentation to run off an existing
myapp.wsgi file, but documentation for how to make
Hi,
On 11/24/2014 02:19 PM, Christos Jonathan Seth Hayward wrote:
> From
> http://stackoverflow.com/questions/27113466/how-can-i-deploy-django-gunicorn-under-apache-proxy
> :
>
> 've run through the documentation and am hitting the same pages over and
> over again. At present I've found documenta
Ok; wonder if I should upgrade Django.
I just ran a startproject earlier today (I can re-create it; I was just
trying to get it running and see the start page in my browser before going
further).
cjsh@ps306627:~/cynthia$ find . -name \*.wsgi
cjsh@ps306627:~/cynthia$ python manage.py shell
Pytho
On 11/24/2014 02:38 PM, Christos Jonathan Seth Hayward wrote:
> Ok; wonder if I should upgrade Django.
>
> I just ran a startproject earlier today (I can re-create it; I was just
> trying to get it running and see the start page in my browser before going
> further).
>
> cjsh@ps306627:~/cynthia
Thanks so much!
Could you confirm the invocation?
cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:
usage: gunicorn [OPTIONS] [APP_MODULE]
gunicorn: error: No application module specified.
cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi:application 0.0.0.0:
usage: gunicorn [OPTIO
On 11/24/2014 02:56 PM, Christos Jonathan Seth Hayward wrote:
> Thanks so much!
>
> Could you confirm the invocation?
>
> cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:
>
> usage: gunicorn [OPTIONS] [APP_MODULE]
>
> gunicorn: error: No application module specified.
That's the righ
On 11/24/2014 03:00 PM, Carl Meyer wrote:
> On 11/24/2014 02:56 PM, Christos Jonathan Seth Hayward wrote:
>> Thanks so much!
>>
>> Could you confirm the invocation?
>>
>> cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:
>>
>> usage: gunicorn [OPTIONS] [APP_MODULE]
>>
>> gunicorn: error:
And with that, I'm off and running!
Thank you for your help.
On Mon, Nov 24, 2014 at 4:05 PM, Carl Meyer wrote:
> On 11/24/2014 03:00 PM, Carl Meyer wrote:
> > On 11/24/2014 02:56 PM, Christos Jonathan Seth Hayward wrote:
> >> Thanks so much!
> >>
> >> Could you confirm the invocation?
> >>
> >
When writing a test to just try and create an object from my model I get
the following error:
line 10, in test_saving_and_retrieving_fishtypes
test2.save()
AttributeError: 'FishType' object has no attribute 'save'
tests.py
from django.test import TestCase
from trip.models import FishTy
Never mind I need some sleep I named my TestCase with the same name as my
model... I can't believe I didn't see that.
class FishType(TestCase):
On Monday, November 24, 2014 2:31:33 PM UTC-8, Detectedstealth wrote:
>
> When writing a test to just try and create an object from my model I get
> th
On Saturday, November 22, 2014 4:46:56 AM UTC-5, Fabio Caritas Barrionuevo
da Luz wrote:
>
> I was trying to answer a question in a Brazilian forum about django.
>
> one of the proposed solutions utilized the function locale.setlocale()
> from locale module.
>
> according to the documentation[1
Somehow recently the character causing the logging problem is one of
many which are working well in the browser. They are unicode subscripted
numbers for example, \u2083 is subscripted "3".
But in logging under Python 3.4 it causes
--- Logging error ---
Traceback (most recent call last):
Fil
On Mon, Nov 24, 2014 at 7:43 PM, martin f krafft
wrote:
> also sprach Russell Keith-Magee [2014-11-24
> 11:38 +0100]:
> > Perhaps I wasn't clear.
>
> No, you were. I am just pushing back a little bit because I come
> from another angle and I greatly appreciate your explanations in
> helping me u
Hi,
Use form.cleaned_data instead of request.POST, because form.cleaned_data
will property convert strings into decimals or None.
codpozo = form.cleaned_data['codpozo']
But again, use a ModelForm. it's super easy:
class PozoForm(forms.ModelForm):
class Meta:
model = Pozo
fi
Hi,
I certainly am learning something new about .
However, it may be that that trick simply doesn't work correctly for file
fields. My question is: _does_ it work correctly when the is a
child of the ?
Collin
On Saturday, November 22, 2014 1:21:32 PM UTC-5, Abhishek Batra wrote:
>
> Hey Dona
Also, in case you haven't seen it, the official django tutorial is amazing.
https://docs.djangoproject.com/en/dev/intro/
On Saturday, November 22, 2014 10:42:13 AM UTC-5, Mosharof sabu wrote:
>
> hi
> i a going to start django on ubuntu . can any one please give me
> some link of good tut
also sprach Russell Keith-Magee [2014-11-25 01:16
+0100]:
> Sure - that could work too. Although I'd question why you'd do
> this, rather than just checking out the relevant hash onto the
> filesystem, and doing a direct filesystem read.
Yeah, and I think you have me 99.5% convinced that I want
My question is explained in detail here:
http://stackoverflow.com/questions/27114947/how-to-do-db-memcaching-in-django-with-derived-data
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails fr
the problem was i use python2.6 with django 1.7 and when install django 1.6
problem solved
--
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
I'm messing around with testing many Github forks of the emencia
newsletter app, looking for one I like. In the meantime (and as I'm
likely to continue switching around for a while), I'd like not to have
to commit code that points at the different names of the different apps:
they all have the same
40 matches
Mail list logo