Re: Python FAQ: Webdev

2012-05-12 Thread Nick Apostolakis

On 13/05/2012 07:32 πμ, Peter Murphy wrote:

All,

The site recommends "Flask" by the way - not Django. The author thinks
it is too heavyweight for his or her uses. But there seems to be a lot
of ideas in the article about how to make a framework that seem to be
captured in Django.

Best regards,
Peter

[* http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ ]

   

An interesting article, I didn't realize Django was too "heavy weight".
I also didn't know about Flask and Pyramid either.

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: Python FAQ: Webdev

2012-06-07 Thread Nick Apostolakis

On 07/06/2012 04:25 μμ, Peter of the Norse wrote:


There's a large group of programmers, especially in Python, that loves "Do one 
thing, and do it well". If you don't need database support, then half of Django goes 
unused. If you do need to save data, then you'll love ModelForms. I like that Django has 
everything I need and that they all work together. But if you'd rather use MongoDB, then 
it's every difficult.

Peter of the Norse
rahmc...@radio1190.org



   
I agree with your point of view even though I have found some projects 
combining Django with mongo db.
Anyway what I like about Django is that it has a rich feature set, it is 
infinitely extendable AND can be virtualized (though pip, fabric, etc) 
making replication of installation easy.



--
 ------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: Django and PHP webhosting in Germany

2012-06-17 Thread Nick Apostolakis

On 16/06/2012 11:47 μμ, Carlos Daniel Ruvalcaba Valenzuela wrote:

Try Hetzner in Germany, they are a solid hosting company with
reasonable prices, their dedicated hardware is well know for being a
great value.

http://www.hetzner.de/
   


You can get a virtual server from Hetzner with a monthly cost of 7.9€
You can then install anything you like on it.

I have such a server with them and it works fine.

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: advantages and disadvantages of Raw sql queries in django

2012-06-30 Thread Nick Apostolakis

On 30/06/2012 07:36 πμ, vijay shanker wrote:

hi
i want to know pros and cons associated with running raw sql queries
over django's ORM .
googled it out but couldn find many useful links.

   
At some point in the future you may find yourself in a position when you 
will need to change the underlying DB engine.

In these cases ORM is a life saver.

This scenario is not far-fetched it is very common actually. I use 
sqlite to develop my app, but in the production server I use mysql.

The code is the same, I have to change only 2 lines in settings.py
This makes development very easy and very portable.
I can reproduce my development environment in 10mins (with the use of 
pip and virtualenv of course) and start working in a new machine with 
minimum hassle.


--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: advantages and disadvantages of Raw sql queries in django

2012-06-30 Thread Nick Apostolakis

On 30/06/2012 10:58 μμ, Javier Guerra Giraldez wrote:


Even when using the ORM, any complex query is a good candidate to be
encapsulated as part of the model.  Ideally, the model should expose a
high level view of your data objects, not simply an easy to use view
of the database.

   


Interesting idea, I haven't used that yet, could you give an example of 
that?
Would you use a method calling the ORM that would include something like 
self.objects.select_related().bla bla?


Thanks

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: advantages and disadvantages of Raw sql queries in django

2012-06-30 Thread Nick Apostolakis

On 01/07/2012 06:25 πμ, Javier Guerra Giraldez wrote:


in short: an application model is _not_ an OOP view of the database;
it's the implementation of the conceptual data objects as handled by
the application.

   


All right, I see the advantages. Nice technique.
Thanks a lot.

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: django makemessages doesn't recognize trans in templates

2012-08-20 Thread Nick Apostolakis
On Mon, Aug 20, 2012 at 8:18 PM, Jojo  wrote:

> what is the meaning of the fuzzy mark?
>
>
fuzzy is some kind of auto translated field.
it may be correct or not.
when you are sure that the translation is correct, you remove the fuzzy
annotation and then the translation works fine
-- 
---
    Nick Apostolakis
email:nicka...@oncrete.gr
Web Site: http://nick.oncrete.gr
---

-- 
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: tree.io installation with django

2012-09-15 Thread Nick Apostolakis
On Sat, Sep 15, 2012 at 11:41 PM, Fabian Weiss
wrote:

