merge data from multiple models

2012-07-30 Thread Joris
Dear list,

Apologies in advance if this is a FAQ. I did extensive searching through 
this list and the django docs but have not been able to find a solution.

I'm trying to display data from a postgres backend into a HTML table. Most 
of this data comes from a single table. Some columns however come from a 
highly complex raw SQL query that is very CPU-expensive to run. The two 
datasets cannot be combined into a single model for performance reasons. 
Both models do however have an identical unique field .  
 
As templates cannot do lookups into a dictionary or DB object, I now resort 
to doing a nested 'for' loop, where the template cycles through the whole 
dataset of model 1 for every record of model 2. Then if the unique field 
obtained from model 2 is found in model 1, the other valeus from model 1 
are displayed. Below is the current code I use.  
This sounds hopelessly inefficient. Would someone be able to point me to a 
method  to make this more logical?

Many thanks

Joris

  {% for GROUP in GROUPS %}

{{ GROUP.grnummer}}
 {% for FIN in FINISH %}
   {% if FIN.grnummer = GROUP.grnummer 
%}{{FIN.synthesis_finish}}{% endif %}
 {% endfor %}


   

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/tqaZqXWURo0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: MySQL total overheat (somewhat complex database)

2012-07-30 Thread Joris
If all you do is select data from this set, is by creating the view 
directly in MySQL, either in 1 or in multiple nested views (subselect or 
independent views), and using that view as a backend for the django model. 
This makes optimization easier. 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/HUQHfhGi01oJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: merge data from multiple models

2012-07-30 Thread Joris
Thank you

but that still makes me end up with two models (GROUPS and FINISH), 
although now both have the same records and are in the same order. When it 
comes to template rendering I still need a nester for loop yes? 
I suppose faking a foreign key relation in the FINISH model (which is the 
CPU intensive one) toward the GROUPS model will allow direct linking, but 
that generates an independent SQL lookup for each record, even with 
select_related turned on afaik.


 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/eEp1kp3OzWEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: merge data from multiple models

2012-07-30 Thread Joris


On Monday, July 30, 2012 3:52:31 PM UTC+2, Melvyn Sopacua wrote:
>
>
> If this is not implemented as a OneToOneField, then do so. You can then 
> access the related object in the same way as the reverse of a ForeignKey 
> and use related_name to make this more intuitive. 
>
 
Yes that works great. Thanks!!


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/MeGS9zbYQfwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: merge data from multiple models

2012-07-31 Thread Joris

> Hmm, I guess I'm missing the "real world use case" for this. Most 
> importantly, I'm missing how this slow model relates to the fast model 
> and what kind of query it is executing. I'm especially curious about the 
> "as this statement is executed as an instance of the model" bit. 

Ok, I'll try to explain this better. The fast model is coupled directly to 
a table. The Slow model is not, it is activated by a specific sql query 
that depends on a specific condition.
AFAIK to get data from the slow model, I do:
SLOMO = SlowModel.objects.raw( SQLstatement ,[CONDITION]) 

However, if I set the primary_key of SlowModel to OneToOne (pointing to 
FastModel), as suggested above, and try to retreive SlowModel data from 
FastModel  (FastModelInstance.slow) I get an error that data is missing. My 
guess was that this was because I did not manage to tell the instance of 
Fastmodel that it first needs to pass the SQL to its SlowModel connection 
before I can ask it questions.

#---
class FastModel(models.Model):
idgroup = models.IntegerField(primary_key=True)
field1 = models.IntegerField()
field2 = models.CharField(max_length=250, blank=True)
field3 = models.CharField(max_length=250, blank=True)
class Meta:
db_table = u'my_db_table'
   
class SlowModel(models.Model): 
rid_fastmodel = models.IntegerField(primary_key=True) 
calcfield1 = models.TextField(blank=True)
calcfield2= models.TextField(blank=True)

SQLstatement = "SELECT rid_fastmodel, calcfield1, calcfield2 from (SELECT 
) JOIN (...) JOIN (...) WHERE some_condition = %s"

Is this better?

thanks
joris

 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TPkzlZJ7NfkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Thoughts on web2py?

2012-08-06 Thread joris


I actually decided to base my project on web2py rather than django but 
decided on django at te very last minute. The reason I originally chose 
web2py is the agility and flexibility of the generated SQL. Django 
favours simplicity over speed, meaning you develop very fast but the SQL 
is rather bloated.


The reasons I chose django in the end were that nearly all answers on 
the web2py user list came from the lead developer, suggesting a small 
community that pivots around a single person. ReiserFS came to mind at 
the time. Django has a larger user base, meaning the chance it'll be 
around in 5 years time is bigger. A second argument was that 
documentation for django is simply more extensive and the user forum 
(this forum) is really useful.


best
joris

On 05/08/2012 17:13, Marcin Tustin wrote:

Implement a basic version of your site in django.

Django has a fair bit of structure, to allow you to focus on the 
business logic, rather than the plumbing. Be prepared to get used to 
not having to manage the nitty gritty of a lot of things.


On Sun, Aug 5, 2012 at 11:01 AM, Alec Taylor <mailto:alec.tayl...@gmail.com>> wrote:


I've been playing around with web2py the past few months, even
open-sourced an event-site (aka meetup.com <http://meetup.com>)
which I wrote with it.

Now I might be starting a job where all I'll be doing is
Django—probably GeoDjango + Pinax—and was wondering a few things:

1. Apart from following the tutorial, what else should I do to
learn Django?
2. What are your thoughts on web2py?

I will listen to reasons, e.g.: if you think I shouldn't look back to
web2py for other projects and stick with Django for all my future
projects.

Thanks for all suggestions,

Alec Taylor



--
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django auth against local users

2012-08-13 Thread Joris
Dear list 
I've seen a number of differnent auth backends for django, but for some 
reason could not find a way to have Django auth against the local system 
users on the local machine (e.g. /etc/passwd). In my case Django is running 
on an intranet site (CentOS6) that is also connected to windows AD. My aim 
is to add users in the default Django model, but have django do password 
verification against the local system (I guess that means PAM). This way 
users only need to change their password once, and locked-out users from AD 
are auto-disabled from the django-site. Additional bonus would be if Django 
understands the AD groups.
I know there is an LDAP backend for django but I just cannot manage to get 
it to work against windows 2003 AD. Being able to auth against local user 
(and have the OS/samba deal with the AD integration) would be much easier. 
Does anyone have any pointers?

many thanks
joris

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/EiybzBmNEWEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django auth against local users

2012-08-13 Thread Joris


>
> You keep saying "local machine". Do you mean the machine the user is 
> browsing from? That's not possible, for what should be obvious security 
> reasons. 
> --
> DR.
>

No that would indeed be silly. By local machine I mean local to the django 
install: i.e. the server. I figured that was obvious, so apologies for the 
unclarity.

JB

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/kgMJfzZiaIIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: calling perl script from HTML on submit button

2012-08-14 Thread Joris
On Tuesday, August 14, 2012 7:15:45 AM UTC+2, Pervez Mulla wrote:
>
> Thank you for your time and concern,
>
> Actually the entire back-end is in perl so, Am using Django for front-end. 
> So am asking is there any why to call perl objects in python .
>

You can always use subprocess() to run perl scripts, but I guess that is as 
far as it goes 

JB

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/XSbAHwqidzAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Joris
The DocumentRoot directive is missing from the httpd.conf, indicating you 
did not send all the required data. This may be because your attachment is 
incomplete: 

There is an include statement in your httpd.conf: "Include 
/etc/apache2/conf.d/*.conf"
All files from that conf.d folder are also processed. Please look in files 
located in  /etc/apache2/conf.d/ for anything useful. Especially files that 
contain a documentroot directive

Also, it may help if you post the output of
apachectl -S 
(note: some distros want apache2ctl instead of apachectl)

jb



On Monday, August 20, 2012 11:30:49 AM UTC+2, stikic wrote:
>
> httpd.conf file is in the attachment. 
>
> 2012/8/20, Joseph Mutumi >: 
> > Hello, 
> > 
> > Could you post the VirtualHost configuration for Apache? 
> > That would greatly help us help you. 
> > 
> > Regards 
> > 
> > On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç 
> > > 
> wrote: 
> > 
> >> Hello, 
> >> 
> >> I read the article below. 
> >> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ 
> >> 
> >> But still http://localhost redirects to 
> >> /var/www/localhost/htdocs/index.html. 
> >> I want http://localhost/ redirescts to /home/seyfullah/django/mysite. 
> >> How can I do this? 
> >> 
> >> -- 
> >> SEYFULLAH TIKIÇ 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups 
> >> "Django users" group. 
> >> To post to this group, send email to 
> >> django...@googlegroups.com. 
>
> >> To unsubscribe from this group, send email to 
> >> django-users...@googlegroups.com . 
> >> For more options, visit this group at 
> >> http://groups.google.com/group/django-users?hl=en. 
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
> > 
> > 
>
>
> -- 
> SEYFULLAH TIKIÇ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/KkXJTQwbtYwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: new to django

2012-08-21 Thread Joris


On Tuesday, August 21, 2012 1:08:04 PM UTC+2, Dhilip wrote:
>
> Hello,
>
> Got struct means you got any error or don't know what to do after that 
> Just follow the tutorial, read out each and every line in the document. 
> >
>

also make sure you are following the tutorial related to the Django version 
you are using! Google tends to redirect you to the /dev/ version of the 
tutorial with is incompatible with django 1.3

jb



 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Z6C1FHT3a0cJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-23 Thread Joris


Op woensdag 22 augustus 2012 23:05:03 UTC+2 schreef stikic het volgende:
>
> Then do I have to delete 00_default_vhost.conf file?
> What name can I give to this new created file? 
>
> Well you have not referred or included 00_default_vhost.conf in your 
httpd.conf so this file is not actually read by the web server! This is 
confirmed in your output of apache2ctl -S. 
Together with the observation that there is no "NameVirtualHost" OR a 
"DocumentRoot"  directive in the httpd.conf you supplied, suggests you 
either are not supplying us with all the config info you have OR you have a 
really weird apache set up. Anyway, your issue is clearly with Apache and 
not Django, so it  may be better if you ask these questions in a dedicated 
forum.

jb

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0jfFwWZsQckJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django project and SVN loads older code versions

2012-09-25 Thread Joris
The reason why you are seeing this behaviour is because apache caches the 
compiled python scripts. As apache has multiple threads, some still carry 
old information, and some new. As HTTP is stateless, this is why you get 
inconsistent behaviour. The situation is resolved by either reloading 
apache or by using the testing server. The behaviour you describe cannot be 
a result of SVN, as SVN is not affected upon refresh. 

jb

Op dinsdag 25 september 2012 14:19:04 UTC+2 schreef Leo het volgende:
>
> Let me understand: you commit code to a SVN repository and put in in 
> production? Did you restart Apache?
>
> Leo
>
> 2012/9/25 Gjorge Karakabakov >
>
>> I can't explain it but Django + SVN for code version control loads older 
>> buggy versions of files every time i hit refresh on the web site i'm 
>> working on.
>>
>> So if I changed something in a file 2 days ago (made lots of commits 
>> since then) it will show up now. Next time I hit refresh another change 1 
>> day ago appears.
>>
>> I'm using: Django 1.4, Apache, SVN
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/4UNbERN1NxoJ.
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Leonardo Giordani
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/_VNa1jNVVDEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: select_related problems

2015-05-19 Thread Joris


Ok please excuse my message, I found there was a comma missing somewhere 
betwen different select_related parameters.


J


I have problems with the use of select_related.

I have two models where one model keeps language independent data, and
the other keeps translations in various languages.

class Model()
 company = ForeignKey(Company, null=True, blank=True)

 def getCompanyName(self):
 return (self.company and self.company.name) or 'N/A'

class ModelTrans()
 parent = ForeignKey(Model)
 language = ForeignKey(Language)


Then I query on the translation table and use select_related to reduce
the query count to 1:

objs = ModelTrans.objects.filter(language__code =
'en').select_related('parent__company')

for obj in objs:
   obj.parent.getCompanyName()

I noticed a lot of queries to the database, started investigating and
found that for every obj in the loop another query is made to the
Company table, even though it is in select_related.
Any idea why?

Could this potentially be because the 'company' table gets read from the
Model object and not from the ModelTrans object, from where it was 
queried?


I make extensive use of select_related and would say that it works well
in 90% of the cases, yet in some it's failing on me.

I'm with Django 1.5.

Thanks
Joris



--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/555B8DA3.1080906%40promani.be.
For more options, visit https://groups.google.com/d/optout.


select_related problems

2015-05-19 Thread Joris

I have problems with the use of select_related.

I have two models where one model keeps language independent data, and
the other keeps translations in various languages.

class Model()
 company = ForeignKey(Company, null=True, blank=True)

 def getCompanyName(self):
 return (self.company and self.company.name) or 'N/A'

class ModelTrans()
 parent = ForeignKey(Model)
 language = ForeignKey(Language)


Then I query on the translation table and use select_related to reduce
the query count to 1:

objs = ModelTrans.objects.filter(language__code =
'en').select_related('parent__company')

for obj in objs:
   obj.parent.getCompanyName()

I noticed a lot of queries to the database, started investigating and
found that for every obj in the loop another query is made to the
Company table, even though it is in select_related.
Any idea why?

Could this potentially be because the 'company' table gets read from the
Model object and not from the ModelTrans object, from where it was queried?

I make extensive use of select_related and would say that it works well
in 90% of the cases, yet in some it's failing on me.

I'm with Django 1.5.

Thanks
Joris

--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/555B88C3.70801%40promani.be.
For more options, visit https://groups.google.com/d/optout.


Re: Django and Jquery UI

2015-05-20 Thread Joris


Hi Robert

Could you please specify more clearly how you "added jqueryui to my 
settings.py" ?
It should be handled like any other static file and doesn't really have 
a place in settings.py

Do your other static files (images, css, etc) load?

Best

Seems tough to get the Jquery UI code to do anything like on 
Jquery.com Im using there demos just to get my feet wet ive already 
added jqueryui to my settings.py


I already did collectstatic


I added the draggable demo to an html template created the view it 
shows on the page but does not allow me to drag I added {% load 
staticfiles %}



Any Ideas on why

Thanks
Robert
--
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 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAmfpZ0RkfL4t44TtstbD0Ljp95_yVnGvnF4E%3D7mYgMYSh1Lgg%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/555C5BA8.6080004%40promani.be.
For more options, visit https://groups.google.com/d/optout.


M2M frustration

2014-05-17 Thread Joris

Dear all, please help me with this unsolved mystery.

Error: "Cannot resolve keyword u'' into field. Choices 
are: "



1) Error in admin
In the admin it only happens when DEBUG=True. Works perfectly when 
DEBUG=False.
The error occurs when opening the form view of the model that has the 
M2M field.


2) In code
Here the error is also present when DEBUG=False.
The error occurs when accessing the model field, field, for example 
self.my_m2m_field.all()



The error doesn't happen locally on the Django/Python debug server. On 
the testing server, which is Apache2 + wsgi, it does occur. The versions 
of Python  (2.7) and Django (1.5.7) are the same on both computers.
The result is that a fellow developer is accusing me of being neglective 
with testing the code before uploading it :-(


There have been people with similar problems, but it has never been solved:
https://groups.google.com/forum/#!topic/django-users/E4UVZHf6kP8
http://stackoverflow.com/questions/19145787/fielderror-cannot-resolve-keyword--into-field
http://chase-seibert.github.io/blog/2010/04/30/django-manytomany-error-cannot-resolve-keyword-xxx-into-a-field.html
http://code.djangoproject.com/ticket/1796 (7 year old django bug which 
is reported fixed but in fact is not)



So it seems to be a bug deep down in Django.
This makes the use of M2M fields impossible for my application, which is 
quite a problem.


Instead of trying to find the bug in Django, would anyone have any clue 
why it does work on the Python debug server and not on Apache2?



Thank you!
J

--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53778C68.4060102%40promani.be.
For more options, visit https://groups.google.com/d/optout.


Re: M2M frustration

2014-05-18 Thread Joris


Dear Mark,

Thanks for your suggestion.

Yes, more or less, I've been playing with the order but the models are 
so complex with lots of overrides and many fields that it's hard to keep 
track. Also the Python/Django backtrace is useless here.


I just find it so curious that all of this doesn't happen on the Python 
debugging webserver...


Joris




op 18-05-14 21:41, Mark Phillips schreef:


Jorris,

Have you tried changing the order of imports in your model? From a 
quick read of the references, that helped some folks.


Mark

On May 17, 2014 9:24 AM, "Joris" <mailto:jmailli...@promani.be>> wrote:


Dear all, please help me with this unsolved mystery.

Error: "Cannot resolve keyword u'' into field.
Choices are: "


1) Error in admin
In the admin it only happens when DEBUG=True. Works perfectly when
DEBUG=False.
The error occurs when opening the form view of the model that has
the M2M field.

2) In code
Here the error is also present when DEBUG=False.
The error occurs when accessing the model field, field, for
example self.my_m2m_field.all()


The error doesn't happen locally on the Django/Python debug
server. On the testing server, which is Apache2 + wsgi, it does
occur. The versions of Python  (2.7) and Django (1.5.7) are the
same on both computers.
The result is that a fellow developer is accusing me of being
neglective with testing the code before uploading it :-(

There have been people with similar problems, but it has never
been solved:
https://groups.google.com/forum/#!topic/django-users/E4UVZHf6kP8
<https://groups.google.com/forum/#%21topic/django-users/E4UVZHf6kP8>

http://stackoverflow.com/questions/19145787/fielderror-cannot-resolve-keyword--into-field

http://chase-seibert.github.io/blog/2010/04/30/django-manytomany-error-cannot-resolve-keyword-xxx-into-a-field.html
http://code.djangoproject.com/ticket/1796 (7 year old django bug
which is reported fixed but in fact is not)


So it seems to be a bug deep down in Django.
This makes the use of M2M fields impossible for my application,
which is quite a problem.

Instead of trying to find the bug in Django, would anyone have any
clue why it does work on the Python debug server and not on Apache2?


Thank you!
J

-- 
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
<mailto:django-users%2bunsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/53778C68.4060102%40promani.be.
For more options, visit https://groups.google.com/d/optout.

--
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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com>.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEqej2Oarfwzoy7Pi%3Dk01pBD9a6TiyQnUbuSaEXSfPW8exug-Q%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAEqej2Oarfwzoy7Pi%3Dk01pBD9a6TiyQnUbuSaEXSfPW8exug-Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/537956B2.80809%40promani.be.
For more options, visit https://groups.google.com/d/optout.


Re: M2M frustration

2014-05-20 Thread Joris


Hi Russell,


Very interesting, now everything makes sense.
And thank you for the suggested solution, we tried it today and it works 
now, no more random import hell.

Looking forward to Django 1.7.

Best
Joris



op 19-05-14 06:00, Russell Keith-Magee schreef:

Hi Joris,

It's an edge case, but there are a small number of circumstances where 
it is possible to get different behaviour in the development server vs 
Apache/production. The problems usually stem from import side effects, 
especially those caused by circular references in imports.


The reason these bugs manifest is that the startup sequence for Django 
(pre 1.7) isn't strictly controlled. In development, there is a 
predictable startup order -- the validate management command is 
executed as part of starting the development server, and this validate 
step does a predictable import of all models modules. However, in 
production, validate isn't run (after all, it shouldn't be needed); so 
the way certain references are resolved is affected by the way that 
the first queries are issued. It is therefore theoretically possible 
to end up with subtle differences in FK and M2M resolution between 
development and production.


The immediate fix - put a manual call to the validate management 
command in your WSGI file. This will add a slight startup overhead to 
the first request, but will result in a predictable startup order. 
Graham Dumpleton explains how (and some of the why) in this blog post:


http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

(The other solution is to simplify your module structure so that the 
problem circular references don't exist - but it's a lot harder to 
point at a simple fix. Over the years, we've spent a lot of time 
resolving issues with model references, and we've fixed all the 
problems we're aware of… but it's the nature of edge cases to be hard 
to track down)


The good news is that in Django 1.7 (soon to be released), this sort 
of bug shouldn't happen. Django 1.7 has a predictable startup order, 
regardless of whether you're in production or development.


I hope this helps.

Yours,
Russ Magee %-)

On Mon, May 19, 2014 at 2:56 AM, Joris <mailto:jmailli...@promani.be>> wrote:



Dear Mark,

Thanks for your suggestion.

Yes, more or less, I've been playing with the order but the models
are so complex with lots of overrides and many fields that it's
hard to keep track. Also the Python/Django backtrace is useless here.

I just find it so curious that all of this doesn't happen on the
Python debugging webserver...

Joris




op 18-05-14 21:41, Mark Phillips schreef:


Jorris,

Have you tried changing the order of imports in your model? From
a quick read of the references, that helped some folks.

Mark

On May 17, 2014 9:24 AM, "Joris" mailto:jmailli...@promani.be>> wrote:

Dear all, please help me with this unsolved mystery.

Error: "Cannot resolve keyword u'' into
field. Choices are: "


1) Error in admin
In the admin it only happens when DEBUG=True. Works perfectly
when DEBUG=False.
The error occurs when opening the form view of the model that
has the M2M field.

2) In code
Here the error is also present when DEBUG=False.
The error occurs when accessing the model field, field, for
example self.my_m2m_field.all()


The error doesn't happen locally on the Django/Python debug
server. On the testing server, which is Apache2 + wsgi, it
does occur. The versions of Python  (2.7) and Django (1.5.7)
are the same on both computers.
The result is that a fellow developer is accusing me of being
neglective with testing the code before uploading it :-(

There have been people with similar problems, but it has
never been solved:
https://groups.google.com/forum/#!topic/django-users/E4UVZHf6kP8
<https://groups.google.com/forum/#%21topic/django-users/E4UVZHf6kP8>

http://stackoverflow.com/questions/19145787/fielderror-cannot-resolve-keyword--into-field

http://chase-seibert.github.io/blog/2010/04/30/django-manytomany-error-cannot-resolve-keyword-xxx-into-a-field.html
http://code.djangoproject.com/ticket/1796 (7 year old django
bug which is reported fixed but in fact is not)


So it seems to be a bug deep down in Django.
This makes the use of M2M fields impossible for my
application, which is quite a problem.

Instead of trying to find the bug in Django, would anyone
have any clue why it does work on the Python debug server and
not on Apache2?


Thank you!
J

-- 
You received this message because you are subscribed to the

Goo

Re: Django-nested-inlines

2014-05-22 Thread Joris


I didn't get it to work either. First I got an error from one of the 
source files, which I fixed, and then it still didn't work.

I'm using Grappelli though, thought that could be a reason for the problem.

No Thiago it's not silver bullet but still it's pretty good :) and the 
existance of such an addon would lead to believe at least someone got it 
to work, right :-)


J


op 22-05-14 17:10, Thiago borges dos reis schreef:
The truth is that django isn't the silver bullet. In the moment, i 
think it doesn't really work. I'm doing my own "admin".



2014-05-22 6:08 GMT-03:00 Vivi Blubb >:


Hi,

I do have the same problem. I'm using Python 2.7.5 and Django
1.6.5. I followed the tutorials of nested inlines, but it doesn't
work. There is no error message, but it does not show the third
inline.
Actually there was a bug, because many did have the same problem,
but still I couldnt find the right solution.

Did someone solved that now?

Am Mittwoch, 12. März 2014 21:48:05 UTC+1 schrieb Thiago borges
dos reis:

Someone knows how to use django-nested-inlines.

I did this:

from django.contrib import admin
from nested_inlines.admin import
NestedStackedInline,NestedModelAdmin,NestedTabularInline
from models import Dieta, Cliente,Refeicao,Opcao


admin.site.register(Cliente)


class OpcaoInLine(NestedStackedInline):
model = Opcao
extra = 1

class RefeicaoInLine(NestedStackedInline):
model = Refeicao
extra = 1
inlines = [OpcaoInLine,]


class DietaAdmin(NestedModelAdmin):

fields= ('cliente','data_de_publicacao')

inlines = [RefeicaoInLine,]




admin.site.register(Dieta,DietaAdmin)



---Didn't work

-- 
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
.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/f69ac9ee-502f-453e-8918-91a9675a9914%40googlegroups.com

.


For more options, visit https://groups.google.com/d/optout.


--
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 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHQaGTCbFYETHVBX5kWJn0jh7VYcLy1LC4srYmbfggL0HD7eog%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/537E4506.9020506%40promani.be.
For more options, visit https://groups.google.com/d/optout.


Translations

2014-06-27 Thread Joris

Dear all,


I'm trying to get the translations to work. After running makemessages I 
find about 2500 items in the .pot file, not even 100 of which are of my app.


Most of them are from the "localflavor" package, also from 
"django/contrib/admin" or even the names of the months from 
"django/utils/dates.py".
Obviously I'm doing something wrong? It cannot be that the names of the 
months in a standard Django package are not translated?
The localflavor package tries to make me translate all the names of the 
cities in the world. I'm not using it, but still tried adding it to to 
INSTALLED_APPS

so maybe makemessages would find its translations, but no luck.

I must be missing something?

And then also the duplicates, when importing the pot file into poedit it 
complains about duplicates. What's the recommendation here?
Generally do you keep duplicates or do you merge them? (How many times 
does one really want to translate "homepage" and "email" ?)



Thanks!
Joris

--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53ADD01D.6020408%40promani.be.
For more options, visit https://groups.google.com/d/optout.


direct_to_template (with same name template) in a multi-app project

2012-06-22 Thread Joris A
Hello all,

I am developping a second app in the same project and want to use a
simple.direct_to_template view.

Both of my app require a login from user, thus I have in both app a
login page.
With a lot of creativity I named both of my login pages and index
pages ; login and index, with the corresponding templates login.html
and index.html.

I have a main urls.py file which include the urls of the two other
apps like this :
urlpatterns += patterns('',
url(r'^app1/', include('app1.urls')),
url(r'^app2/', include('app2.urls')),
)

In both app specific urls.py I have the following (simplified) :
urlpatterns = patterns('app1.views',
   (r'^$', 'index')
   )
urlpatterns += patterns('',
   (r'^login', 'django.views.generic.simple.direct_to_template',
{'template': 'login.html'}),
)

My problem is that the first app mentioned in settings "installed
apps" seem to have precedence in the template loading. It's like the
app tree is not taken into account in {'template': 'login.html'}. Thus
because they have the same name, I am always using the template of the
first app declared in installed apps.

If I rename the template index_app1.html and index_app2.html it works
as expected. So this is an option but...

Is there a way to tell which template to use?

Thanks in advance for your help!

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: merge data from multiple models

2012-07-30 Thread joris benschop


Op maandag 30 juli 2012 16:06:38 UTC+2 schreef Joris het volgende:
>
>
>
> On Monday, July 30, 2012 3:52:31 PM UTC+2, Melvyn Sopacua wrote:
>>
>>
>> If this is not implemented as a OneToOneField, then do so. You can then 
>> access the related object in the same way as the reverse of a ForeignKey 
>> and use related_name to make this more intuitive. 
>>
>  
> Yes that works great. Thanks!!
>
>
>
I'm sorry I spoke too soon. This does not work if the slow model is based 
on a raw SQL statement, as this statement is performed on an instance of 
the model. Referring to fastmodel.slow creates a new (unititialized) 
instance with no SQL backend and this crashes (relation does not exist). 
Sorry again if this is a trivial issue but I find this part of the Django 
docs rather hard to interpret. Many thanks for all your valuable comments 
so far.



 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/zb5Mpu_Fp5EJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django select extremely slow on large table

2015-01-22 Thread Joris Benschop
Dear List,

I'm trying to run a simple select on a very large Oracle table (1500 
million records). 

I create a standard django model:
--
class Marker(models.Model):
marker_id = SYSGUID16Field(primary_key=True)  # This field type is a 
guess.
markid = models.CharField(unique=True, max_length=20, blank=True)
crop = models.ForeignKey("variantdb_admin.Crop", blank=True, null=True)
insid = models.CharField(max_length=5, blank=True)
insdate = models.DateTimeField(blank=True, null=True)

class Meta:
managed = False
db_table = "prod_schema"."marker"
--

then simply run:
>>> x = Marker.objects.filter(markid = 'TO11')
>>> print x

in debugger, this basically creates the following simple query:
DEBUG (44.120) QUERY = u'SELECT "PROD_SCHEMA"."MARKER"."MARKER_ID", 
"PROD_SCHEMA"."MARKER"."MARKID", "PROD_SCHEMA"."MARKER"."CROP_ID", 
"PROD_SCHEMA"."MARKER"."INSID", "PROD_SCHEMA"."MARKER"."INSDATE" FROM 
"PROD_SCHEMA"."MARKER" WHERE "PROD_SCHEMA"."MARKER"."MARKID" = :arg0' - 
PARAMS = (u'TO11',); args=('TO11',)

As you see, in Django this takes 44 seconds to run. 
If I run this exact same query with cx_oracle directly the response time = 
< 0.1sec.

For small tables the performance of django is quite good, so it almost 
seems like django tries to do a count on the table before runnign the query 
or something. Any suggestions on how I can make this lookup faster?

thanks
joris



-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7db20206-9af7-491f-a0ed-b84f43cd4096%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-22 Thread Joris Benschop
Thanks you for your response
Unfortunately, yes, the 1.5b records is not something I have control over.

I agree the SYSGUID field needs working. However, if I change this field to
any other field type, the query still takes over 40 seconds.

class Marker(models.Model):
marker_id = models.BinaryField(primary_key=True)  # This field type is
a guess.
markid = models.CharField(unique=True, max_length=20, blank=True)
crop = models.ForeignKey("variantdb_admin.Crop", blank=True, null=True)
insid = models.CharField(max_length=5, blank=True)
insdate = models.DateTimeField(blank=True, null=True)

class Meta:
managed = False
db_table = "prod_schema"."marker"

DEBUG (58.566) QUERY = u'SELECT * FROM (SELECT "_SUB".*, ROWNUM AS "_RN"
FROM (SELECT "PROD_SCHEMA"."MARKER"."MARKER_ID",
PROD_SCHEMA"."MARKER"."MARKID", "PROD_SCHEMA"."MARKER"."CROP_ID",
"PROD_SCHEMA"."MARKER"."INSID", "PROD_SCHEMA"."MARKER"."INSDATE" FROM
"PROD_SCHEMA"."MARKER" WHERE "PROD_SCHEMA"."MARKER"."MARKID" = :arg0)
"_SUB" WHERE ROWNUM <= 1) WHERE "_RN" > 0' - PARAMS = (u'TO1',);
args=('TO1',)


thanks again for your help
joris


On Thu, Jan 22, 2015 at 4:51 PM, SK  wrote:

> To many calculations in the from_db_value function. Need optimizations. And 
> what about query limitations: 1.5b is really needed?
>
>
>
>
>  class SYSGUID16Field(models.Field):
>  default_error_messages = {
>  'invalid': "'%(value)s' is not a valid SYS_GUID."
>  }
>
>  description = "A connector to the SYS_GUID() fields for Oracle
>  Backends"
>
>  def __init__(self, *args, **kwargs):
>  kwargs['max_length'] = 16
>  super(SYSGUID16Field, self).__init__(*args,**kwargs)
>
>  def from_db_value(self, value, connection):
>  #print 'call from_db_value %s' % value
>  if value is None:
>  return value
>  return str(b2a_hex(value)).upper()
>
>
>
>
>
>
> четверг, 22 января 2015 г., 18:32:36 UTC+3 пользователь Joris Benschop
> написал:
>
>> Dear List,
>>
>> I'm trying to run a simple select on a very large Oracle table (1500
>> million records).
>>
>> I create a standard django model:
>> --
>> class Marker(models.Model):
>> marker_id = SYSGUID16Field(primary_key=True)  # This field type is a
>> guess.
>> markid = models.CharField(unique=True, max_length=20, blank=True)
>> crop = models.ForeignKey("variantdb_admin.Crop", blank=True,
>> null=True)
>> insid = models.CharField(max_length=5, blank=True)
>> insdate = models.DateTimeField(blank=True, null=True)
>>
>> class Meta:
>> managed = False
>> db_table = "prod_schema"."marker"
>> --
>>
>> then simply run:
>> >>> x = Marker.objects.filter(markid = 'TO11')
>> >>> print x
>>
>> in debugger, this basically creates the following simple query:
>> DEBUG (44.120) QUERY = u'SELECT "PROD_SCHEMA"."MARKER"."MARKER_ID",
>> "PROD_SCHEMA"."MARKER"."MARKID", "PROD_SCHEMA"."MARKER"."CROP_ID",
>> "PROD_SCHEMA"."MARKER"."INSID", "PROD_SCHEMA"."MARKER"."INSDATE" FROM
>> "PROD_SCHEMA"."MARKER" WHERE "PROD_SCHEMA"."MARKER"."MARKID" = :arg0' -
>> PARAMS = (u'TO11',); args=('TO11',)
>>
>> As you see, in Django this takes 44 seconds to run.
>> If I run this exact same query with cx_oracle directly the response time
>> = < 0.1sec.
>>
>> For small tables the performance of django is quite good, so it almost
>> seems like django tries to do a count on the table before runnign the query
>> or something. Any suggestions on how I can make this lookup faster?
>>
>> thanks
>> joris
>>
>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/CYIxM8nZl1A/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/29682a24-fdb6-4883-882e-58fb53d0a98c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/29682a24-fdb6-4883-882e-58fb53d0a98c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFwPP0oa%2BMP0rQQ%2Boot1HAjV6DbEqqGe5AzptjWhm%3DweCx%3Dn9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
THank you all for your help

there's a few things here: 
* This Oracle table is highly partitioned and optimized.There's indexes 
everywhere. There's two full time senior Oracle DBAs working on tuning this 
DB.So a return of 0.1 sec is not strange for this setup.
(btw the DBAs are really impressed with the query setup by django, using 
bind vars and all)

* The query only returns a single record (as also seen from the Unique=True 
in the model definition). There is of course a unique index on the MARKID 
column.

* If I run the exact query (included the nested _ROWNUM selection wrapper 
that Django does ) in cx_oracle or sqldev the query is very very fast. This 
is not a basic DB problem

* If I monitor CPU, then executing the query does not result in any 
specific CPU load on the python process. Still, the query takes 50 seconds. 
And again, running this exact query in cx_Oracle with the same credentials 
is <0.1 sec to respond

* connection from django to small tables is very fast!

* there is no caching, as asking the result from django twice is also slow

@james: two two subselects are generated by django


The main problem seems to be that Django Oracle backend connects different 
than vanilla cx_Oracle.
This is noticable from the fact that I cannot set the pooled connect as 
NAME, but I need to specify a server. in cx_Oracle, I need to specify the 
pool instead, or I get an error.
Now the real weirdness is that this results in a different execution plan 
of the query. For cx_Oracle, the indexes are used properly. for Django it 
uses a full table scan. That of course takes a lot of time
This is obviously partly oracles fault and we're looking into that. Howevr 
I still find it strange why I cannot use the pooled connection in django, 
or why django is connecting differently to the oracle db than cx_oracle 
(which I think is embedded in the oracle backend of django)





-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f829cee-afd2-4514-baab-1d7a05d46159%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
Very interesting point.
In the backend the MARKID column is of type VARCHAR2(20 BYTE).  This is not 
something I can change. But it does seem that the bindvar method forces a 
unicode lookup onto an ascii table.

Is there any way to make django get this field in ascii to test this theory?


-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/13bd355e-4278-43ab-96c9-ac1bcb8b0baf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
This seems to be specific for partial text searches (LIKE, STARTSWITH etc). 
Still, interesting addition.

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/af364d3f-4509-4dfa-8d95-7350a248556b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
As an addition:
>>>x=Marker.objects.raw("SELECT * from VARIANT_CLONE.MARKER WHERE 
MARKID='TO1'") 
This is also slow

so it indeed seems to be a locale issue
the database is AL32UTF8
and django uses national character set id "2000"

is this a locale issue?


-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c33b7fc9-e06f-45b0-a677-fc950247dd25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
Skip that, 
>>>x=Marker.objects.raw("SELECT * from VARIANT_CLONE.MARKER WHERE 
MARKID='TO1'") 
is fast

DEBUG (0.001) QUERY = u"SELECT * from SCHEMA_PROD.MARKER WHERE 
MARKID='mTO1'" - PARAMS = (); args=()



-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bb786f38-cf8f-4319-b6c0-2970b7650239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
And to keep replying to myself:

This one is slow:
x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= 
%s",[u'TO1'])
print x[0]

This one is fast:
y=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= 'TO1'")
print y[0]

If I copy the table and make the  MARKID field in NVARCHAR2(20), then it 
uses the index properly on both counts

So... so do I make django use ascii? is there a field type?

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/50ce32f1-90ac-4290-a950-ed70c7e9692b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django select extremely slow on large table

2015-01-23 Thread Joris Benschop
That sounds only relevant if Django creates the tables tight? You cannot do 
that with partitioned Oracle of this size. As much as I like to have django 
create the schemas, legacy db is all I have. THe entire DB is over 2TB of 
data, you cannot just change a column field type or add an index without 
waiting a day to reanalyze.
 

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c9c7c916-c818-4450-8cf0-0c7015f748ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


oracle syncdb crashes while setting column to NULL when it already is NULL

2015-02-05 Thread Joris Benschop
hi

I'm not sure if this is a dev question or it should be posted here. 
Probably I did something dumb, so I hope you can help me doscover what that 
is:

I'm trying to syncdb to an empty Oracle DB. Many tables, triggers and 
sequences are made but then this:
--
...
Synchronizing apps without migrations:
  Creating tables...
Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying contenttypes.0002_remove_content_type_name...DEBUG ALTER TABLE 
"DJANGO_CONTENT_TYPE" MODIFY "NAME" NULL; (params [])
DEBUG (0.055) QUERY = u'ALTER TABLE "DJANGO_CONTENT_TYPE" MODIFY "NAME" 
NULL' - PARAMS = (); args=[]
Traceback (most recent call last):
...
...
django.db.utils.DatabaseError: ORA-01451: column to be modified to NULL 
cannot be modified to NULL
--

Indeed if I run this in oracle directly:
ALTER TABLE "DJANGO_CONTENT_TYPE" MODIFY "NAME" NULL;
I get the same error: you cannot change a NULL column into NULL

I don't understand why django wants to alter a column name of a table it 
just made a few seconds before, but still. 
What seems to happen is that it changes a column to NULL, but because it 
already is NULL, the statement fails.
Workaround is to manually set: 
ALTER TABLE "DJANGO_CONTENT_TYPE" MODIFY ("NAME" NOT NULL);
Then run syncdb again and the error is gone.

I can see this is sillyness of oracle, but theres not much I can do about 
that. Is this a bug that I should report with the devs?

thanks
Joris

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0ebae0c4-f6d1-4552-b71d-1afeb5c52e8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


treemenus treemenu or sitetree

2015-04-16 Thread Joris Benschop
Hi List

I'm currently using django-treemenus to show a site menu, but now that Im 
migrating to 1.8, Im getting imcompatibility bugs. What modules do you use 
to display link menus in your site? I found sitetree and treemenu but they 
are not mentioned at all on this forum.

thanks!

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/62b7b907--4fd4-9337-257ba199f1ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


UUID as primary key for Oracle backend

2014-12-17 Thread Joris Benschop
Hi list

I'm trying to use Django 1.7.2 with an Oracle 11.2 backend. THis backend 
uses RAW(16) fields as primary keys everywhere (it wasnt my choice).
THis is however giving me major headaches, as Django seems to insist on 
decoding these keys to text.

Here''s my models:
#models.py
from django.db import models
#from uuidfield import UUIDField
from django_extensions.db.fields import UUIDField


class Population(models.Model):
population_id = UUIDField(primary_key=True) 
population_name = models.CharField(max_length=400,)
population_cross = models.ForeignKey('PopulationCross')

class Meta:
managed = False
db_table = 'population'

class PopulationCross(models.Model):
population_cross_id = UUIDField(primary_key=True)  
population_cross = models.CharField(max_length=100)

class Meta:
managed = False
db_table = 'population_cross'


#--
#code
from .models import Population


x=Population.objects.all()[0]
x.population_cross
-
This last command yields:
django.utils.encoding.DjangoUnicodeDecodeError: 'utf8' codec can't decode 
byte 0xe9 in position 6: invalid continuation byte. You passed in 
'\nD\t\x025W\xe9\xc2\xe0SW\x99\x03\n\x0cc' ()

so for some reason UUIDfield presents itself as a string and it crashes the 
decode() statement internal in Django

* Using the uuid field module is not an improvement. 
* using Char fields also crashes
* using BinaryField works, but may give me misery later on.
 
I apologize if this is a known issue but I spent a day searching and found 
no solution. 
So my questions are:
* Is using BinaryField the only solution here?
* Will BinaryField put in in other trouble elsewhere?
* would the UUIDfield in dev solve my problems?

Any pointer are very welcome. As mentioned, I have no control over the 
decision to use RAW(16) as primary keys.

Sincerely
Joris

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1afa922b-4eb5-4f28-a5c2-1d399067d18f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: UUID as primary key for Oracle backend

2014-12-17 Thread Joris Benschop
replying to myself: setting the pk to a binaryfield breaks the usage of 
django-admin as this tries to force the pk into string as well (options.py 
function action_checkbox()).

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/75e71f2b-0bd9-4570-9d78-d74858af54b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django vs ExtJS

2014-12-29 Thread Joris Benschop
Hi List,

I;m a data maangement specialist in a rather large multinational. I'm 
trying to push Django as a fast development framework for front-end 
applications of our databases. Currently the company is focusing on Sencha 
ExtJS and java solutions. Can you help me with pointers why Django is 
better? The free-as-in-beer argument is not very convincing by itself. 

Thanks
Joris

-- 
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53e17853-9922-4f77-bf9a-4cea7d35ade3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django vs ExtJS

2014-12-30 Thread Joris Benschop

Thank you, this is already very helpful.
Currently company policy is to create REST services in java for each 
backend and use ExtJS to query and visualize the results. With DJango 
I'm trying to combine these into one, whilst staying compatible by using 
tastypie as a REST service (so ExtJS can connect to that).


joris


On 29-12-14 16:51, Guilherme Leal wrote:
Sincerely, I can't see the ExtJS's Models as true models on an MVC (or 
MVT for instance) context, since the only real uses I've seen of them 
is to bind form controls to any "model like" (basically anything) 
structure. Therefore, the best comparsion for the ExtJS would be 
AngularJS (this is my point of view, I might be wrong on this one).


But if you REALLY want to compare them, I would say that the biggest 
point that django excels ExtJS, is that ExtJS doesn't have any 
meaningfull way to introspect your DB to build the models dynamically, 
and with django you can. As an exemple, with django, you can build an 
app that read your DB metadata and build everithing from there 
(basicaly models; the views and templates you can build in a way that 
they can read everything on a given standard).


If you provide more specific info about the project, maybe we can come 
with some more concrete comparsions.


Em Mon Dec 29 2014 at 12:56:05, Joris Benschop 
mailto:joris.bensc...@gmail.com>> escreveu:


Hi List,

I;m a data maangement specialist in a rather large multinational.
I'm trying to push Django as a fast development framework for
front-end applications of our databases. Currently the company is
focusing on Sencha ExtJS and java solutions. Can you help me with
pointers why Django is better? The free-as-in-beer argument is not
    very convincing by itself.

Thanks
Joris
-- 
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
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/53e17853-9922-4f77-bf9a-4cea7d35ade3%40googlegroups.com

<https://groups.google.com/d/msgid/django-users/53e17853-9922-4f77-bf9a-4cea7d35ade3%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the 
Google Groups "Django users" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/django-users/gbI1X93KjQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
django-users+unsubscr...@googlegroups.com 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com>.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOs3Lp6byk7q5KDTTRPEOLUGDGxXQHpvqoKMQYY4XCVU09DHfQ%40mail.gmail.com 
<https://groups.google.com/d/msgid/django-users/CAOs3Lp6byk7q5KDTTRPEOLUGDGxXQHpvqoKMQYY4XCVU09DHfQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.


--
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.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54A2667B.9030105%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django vs ExtJS

2014-12-30 Thread Joris Benschop
Thank you both for these answers. Personally Im already convinced of Django, 
but the trick is to convince others. The strong benefit of java is that it is 
really easy to hire senior java developers on a consultancy basis. For django 
it is not so simple, especially when the requirement is to have these devs 
on-site (.nl / .be area).



> Op 30 dec. 2014 om 11:36 heeft Ariel Calzada  het 
> volgende geschreven:
> 
> DJANGO + Tastypie is your TEAM for REST Services, forget Java :)
> 
> 2014-12-30 5:34 GMT-05:00 Guilherme Leal :
>> Given your scenario, we can say that with django, you wouldn't have to worry 
>> about creating REST services. You would create only one service, and let 
>> django manage the backend switch (with db routers). If you build your 
>> service well, you would have an abstract REST view/url generator (tastypie 
>> for instance), and with a little bit of effort (REALLY little), you could 
>> serialize the resource structure (metadata) on the request, and let ExtJS 
>> read that structure to build your frontend. Of course, this aproach requires 
>> a little bit of cache (to save some time on the read structure/build html 
>> for ExtJS). With that, you would have to write basically only the models 
>> (and of course, any exceptional case that might occur). And if you use 
>> django 1.7+, you can LITTERALLY forget about db admin, since django handles 
>> the migrations as well.
>> 
>> I've done basically the same thing with Django REST Framework and AngularJS 
>> for the frontend. Works like a charm, and with the business logic on the 
>> signals, reduces the dev time by 90%. And worls like a charm.
>> 
>> Em Tue Dec 30 2014 at 06:47:19, Joris Benschop  
>> escreveu:
>> 
>>> Thank you, this is already very helpful.
>>> Currently company policy is to create REST services in java for each 
>>> backend and use ExtJS to query and visualize the results. With DJango I'm 
>>> trying to combine these into one, whilst staying compatible by using 
>>> tastypie as a REST service (so ExtJS can connect to that).
>>> 
>>> joris
>>> 
>>> 
>>> 
>>>> On 29-12-14 16:51, Guilherme Leal wrote:
>>> 
>>>> Sincerely, I can't see the ExtJS's Models as true models on an MVC (or MVT 
>>>> for instance) context, since the only real uses I've seen of them is to 
>>>> bind form controls to any "model like" (basically anything) structure. 
>>>> Therefore, the best comparsion for the ExtJS would be AngularJS (this is 
>>>> my point of view, I might be wrong on this one).
>>>> 
>>>> But if you REALLY want to compare them, I would say that the biggest point 
>>>> that django excels ExtJS, is that ExtJS doesn't have any meaningfull way 
>>>> to introspect your DB to build the models dynamically, and with django you 
>>>> can. As an exemple, with django, you can build an app that read your DB 
>>>> metadata and build everithing from there (basicaly models; the views and 
>>>> templates you can build in a way that they can read everything on a given 
>>>> standard).
>>>> 
>>>> If you provide more specific info about the project, maybe we can come 
>>>> with some more concrete comparsions.
>>>> 
>>>> Em Mon Dec 29 2014 at 12:56:05, Joris Benschop  
>>>> escreveu:
>>>> 
>>>>> Hi List,
>>>>> 
>>>>> I;m a data maangement specialist in a rather large multinational. I'm 
>>>>> trying to push Django as a fast development framework for front-end 
>>>>> applications of our databases. Currently the company is focusing on 
>>>>> Sencha ExtJS and java solutions. Can you help me with pointers why Django 
>>>>> is better? The free-as-in-beer argument is not very convincing by itself. 
>>>>> 
>>>>> Thanks
>>>>> Joris
>>>>> -- 
>>>>> 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.
>>>>> Visit this group at http://groups.google.com/group/django-users.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/dja

Announcing DjHTML: A Django template indender

2021-05-24 Thread Jaap Joris Vens
Dear all,

I would like to take this opportunity to announce my side project to
the Django community. It's a Django template indenter called DjHTML.
It's Black for Django templates!

https://github.com/rtts/djhtml/

Over the past year I have fallen in love with Black and pre-commit to
automatically format code upon each commit. However, I could not find
any tool that would do the same for HTML files and so I decided to
write one myself. Take for instance the following template:

{% block content %}
 1 %}
class="extra"
{% endif %}
>
{% localize on %}
{% if clickable %}

{% endif %}
Blog post {{ nr }}
{% if clickable %}

{% endif %}
{% endlocalize %}

{% endblock %}

This is what it looks like after processing by DjHTML:

{% block content %}
 1 %}
class="extra"
{% endif %}
>
{% localize on %}
{% if clickable %}

{% endif %}
Blog post {{ nr }}
{% if clickable %}

{% endif %}
{% endlocalize %}

{% endblock %}

Currently, DjHTML is able to parse DTL, HTML, CSS, Javascript and any
combinations of these inside the same template. The indentation rules
are similar to Emacs' web-mode.el but with better handling of some
edge cases.

The difference with Black is that DjHTML is an indenter and not a
formatter: It will only add/remove whitespace and not insert newlines
or any other characters. The goal is to indent already well-structured
templates but not to fix broken ones. Also, unlike Black, the tabwidth
is configurable :-)

I am hoping that some of you will give it a try and hopefully provide
me with some feedback, test cases, and bug reports that will help me
improve this tool.

Greetings,
Jaap Joris Vens

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/YKug2AoTDvcMSLz4%40logos.


Re: Django admin application for Android

2019-07-21 Thread Jens-Joris Decorte
Hi Derek,

The GOLD plan is for users who want to manage multiple projects.
On top of that they get some other benefits like using shortcuts and 
rearranging the order of the models.

This is $0.99 per month as a way to support my development :-)

Kind regards

Op woensdag 17 juli 2019 08:11:56 UTC+2 schreef Derek:
>
> Can you explain more about the GOLD plan - what is it and how much does it 
> cost?
>
> On Monday, 15 July 2019 12:51:58 UTC+2, Jens-Joris Decorte wrote:
>>
>> Hello Django developers!
>>
>> Being both a Django developer and a heavy user of Django applications, I 
>> found myself accessing the admin interface of my Django sites quite often 
>> via my smartphone when I am on the road.
>> I was stoked to see the new responsive admin since Django 2.0, which made 
>> this process much smoother.
>>
>> Lately I've been developing an *Android app* to access your site's 
>> admin. It ports the *responsive design to ALL Django versions* and 
>> includes even more features to make the experience very mobile friendly.
>> I have just released this app on the Google Play Store 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin> so 
>> feel free to check it out or to share it with other Django developer / 
>> users. Any feedback will also be appreciated!
>>
>> The app can be found here: 
>> https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin
>>
>> [image: Django-admin-1] 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin> [image: 
>> Django-admin-2.jpg] 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin>
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/56e4363e-85b4-401d-864f-eb14bb559366%40googlegroups.com.


Re: Django admin application for Android

2019-07-21 Thread Jens-Joris Decorte
Hi Derek,

The GOLD plan is for users who want to manage multiple projects.
On top of that they get some other benefits like using shortcuts and 
rearranging the order of the models.

This is $0.99 per month as a way to support my development :-)

Kind regards

Op woensdag 17 juli 2019 08:11:56 UTC+2 schreef Derek:
>
> Can you explain more about the GOLD plan - what is it and how much does it 
> cost?
>
> On Monday, 15 July 2019 12:51:58 UTC+2, Jens-Joris Decorte wrote:
>>
>> Hello Django developers!
>>
>> Being both a Django developer and a heavy user of Django applications, I 
>> found myself accessing the admin interface of my Django sites quite often 
>> via my smartphone when I am on the road.
>> I was stoked to see the new responsive admin since Django 2.0, which made 
>> this process much smoother.
>>
>> Lately I've been developing an *Android app* to access your site's 
>> admin. It ports the *responsive design to ALL Django versions* and 
>> includes even more features to make the experience very mobile friendly.
>> I have just released this app on the Google Play Store 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin> so 
>> feel free to check it out or to share it with other Django developer / 
>> users. Any feedback will also be appreciated!
>>
>> The app can be found here: 
>> https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin
>>
>> [image: Django-admin-1] 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin> [image: 
>> Django-admin-2.jpg] 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin>
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/be43dd1b-9297-429e-b029-e8c18b2398b9%40googlegroups.com.


Re: Django admin application for Android

2019-07-21 Thread Jens-Joris Decorte
Hi Derek,

The GOLD plan is for users who want to manage multiple projects.
On top of that they get some other benefits like using shortcuts and 
rearranging the order of the models.

This is $0.99 per month as a way to support my development :-)

Kind regards

Op woensdag 17 juli 2019 08:11:56 UTC+2 schreef Derek:
>
> Can you explain more about the GOLD plan - what is it and how much does it 
> cost?
>
> On Monday, 15 July 2019 12:51:58 UTC+2, Jens-Joris Decorte wrote:
>>
>> Hello Django developers!
>>
>> Being both a Django developer and a heavy user of Django applications, I 
>> found myself accessing the admin interface of my Django sites quite often 
>> via my smartphone when I am on the road.
>> I was stoked to see the new responsive admin since Django 2.0, which made 
>> this process much smoother.
>>
>> Lately I've been developing an *Android app* to access your site's 
>> admin. It ports the *responsive design to ALL Django versions* and 
>> includes even more features to make the experience very mobile friendly.
>> I have just released this app on the Google Play Store 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin> so 
>> feel free to check it out or to share it with other Django developer / 
>> users. Any feedback will also be appreciated!
>>
>> The app can be found here: 
>> https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin
>>
>> [image: Django-admin-1] 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin> [image: 
>> Django-admin-2.jpg] 
>> <https://play.google.com/store/apps/details?id=com.jjdc.djangoadmin>
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fbd4f7b2-4ae7-4ac2-b8fe-a7839d3f0d1d%40googlegroups.com.


Re: Django admin application for Android

2019-07-21 Thread Jens-Joris Decorte
Hi Alexandre, the app is written in Kotlin. Looked for using flutter but 
the webview support is not quite there yet..

Op woensdag 17 juli 2019 17:26:04 UTC+2 schreef Alexandre Guignard:
>
> That's cool, thanks 😉 
> Which langage do You use for the app ?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e27ac91-ffd4-4bfa-9c8c-5d4c27ba87a2%40googlegroups.com.