> I do so! I tried now this one:
> http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/
> And it works! :)
> http://project.immersight.de/
>
> I tried again all I could find in the net for treeio, but nothing works :(
> How can I totally remove all my steps? Is it just to delete the
> directories? Or is there something to do in a database?
>
> Maybe I have a version of django which is too new? It is 1.4.1
>
> http://nopaste.immersight.de/?34b6a29be67dd853#dvMCsmIWwYZUWV2qKMFxGLMI4pq+O3PiPy2iHAp3ZzQ=
>
>
>
Why don't you use django 1.3 as it is described in the requirements file?
Thats a simple way to see if you problems stem from django version
incompatibility

-- 
-------
Nick Apostolakis
email:nicka...@oncrete.gr
Web Site: http://nick.oncrete.gr
---

-- 
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: tree.io installation with django

2012-09-16 Thread Nick Apostolakis

On 16/09/2012 12:01 μμ, Fabian Weiss wrote:

I would like to do, but my Debian Distribution just offers 1.4! Maybe I can
install another one, but than I probably get Version missmatch.. :/
   


You could install any version you like through the use of pip an virtual env
Check it out. Its quite simple and it is a very valuable technique


--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: tree.io installation with django

2012-09-17 Thread Nick Apostolakis

On 16/09/2012 11:53 μμ, Fabian Weiss wrote:

Allright, I didnt know that! So here are the requirments! I deinstalled
django debian packet and used pip. Works very well! But some of the
requiered software is also available and installed on my system through
APT! For example python-dateutil. What to do? Deinstall it and install it
with pip??

I did like this "pip install -U Django==1.3" for the hole list:

Django==1.3
Pygments==1.3.1
south
jinja2==2.5.2
coffin
hashlib
PIL
html5lib==0.90
oauth2
whoosh
python-dateutil
django-dajax
django-dajaxice
django-piston==0.2.2
django-simple-captcha
unidecode
django-websocket
docutils
simplejson
sphinx
johnny-cache
django-pandora

Than I startet again from scratch. I created the treeio dir and went into
this. I started the configure as root, works well. Then the patch, and this
time it made trouble!
http://snipurl.com/250l4g8
Datei oder Verzeichnis nicht gefunden = File or directory not found.

As usual I just continued with "python manage.py installdb" and "python
manage.py loaddata data.json" and as usual I got the same error:
"django.core.exceptions.ImproperlyConfigured: You're using the staticfiles
app without having set the STATIC_ROOT setting."

Sorry, but: I STILL DONT KNOW WHERE TO ENTER MY MYSQL INFORMATION!???

But, this time I can see something!!! :) http://project.immersight.de/
But what I now wrong??


   

when you use virtualenv your system configuration is bypassed altogether.
I have installed tree.io three days ago (after seeing your first email 
to the list) using the source code and the instructions at github


https://github.com/treeio/treeio


I should say that you need to follow the instructions closely otherwise 
you will get errors.


--
 ------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: tree.io installation with django

2012-09-18 Thread Nick Apostolakis

On 18/09/2012 08:47 πμ, Fabian Weiss wrote:

Just I cannot login! :-D
admin/admin doesn't work.. :/
Does it has something to do with settings.py?

ADMINS = (
 # ('Your Name', 'your_em...@domain.com'),
)

Should I done this before I start installation??

   

during my installation it failed to install the initial mysql data
so i have done a manual import of mysql initial data using this command

mysql -u treeiouser -p< sql/mysql-treeio-current.sql treeio

maybe your problem is the same

--
 ------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: tree.io installation with django

2012-09-19 Thread Nick Apostolakis

On 18/09/2012 10:33 μμ, Fabian Weiss wrote:

YES! I got this error: http://snipurl.com/251cbjb
After doing your MySQL Code it WORKS!! :)
THX alot!


   


You are welcome :)

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: tree.io installation with django

2012-09-20 Thread Nick Apostolakis

On 20/09/2012 08:31 πμ, Fabian Weiss wrote:

The trouble is still not over :( :(
When I click on Calendar or Projects I get the error in the top: "Something
went wrong..."
Exactly because of these two features I installed the software.. :/
So I remove the # in the link to activate the debug output and I
get: http://snipurl.com/251x8oz
(1054, "Unknown column 'projects_task.depends_id' in 'field list'")
Does somebody know a solution?

   

I think that there is a south migration you have to perform
try python manage.py migrate projects

--
 ------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: tree.io installation with django

2012-09-20 Thread Nick Apostolakis

On 20/09/2012 10:36 μμ, Fabian Weiss wrote:

And YES again! :) That solved it!
No alomost everything works! :)
Just when I go to /calendar/settings/integration I see: "available
resources: loading.." Is it normal?

Greetings and THX :)

   

You are welcome.
The calendar app as far as I understand is supposed to be able to sync 
with google cal.
That however has not worked for me, I think that this feature is broken. 
There was another glitch with the helpdesk module although I didn't try 
enough to resolve that.
I have installed tree.io mostly for the project management, and helpdesk 
support if it supported anonymous user's ticket creation of something

like that.
I think that the app does not support anonymous helpdesk, so I will use 
it for project management only for the moment.
It works reasonably well, although I have not managed yet to isolate my 
users from viewing each others projects.
I admit that I have dedicated only a small amount of time in the user 
separation issue, since my installation has only a few trusted users,

so project isolation is not a must have.

I am glad you have a working installation...

--
 --
       Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: Django and HSQLDB

2012-11-03 Thread Nick Apostolakis
On Sat, Nov 3, 2012 at 2:32 PM, Abracadab  wrote:

> Hi, all. I'm building a Django app against a legacy HSQLDB database
> (the existing user interface is built in OpenOffice Base). Is there a
> way to use HSQLDB with Django? Alternatively, does anyone know if
> there's a way to easily alter the existing database to any of the
> existing Django/SQL interfaces?
>
> Thank you,
>
> Robert Orenstein
> http://s7project.com/
>
>
I have used hsqldb in some of my projects alas not with django. It is
possible that you could fire up the hsqldb in server  mode with a command
like this

java -cp ./lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0
xdb

and then use the tool in odred to browse the database.

java -cp ./lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing

after that, you can issue any sql command you like to export the database...
-- 
-------
Nick Apostolakis
email:nicka...@oncrete.gr
Web Site: http://nick.oncrete.gr
---

-- 
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: I can't activate the admin site

2011-10-31 Thread Nick Apostolakis

On 31/10/2011 03:42 πμ, Juan Kepler wrote:

I've done what the "Writing your first Django app, part 1" said. It
works.

But in the part 2:
*I add "django.contrib.admin" to my INSTALLED_APPS setting.
*I run python manage.py syncdb.
 And I have this error:
"File "...Python26\lib\site-packages\django\contrib\admin\sites.py",
line 250
 return self.get_urls(), self.app_name, self.name
IndentationError: unexpected indent"

I have the latest version of Django installed, and I'm using PyCharm
as IDE

What can I do?
Thanks!

   

Since it complains about

IndentationError: unexpected indent"


I would guess that you have typed an extra space or tab somewhere, that 
ruins the identation.

Since you use an IDE it should be easy to find it.

--
 ----------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: I can't activate the admin site

2011-10-31 Thread Nick Apostolakis

On 31/10/2011 02:12 μμ, kenneth gonsalves wrote:


but the indentation error seems to be in the django source code?
Normally one does not fiddle with that.
   


no I wouldn't expect the indentation problem to be located in django code.
unless you are using an unstable version or something

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: Error 500 instead of 404

2011-11-20 Thread Nick Apostolakis

On 20/11/2011 07:56 πμ, Ricardo F. Teixeira wrote:

Hello everybody!

I'm having a strange error.
I already searched for this error and there's quite a lot of
discussion about it. But I didn't find a proper answer that fits me.
So... when I set DEBUG to True and access an invalid URL Django
returns me a 404 error page, but if I set DEBUG to False it gives me
an 500...

Firstly I thought it was something wrong with my project so I started
a new one, with only the following basics options.
I can assure you that I only edit those 3 files (views.py, urls.py and
settings.py).

In settings.py I only change from DEGUG=True to DEBUG=False.

ricardo@maggie:~/ola $ ls
__init__.py  __init__.pyc manage.pysettings.py  settings.pyc
urls.py  urls.pyc views.py views.pyc

ricardo@maggie:~/ola $ cat urls.py
from django.conf.urls.defaults import patterns, include, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
 # Examples:
 url(r'^$', 'ola.views.home', name='home'),
 # url(r'^ola/', include('ola.foo.urls')),

 # Uncomment the admin/doc line below to enable admin
documentation:
 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

 # Uncomment the next line to enable the admin:
 # url(r'^admin/', include(admin.site.urls)),
)
ricardo@maggie:~/ola $ cat views.py
from django.http import HttpResponseNotFound

def home(request):
return HttpResponseNotFound()

ricardo@maggie:~/ola $ python manage.py runserver
Validating models...

0 errors found
Django version 1.3.1, using settings 'ola.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[19/Nov/2011 23:53:21] "GET / HTTP/1.1" 404 0
Traceback (most recent call last):
   File "/Library/Python/2.7/site-packages/django/core/servers/
basehttp.py", line 283, in run
 self.result = application(self.environ, self.start_response)
   File "/Library/Python/2.7/site-packages/django/core/handlers/
wsgi.py", line 272, in __call__
 response = self.get_response(request)
   File "/Library/Python/2.7/site-packages/django/core/handlers/
base.py", line 153, in get_response
 response = self.handle_uncaught_exception(request, resolver,
sys.exc_info())
   File "/Library/Python/2.7/site-packages/django/core/handlers/
base.py", line 218, in handle_uncaught_exception
 return callback(request, **param_dict)
   File "/Library/Python/2.7/site-packages/django/utils/decorators.py",
line 93, in _wrapped_view
 response = view_func(request, *args, **kwargs)
   File "/Library/Python/2.7/site-packages/django/views/defaults.py",
line 30, in server_error
 t = loader.get_template(template_name) # You need to create a
500.html template.
   File "/Library/Python/2.7/site-packages/django/template/loader.py",
line 157, in get_template
 template, origin = find_template(template_name)
   File "/Library/Python/2.7/site-packages/django/template/loader.py",
line 138, in find_template
 raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html

[19/Nov/2011 23:53:48] "GET /GIVE_ME_400 HTTP/1.1" 500 1314
Traceback (most recent call last):
   File "/Library/Python/2.7/site-packages/django/core/servers/
basehttp.py", line 283, in run
 self.result = application(self.environ, self.start_response)
   File "/Library/Python/2.7/site-packages/django/core/handlers/
wsgi.py", line 272, in __call__
 response = self.get_response(request)
   File "/Library/Python/2.7/site-packages/django/core/handlers/
base.py", line 153, in get_response
 response = self.handle_uncaught_exception(request, resolver,
sys.exc_info())
   File "/Library/Python/2.7/site-packages/django/core/handlers/
base.py", line 218, in handle_uncaught_exception
 return callback(request, **param_dict)
   File "/Library/Python/2.7/site-packages/django/utils/decorators.py",
line 93, in _wrapped_view
 response = view_func(request, *args, **kwargs)
   File "/Library/Python/2.7/site-packages/django/views/defaults.py",
line 30, in server_error
 t = loader.get_template(template_name) # You need to create a
500.html template.
   File "/Library/Python/2.7/site-packages/django/template/loader.py",
line 157, in get_template
 template, origin = find_template(template_name)
   File "/Library/Python/2.7/site-packages/django/template/loader.py",
line 138, in find_template
 raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html

Thank you for your time.

Best regards,

Ricardo F. Teixeira

   

If the template exists, then
it could easily be a directory or file permission 

Re: Using django's oodb alone

2013-01-03 Thread Nick Apostolakis

On 03/01/2013 02:30 μμ, Xavier Pegenaute wrote:

Hi,

I would like to use the django's oodb in some (ncurses + python) 
scripts. Any one have some experience on it?, do I need to use the 
django scripting environment or may be I can avoid it?



Thanks,
Xavi



Of course you can do it, you just have to import some things in order to 
load the django


I have created a number of scripts like that and have something like 
this in the begining of the file



#! /usr/bin/env python
# -*- coding: utf-8
import sys
import os
sys.path.append('./django/')
os.environ['DJANGO_SETTINGS_MODULE'] ='settings'

from myapp.models import User, Reminder, ExtraUserAttributes


etc
--

 ------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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: Saving browser output as pdf

2013-02-24 Thread Nick Apostolakis

On 24/02/2013 03:15 μμ, Satinderpal Singh wrote:

Thanks a lot to all. I noted your suggestions, and will try to
implement one which would be best suit to my requirement.

By the way, i am trying to take pdf output from the models and for
that i required these libraries. Currently, i am using pisa for saving
the output of the report as pdf file.

Basically i need both outputs, html and pdf, for my clients. I need to
  produce more than 40 different reports as html and pdf so that my
client can take whatever he needed. And if i tried to produce both
html and pdf from views, then it requires functions double to the
reports, two for each html and pdf. So, i need solution which can
convert my html output to the pdf from browser.


   
Hi there, I use the report lab library in my application to produce pdf 
reports.


The user sees the report in html of course and has an option to download 
it as csv or as pdf.

The pdf part is accomplished with reportlab library.

Cheers

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Saving browser output as pdf

2013-02-24 Thread Nick Apostolakis

On Mon, Feb 25, 2013 at 12:18 AM, Mark Furbee  wrote:

Django docs (pretty turse):
https://docs.djangoproject.com/en/dev/howto/outputting-pdf/

 From ReportLab site:
http://www.reportlab.com/software/documentation/

Here's a decent quick tutorial:
http://www.blog.pythonlibrary.org/2010/03/08/a-simple-step-by-step-reportlab-tutorial/

Note that what you are proposing is to create an HTML version of the report
and a separate PDF version using ReportLab. Otherwise, if you want to make
what would be an HTML report download as a PDF document, use @Mike's
solution.

Good Luck,
 


Indeed Mark's solution is more elegant than mine if you want to use the 
same view as both html or pdf depending on a switch.
My solution creates two independend views with the same arguments, one 
of them produces always html, and the other pdf. I wanted it that way 
since these two views are aesthetically different.

Depending on your design, choose the one most comfortable.

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --


--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Restful User Authentication for Ember/Backbone client with Tastypie

2013-03-11 Thread Nick Apostolakis

On 10/03/2013 10:54 μμ, Pratik Mandrekar wrote:

Hello,

I'm trying to figure out what would be the best way to integrate 
django with ember.js/backbone from the user authentication point of 
view. I'm using Tastypie for creating RESTful resources.


I have no problem creating APIs once a user has been authenticated 
using the Session based authentication but I am wondering what is the 
best RESTful way to create a user authentication API that can confirm 
to Session based authentication.


Also if I'm not mistaken the right way to authenticate the client is 
via the API key authentication right?


Thanks,
Pratik
--

Tthis is cool, I was about to ask the same thing. I believe that this 
thread will be interesting.



--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Restful User Authentication for Ember/Backbone client with Tastypie

2013-03-12 Thread Nick Apostolakis

On 12/03/2013 01:06 μμ, Jani Tiainen wrote:


There is not exactly "RESTful way to authenticate", since after all 
REST is just an architecture to represent different resources and thus 
it's totally agnostic what comes to authentications and such.


Simplest one (if you're use HTTP(S)) is to use basic/digest auth. 
Though true REST is protocol agnostic (for example it could use unix 
sockets)


Query authencation, a.k.a. API key, only one that you can do protocol 
agnostic way.


Cookie-based, for example posting credential query as POST (to create 
new cookie) to /sessions/ url. Binds REST to HTTP(S) protocol again 
and DELETE to /sessions// to logout


Personally, if working with Django and HTTP I would go for cookie 
based auth since it would be natural.


Otherwise API key isn't that bad option.



In my case I use Django and Tastypie. The whole thing works fine for non 
authenticated users and I would like to provide content for my 
registered users too.


Would the best practice be to use Django login form to authenticate the 
user and then use Django authentication type (instead of api/key )with 
tastypie to access the content for registered users I am after?


Thank you

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How does it all work

2013-06-10 Thread Nick Apostolakis

On 10/06/2013 05:10 μμ, Nafiul Islam wrote:

Hi!
I would be grateful to any link to a comprehensive resource, that 
shows you how to make a simple Hello World webpage, from how you 
install software that you need to writing pure python (without a 
framework) that can handle requests, and work with databases.




Hello, you could take a look at the classic cgi concept. It is the base 
on which all wsgi,fastcgi and the rest of the family stand.


You have the webserver who accepts a request, the web server passes the 
request to a program (of any language) through an interface ( cgi,wsgi 
etc) the program returns through the same interface a response, the 
webserver returns the response to the world.


A simple idea with a lot of consequences...

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: looking for an apache/system admin master

2013-06-18 Thread Nick Apostolakis
Matt, setting up ssl with apache is no big deal. Most mainstream
distributions offer detailed documentation on how to do that, with ready
precompiled packages. You do not have to use a different OS or a different
server.

If you are using either a redhat/fedora/centos flavor or a debian flavor,
enabling ssl with apache should be relatively straightforward.

I do not mean that enabling it with other distributions is particularly
difficult, but with the one I mentioned is really simple, just install the
relavant packages and enable the ssl engine configuration file that comes
with them.


On Tue, Jun 18, 2013 at 8:26 PM, MattDale  wrote:

> I've been using windows/django1.4/apache2.2 for a couple intranet apps and
> it has been working well.  I recently had our admin open up a port in our
> firewall to deploy another app publicly. We weren't using the app and there
> were issues when testing, since both the admin and myself are newbies to
> deploying publicly with Apache with SSL. So we left the server as is and
> tested UX for this app on an external host.  We installed a new system wide
> firewall last week which the admin thought would help with our issues so I
> went to do some server prep today to bring the app on an internal server
> again.
>
> A check of the access logs found a specific external IP address hitting
> the server every 1/4 second with strange URLs that look to be commonly used
> php urls since June 7,2013.  It has been getting hit for DAYs and I just
> wasn't monitoring the server. Each of the requests either 302'd or 404'd
> and there are thousands of them.  I stopped the server, and sent an email
> to the admin to close that port down.
>
> Since neither I nor the system admin know much about deploying, is there
> anywhere I can look to hire someone to help get this app deployed safely?
> Our policies require SSL and we are willing to use other OS or servers, we
> just need someone who knows what they are doing.
>
> We are in the NYC vicinity.
>
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
---
Nick Apostolakis
email:nicka...@oncrete.gr
Web Site: http://nick.oncrete.gr
---

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django deploy structure

2013-06-26 Thread Nick Apostolakis
You could use a code versioning  system like git or bazaar.when you want to
deploy just pull from your repository
Στις 26 Ιουν 2013 8:46 μ.μ., ο χρήστης "fred" 
έγραψε:

> I've got django 1.5 deploying successfully to a Linux Apache system with
> mod_wsgi.  This system is still being developed and changes are frequent.
>
> I currently just copy the Eclipse project directory over, which gives me
> the site/settings as well as the app.  This works, but has the disadvantage
> of also copying unnecessary stuff like my docs subdirectory and test data
> directory, etc. I cannot use tools like git to solve this for various
> internal reasons.
>
> I'm the only one using django in my organization and I would appreciate
> some insight from the more experienced developers in the community.
>
> Thanks,
>
> Fred.
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Does django have something similar to resource in rails?

2013-07-03 Thread Nick Apostolakis
Check out the Rest apis (tastypie etc )  they should be what you are
looking for
Στις 03 Ιουλ 2013 11:03 μ.μ., ο χρήστης "gabby gabriel" <
gabbyha...@gmail.com> έγραψε:

> I just started learning django. I was a rails developer before that. I was
> wondering if there is anything similar to resource in rails in django? Or
> do I have to make different urls and corresponding views for those urls?
> Thanks in advance!
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
You can always return a container object with the values you want as it's
instance variables

Στις 05 Ιουλ 2013 12:39 ΜΜ, ο χρήστης "Hélio Miranda" 
έγραψε:

Hi
My doubt is that I am not getting an image and its caption.
I'll explain, I have my application to enter the picture and the caption
GridFS on mongo.
I get the image and returns or fetch the caption and just return everything
ok.
But I wanted to return the picture and the caption together ...
Is it possible? The code I'm doing is:
*def view (request, id):*
* mongoengine.fields.GridFSProxy = fs ()*
* fs.get picture = (id = ObjectId (id))*
* caption = foto.legend*
**
* return HttpResponse (foto.read (), content_type = 'image / jpeg')*

Now how can I return the legend in return too?

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
I am not in front of a computer right now in order to offer a full fledged
examle, but you can insert your values in a dictionary or a list and return
that

Στις 05 Ιουλ 2013 12:54 ΜΜ, ο χρήστης "Hélio Miranda" 
έγραψε:

can you give me an example?



-- 
You received this message because you are subscribed to the Google Groups
"Django users" group...

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Return 2 values

2013-07-05 Thread Nick Apostolakis
You should be fine everything is an object so you can hold different
datatypes in a list

Στις 05 Ιουλ 2013 1:26 ΜΜ, ο χρήστης "Hélio Miranda" 
έγραψε:

My problem is that I am returning an image (content_type = 'image / jpeg')
and the legend is not an image but text



-- 
You received this message because you are subscribed to the Google Groups
"Django users" group...

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Return 2 values

2013-07-05 Thread Nick Apostolakis

On 05/07/2013 02:27 μμ, Nick Apostolakis wrote:


You should be fine everything is an object so you can hold different 
datatypes in a list





As a reference, check this out

http://zetcode.com/lang/python/datatypes/

in the tuple and lists section

and this 
http://stackoverflow.com/questions/11387752/am-i-safe-mixing-types-in-a-python-list


there are more, if you google it

--
 --
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Return 2 values

2013-07-08 Thread Nick Apostolakis

On 08/07/2013 02:26 μμ, Hélio Miranda wrote:

ok, I have my view like this:
*def view(request, id):*
*fs = mongoengine.fields.GridFSProxy()*
*foto = fs.get(id=ObjectId(id))*
*legenda = foto.legend*
**
*array = [foto.read(), legenda]*
*return HttpResponse(array)*

But before I had to go to the image url this:
*url(r'^view/\w+)>', 'rest.views.view'),*

And now for access to the image and caption will as I do?

Check this out. You can access each element in the list separately in 
your template.

That change in your views shouldn't affect your url.py

http://stackoverflow.com/questions/4651172/reference-list-item-by-index-within-django-template

--
 ------
   Nick Apostolakis
  e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: PDF generator in Django

2013-08-05 Thread Nick Apostolakis
Hello there, I have used the report lab library with good results for
simple PDF with tabular data
On 5 Aug 2013 16:27, "graeme"  wrote:

> I recently used Latex and it worked fairly well.
>
> I had to write a little function to escape latex special characters, and
> you have to be a bit careful with some characters when mixing Latex and
> Django templates.
>
> It would not be easy if you needed to insert formatted text into the
> template, but it works fine, is well tested and documented, and the results
> look quite good.
>
> On Monday, August 5, 2013 12:18:40 PM UTC+5:30, navnath gadakh wrote:
>>
>> Which is best tool to generate PDF in python 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Complex query

2013-09-08 Thread Nick Apostolakis

On 08/09/2013 08:17 μμ, Yegor Roganov wrote:

I'm developing a forum and my db schema  is roughly equivalent to the
following:
class Topic(models.Model):
 head = models.CharField()
 body = models.TextField()
 created = models.DateTimeField(auto_now_add=True)

class Post(models.Model):
 body = models.TextField()
 topic = models.ForeignKey(Topic)
 created = models.DateTimeField(auto_now_add=True)

The question is: how to construct a query to fetch 20 latest Topics with 5
latest Posts for each of these Topics ? As I understood, prefetch_related
isn't suitable since it cannot limit the number of related objects.


It looks like you are looking for a subquery

maybe this will be useful

http://stackoverflow.com/questions/8217490/query-of-a-subquery-in-django

--
 ------
 Nick Apostolakis
 Msc in IT, University of Glasgow
 e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [django-announce] [ANNOUNCE] Security releases issued -- vulnerability in the wild

2013-09-15 Thread Nick Apostolakis

On 15/09/2013 03:50 μμ, Russell Keith-Magee wrote:

Hi Dig

I'm not sure I understand your question. Both releases are security
releases; both are available on pip. If you code is based on the 1.5
release of Django, you should now be running 1.5.4.

Yours,
Russ Magee %-)




Hello, is 1.3.x affected by this vulnerability?

Thank you

--
 ------
 Nick Apostolakis
 Msc in IT, University of Glasgow
 e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [django-announce] [ANNOUNCE] Security releases issued -- vulnerability in the wild

2013-09-15 Thread Nick Apostolakis

On 16/09/2013 02:45 πμ, Russell Keith-Magee wrote:

Django 1.3 and earlier are also affected, but the exposure is smaller. It
was the speed of the PBKDF2 hashing function that revealed this problem,
and that hasher was introduced in Django 1.4. In Django 1.3 or earlier,
SHA1 was the default hashing function. As described in the release notes,
SHA1 is a much faster hashing function, which means it's harder to
manufacture an attack using this problem -- but it's still possible.

However, it's important to note that this isn't the only security
vulnerability in Django that is unpatched in 1.3. Django 1.3 is *not
supported*, and so all the recent security issues (XSS problems in URL and
login redirect URLs, and directory traversal in the ssi tag) are also
unpatched.

Django 1.4 will be a long term support release for Django -- we're
guaranteeing support 3 years from initial release -- so you'd be well
advised to upgrade.

Yours,
Russ Magee %-)



Of course, you are right, I intend to upgrade, unfortunately some of the 
plugins I use, do not support newer versions of django so I will have to 
find a solution for that too.


Thanks a lot for your answer

--
 ------
 Nick Apostolakis
 Msc in IT, University of Glasgow
 e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: 403 Forbidden messages when saving items in django-admin

2013-10-06 Thread Nick Apostolakis
Ask if Apache mod sec  is installed on the server
If it is it can account for a lot of weirdiness
Στις 06 Οκτ 2013 7:48 μ.μ., ο χρήστης "Alban Hertroys" 
έγραψε:
>
> On Sunday, October 6, 2013 6:09:22 PM UTC+2, אברהם סרור wrote:
>>
>> > You don't have permission
>> the error seems to be fairly descriptive.
>> you need to log in the django admin as superuser and grant permission to
the users
>
>
> Are you sure? That doesn't seem to match my description of the problem.
> What they try to save does get saved. It's only after saving the data
that the 403 gets fired.
>
> I'll see if I can get the server maintainer to look into that; I don't
have a superuser account, so I can't verify what's happening there.
>
> I think this problem started popping up after an upgrade of Django or
after migration to a new server (the old one apparently got retired at some
point). Frankly, it's difficult to determine when this started happening as
the site owners are fairly lax about updating content - it's probably been
half a year since they last attempted to edit anything...
>
> --
> 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/c344a1dd-521d-44fe-aa49-cbe867bb8dc9%40googlegroups.com
.
>
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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/CA%2BTu-wyYj1_1aGNAkvwvEo0er3JOG-b3iaoXpHHZYDo6nNyVZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Registration in django

2013-10-16 Thread Nick Apostolakis

On 16/10/2013 05:24 μμ, Harjot Mann wrote:

On Wed, Oct 16, 2013 at 7:26 PM, Jaimin Patel  wrote:

you will need to update the registration/forms.py in order to add any
additional field. When you adding organization name or any other field you
must be creating some kind of profile for the user, so you should be able to
store and retrieve the information to display on dashboard or anywhere else.

Also using django-registration doesn't restrict you from modifying and
adding more forms for your application.


But changing in forms is not doing any change. Its models id coming
from auth.models i.e User. How can I do the changes in it?

Hello there, I am using django-registration too. I have elected to add 
the user details later in a secondary table (named as extra user 
attributes in my case) that is linked with the user table.

This is filled from the user after the registration.
Just my 2 cents, it may suit your needs too

--
 ------
 Nick Apostolakis
 Msc in IT, University of Glasgow
 e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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/525EC0DB.4010802%40oncrete.gr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Google Maps with Routes

2013-11-09 Thread Nick Apostolakis
Hello there,

why don't you use openstreetmap service instead of google maps.
I am not an expert but it seems that there are a few references relating
django and openstreet map
a couple from a google search are:

http://wiki.openstreetmap.org/wiki/Editors/Django
https://github.com/etnalubma/django-osm
http://www.slideshare.net/mishok13/making-use-of-openstreetmap-data-with-python


personally, I have used osmand to capture gpx track data and then upload
them to openstreet map and create a bike route
or http://www.gpsvisualizer.com/ if you want just to plot your track


On Sun, Nov 10, 2013 at 6:22 AM, Vibhu Rishi  wrote:

> Hi Guys,
>
> As a hobby project I am working on a website for my motorycle touring
> group  ( A very early alpha is on http://www.bikenomads.co.in )
>
> I am working on the trip module and one of the things I want to work on is
> a graphical trip route. I checked a few google map modules for django and
> they seem more of just showing the map for a location.
>
> Can you provide me some pointers for any apps which will allow me to have
> point and click route added ? or any ideas as to how to implement it.
>
> Regards,
> Vibhu
>
> --
> Simplicity is the ultimate sophistication. - Leonardo da Vinci
> Life is really simple, but we insist on making it complicated. - Confucius
>
> --
> 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/CAPiONwnuV6vDGtkuK%2BfNyNePd0rOdO0gsxGQ-URoQ_iu8%2BcioQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
 --
 Nick Apostolakis
 Msc in IT, University of Glasgow
 e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

-- 
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/CA%2BTu-wxrfhJ-H%2BzdXY976bjm%2BNL-YTA-t_%2BStjkTQAtc0DVztQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Google Maps with Routes

2013-11-10 Thread Nick Apostolakis

Στις 10/11/2013 01:19 μμ, ο/η Vibhu Rishi έγραψε:

Hi Nick,

I am not sure if openstreet will solve my purpose. What I have in mind is
that when someone is planning a trip , he can enter the route details in
the trip info. This should give the approximate distance etc. ( btw bike =
motorcycle here in India). Also apart from google maps I have not really
come across any mapping service which has a good coverage of roads and
cities in India.

vibhu


Vibhu

I understand, what you are looking for seems like an application of 
geodjango and a classic gis application.
Still using openstreet map will give you access to a lot of information 
even if the data are not complete, alternatively you could use tha 
google maps api but I am not sure if it is free, and even if it is free 
today you have no guarantee that it will be tomorrow.


Speaking about my area, which is a small village in the southern Crete, 
Greece, I see that most main roads are mapped in openstreet map.
I have already improved the existing data by adding a few small villages 
that where missing, and today
I have added some agricultural roads in the near vicinity. May be your 
case is similar.


Anyway here is a tutorial with geodjango and google maps, that may come 
close to what you are after


http://invisibleroads.com/tutorials/geodjango-googlemaps-build.html

and some map related django packages

https://www.djangopackages.com/grids/g/maps/

nothing special with the links, you can find a lot more, just by 
googling geodjango and maps.


Keep in mind the risk of google changing the license and pricing of 
their api (e.g the translation api used to be free of charge, now it has 
a price)


Cheers

--
 --
 Nick Apostolakis
 Msc in IT, University of Glasgow
 e-mail: nicka...@oncrete.gr
 Web Site: http://nick.oncrete.gr
 --

--
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/527F8550.7000508%40oncrete.gr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need some advise on how to use a RESTful API

2013-12-20 Thread Nick Apostolakis
Hello there,
In my point of view, when you develop an app using a rest full api you go
through the same moves as when writing the web app using the native
interface.
In my case I have created both. I wrote first the web interface and then
the api, but a different approach would be to write first the api and then
use a restful capable framework in order to create the web interface if
needed, along with the mobile restful capable clients. It depends on your
workflow.
Στις 20 Δεκ 2013 6:45 μ.μ., ο χρήστης "Mario Osorio" 
έγραψε:

> I need to work on a django app that will eventually benefit from a RESTful
> API so it can be used from any web browser as well a from apps writtens for
> iOS and Android.
>
> Being so new to django development I don't even have any ideas on how to
> use a RESTful API, for example,
>
>
>1. Should I begin the development use a RESTful API, or should I add
>ir when needed? ( it IS going to be used anyways)
>2. Of course I understand I'm adding another layer of work to the
>final product but, can someone please explain how bad deep and how
>complicated this layer might be?
>3. I've found a couple of online tutorials and I'll soon be working on
>them, but I honestly think there is nothing quite like reading the opinions
>of different people as to what the workflow with a RESTful API in django
>implies. I think a simple overview of the general workflow will answer most
>of the questions I have in mind right now.
>
> Thanks a lot in advanced!
>
> --
> 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/cc10edc2-e978-461e-986f-43dd73eea63e%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CA%2BTu-wwW%3DH71d%2BoqE2oTdNatHQhonCE9STMas7ir8YAxZ8Zj%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.