Re: How to Detect Current Page as Homepage?

2012-03-25 Thread Kev Dwyer
easypie wrote:

> I'm trying to check {% if homepage %} then show  {% endif %}
> 
> I'm not sure how to go about a test to check the current page if it's my
> homepage. Do I need to mess around with context processors? What's the
> usual way of doing it? And how would the {% if ... %} look like?
> 

Assuming your home is named "home" in your urls.py, you could try:

{% url home as home %}

{% if request.path == home %}{% endif %}

-- 
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: __unicode__ and return.self

2012-03-25 Thread Masklinn
On 2012-03-25, at 06:27 , spike wrote:
> Thanks for the reply.
> 
> Why am I only returning one or two fields from each model? If I define 5 
> fields, shouldn't I return all 5?

There is no "should" when it comes to __unicode__, you can return
whatever you want. But the *purpose* of unicode is to return a
human-readable default identification/representation of the object, not
to encode the object's state.

For instance let's say you're creating a mass transit site with bus
lines. A bus line may have dozens of attributes with various information
such as the line's endpoints or the line's supervisor or whatever. But
you don't want to display those every time you refer to the bus line.
Instead, you probably just want "Line ". That's what
you set up in __unicode__, a single field:

def __unicode__(self):
return u"Line %s" % self.line_number

Side-note: neither `return` nor `__unicode__` are features of Django,
you may want to read through the Python tutorial at least.

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



default setting module undefiend

2012-03-25 Thread Randa Hisham
hey
i try to run aproject and i got that error
default setting module undefiend
-- 
Randa Hesham
Software Developer

Twitter:@ro0oraa 
FaceBook:Randa Hisham 

ٍ

-- 
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: Keep getting 404 error

2012-03-25 Thread Sergiy Khohlov
try to open http://127.0.0.1:8000/hello

2012/3/25 Sithembewena Lloyd Dube :
> Hi Mika,
>
> Welcome to Django.
>
> I think the issue is that the URL 'http://127.0.0.1:8000/' merely points to
> your local machine's port (8000), whereas you want to browse to
> 'http://127.0.0.1:8000/hello/' - which is the URL defined in your urls.py
> file which maps to your "homepage" view (hello).
>
>
> On Sat, Mar 24, 2012 at 11:40 PM, Mika  wrote:
>>
>> I'm a total newbie to django and just started the book. I created a
>> project and I'm now trying to create my first page, but I keep getting
>> an error page that says:
>>
>> Page not found (404)
>> Request Method: GET
>> Request URL:    http://127.0.0.1:8000/
>> Using the URLconf defined in redlab.urls, Django tried these URL
>> patterns, in this order:
>> ^hello/$
>> The current URL, , didn't match any of these.
>>
>>
>> Here's what's in my urls.py file:
>>
>> from django.conf.urls.defaults import*
>> from redlab.views import hello
>>
>> urlpatterns = patterns('', ('^hello/$', hello),)
>>
>> # Uncomment the next two lines to enable the admin:
>> # from django.contrib import admin
>> # admin.autodiscover()
>> # Examples:
>>    # url(r'^$', 'redlab.views.home', name='home'),
>>    # url(r'^redlab/', include('redlab.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)),
>>
>>
>> please advise. thnx.
>>
>> --
>> 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.
>>
>
>
>
> --
> Regards,
> Sithembewena Lloyd Dube
>
> --
> 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.

-- 
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: Automatic indexes on foreign keys

2012-03-25 Thread Aryeh Leib Taurog
On Mar 23, 3:56 pm, Javier Guerra Giraldez  wrote:
> On Fri, Mar 23, 2012 at 4:37 AM, Aryeh Leib Taurog  wrote:
>
> > My understanding is that one usually
> > wants an index on the *referenced* field, not the *referencing*
> > field.
>
> it's for the back-reference link.  so that you can do
> group.item_set.all() and get all the items that share a group.

Ah, okay.  Yes, this would definitely improve performance of that
query.  But why the second index (varchar_pattern_ops in postgresql)?

> yes, the unique_together index implies the other one and could be
> used, but Django doesn't do that analysis for you.  yes, it seems you
> could drop the index, but be sure to test if any of your queries is
> affected.

Thanks!

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



Creating pdf files

2012-03-25 Thread NENAD CIKIC
Hello!
I am novice django user, and now i want to create pdf documents.
Following the official docs at 
https://docs.djangoproject.com/en/dev/howto/outputting-pdf/
it seems the reportlab is suggested to be used.
The problem is that the installer does not work for python 2.7.2, for
windows. I have succesfully installed the reportlab on my ubuntu
virtualbox, but if it is possible i would like to continue development
on windows.
Are there any way to install reportlab on windows?
On the same page other options are listed:
pdflib
pisa

On pip there is a pypdflib. Is this the same as pdflib?

In anycase, what is the suggested way to generate simple pdf files
(invoices with a logo and some text). Any example?

Thanks
Nenad

-- 
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: __unicode__ and return.self

2012-03-25 Thread Jonathan Baker
You're only returning two fields from the __unicode__ method, not the model
as a whole. All of the fields are available when importing the model. The
__unicode__ method simply affects how a record from a model is displayed
within particular areas such as the admin (but not regular template output).

On Sat, Mar 24, 2012 at 10:27 PM, spike  wrote:

> Thanks for the reply.
>
> Why am I only returning one or two fields from each model? If I define 5
> fields, shouldn't I return all 5?
>
>
> On Saturday, March 24, 2012 9:19:51 PM UTC-7, jondbaker wrote:
>
>> The __unicode__ method allows models to return a more usable
>> representation of a record instead of a unicode object. This is useful in a
>> variety of places, from the Django admin to using the manage.py shell on
>> the command line.
>>
>> The return statement effectively ends the execution of a particular
>> function or method by returning something (an object, string, whatever you
>> may need to return for the task at hand).
>>
>> On Sat, Mar 24, 2012 at 10:10 PM, spike  wrote:
>>
>>> Running the tut here:
>>> https://docs.djangoproject.​com/en/1.1/intro/tutorial01/
>>> but I'm having trouble understanding what the point of __unicode__ is.
>>> Also, what is the point of the return statements? I've read the docs over
>>> and over but don't get it.
>>>
>>> --
>>> 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/-/​jKgyKR2iRdgJ
>>> .
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscribe@​googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/​group/django-users?hl=en
>>> .
>>>
>>
>>
>>
>> --
>> Jonathan D. Baker
>> Web Developer
>> http://jonathandbaker.com
>> 303.257.4144
>>
>  --
> 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/-/IFpUg5EEj7oJ.
>
> 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.
>



-- 
Jonathan D. Baker
Web Developer
http://jonathandbaker.com
303.257.4144

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



IE9+Django,Don't respond or Socket error!!!

2012-03-25 Thread Aommonly
===

Exception happened during processing of request from ('127.0.0.1',
60076)
Traceback (most recent call last):
  File "C:\Python27\Lib\SocketServer.py", line 284, in
_handle_request_noblock
self.process_request(request, client_address)
  File "C:\Python27\Lib\SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
  File "C:\Python27\Lib\SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "E:\workspace\Police\lib\site-packages\django\core\servers
\basehttp.py",
line 560, in __init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "C:\Python27\Lib\SocketServer.py", line 639, in __init__
self.handle()
  File "E:\workspace\Police\lib\site-packages\django\core\servers
\basehttp.py",
line 600, in handle
self.raw_requestline = self.rfile.readline()
  File "C:\Python27\Lib\socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 10054]




what can I  do

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



playing with random number

2012-03-25 Thread Nikhil Verma
Hi all

I have a list say

li = [13,2,13,4]

Now i want to use random number such that the list modifies into a
dictionary like this:-

di = {13: 'abc',2:'def',13:'abc',4:'xyz'}

Point to be noted is if the list contains the number it should generate the
same random number.
How can i achieve this ?

Thanks in advance.

-- 
Regards
Nikhil Verma
+91-958-273-3156

-- 
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: Creating pdf files

2012-03-25 Thread Python_Junkie
Did you use the windows exe to install or did you use the zip file.

The zip file should work with any python installation

after unzipping the files, cd into the directory that included the setup.py 
file.

then use the following command line

explicitly use python27

cd into the unzipped directory

c:\some_unzip_directory>  c:\python27\python.exe  setup.py install

Good luck

On Sunday, March 25, 2012 9:48:04 AM UTC-4, NENAD CIKIC wrote:
>
> Hello! 
> I am novice django user, and now i want to create pdf documents. 
> Following the official docs at 
> https://docs.djangoproject.​com/en/dev/howto/outputting-​pdf/
>  
> it seems the reportlab is suggested to be used. 
> The problem is that the installer does not work for python 2.7.2, for 
> windows. I have succesfully installed the reportlab on my ubuntu 
> virtualbox, but if it is possible i would like to continue development 
> on windows. 
> Are there any way to install reportlab on windows? 
> On the same page other options are listed: 
> pdflib 
> pisa 
>
> On pip there is a pypdflib. Is this the same as pdflib? 
>
> In anycase, what is the suggested way to generate simple pdf files 
> (invoices with a logo and some text). Any example? 
>
> Thanks 
> Nenad 
>

-- 
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/-/dQjZMSoyMWEJ.
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: all(), get(), create(), count(). More info?

2012-03-25 Thread creecode
Hello MF-DOS,

If you're just getting started with Django you might want to use the latest 
release tutorial .  
Of course you'll also want the 
latestDjango release.

Whatever version you use make sure that the Django documentation and code 
versions are in sync.

I mention this because folks have been caught out by not using the same 
versions.

On Saturday, March 24, 2012 10:31:30 PM UTC-7, MF-DOS wrote:

Running this tut: 
https://docs.djangoproject.​com/en/1.1/intro/tutorial01/
 
>

Toodle-lo
creecode 

-- 
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/-/PBM_5AiRFEAJ.
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: playing with random number

2012-03-25 Thread Denis Darii
Nikhil please only django related questions here. Write to python-users
group for your problem but only after googling it... I'm pretty sure you
will find lots and lots of related questions/solutions.

Denis.

On 25 March 2012 19:07, Nikhil Verma  wrote:

> Hi all
>
> I have a list say
>
> li = [13,2,13,4]
>
> Now i want to use random number such that the list modifies into a
> dictionary like this:-
>
> di = {13: 'abc',2:'def',13:'abc',4:'xyz'}
>
> Point to be noted is if the list contains the number it should generate
> the same random number.
> How can i achieve this ?
>
> Thanks in advance.
>
> --
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>  --
> 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.
>



-- 
I'm using Linux because i'm freedom dependent.

-- 
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: How to Detect Current Page as Homepage?

2012-03-25 Thread easypie
wow. thank you very much! i didn't know the extra string passed in patterns 
inside a tuple was used in that way too. Does this have to do with 
get_absolute_url too?


This is what I did:

{% url satchmo_shop_home as home %}
{% if request.path == home %}{% endif %}

urlspatterns += patterns('satchmo_store.shop.views',
(r'^$', 'home.home', {}, 'satchmo_shop_home'),
...
)

On Sunday, March 25, 2012 12:49:33 AM UTC-7, Kev Dwyer wrote:
>
> easypie wrote:
>
> > I'm trying to check {% if homepage %} then show  {% endif %}
> > 
> > I'm not sure how to go about a test to check the current page if it's my
> > homepage. Do I need to mess around with context processors? What's the
> > usual way of doing it? And how would the {% if ... %} look like?
> > 
>
> Assuming your home is named "home" in your urls.py, you could try:
>
> {% url home as home %}
>
> {% if request.path == home %}{% endif %}
>
>

-- 
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/-/Hizfo9TSvBIJ.
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: Question about threading a view[REPOSTED]

2012-03-25 Thread Arruda
Thanks every one, and yes, I'm heaving problem with the project in 
production... 
I'm using fstcgi and nginx, and when it's called that view it just don't 
run in background, or run once and then it's stops...

So I'm thinking of using django-celery... but just have one more question...
Javier, you said that with celery you can use the @task thing ins't it?
But to make the celery work in the production I need to make some crazy 
confs in a virtualhost to it work?
Or just use the @task + manage.py? (I still have hope that it's stupid easy 
as that to use it xD).

Thanks!

Em terça-feira, 20 de março de 2012 12h01min47s UTC-3, Javier Guerra 
escreveu:
>
> On Tue, Mar 20, 2012 at 9:52 AM, Arruda 
> > 
> wrote:
> > But I still wanted to know how to use the celery in this case =/
>
> the idea is to use a Queue:
>
> you have a separate process (typically implemented in a manage
> command) that stays running, and waits for messages in the queue.
>
> when the web app wants to do some slow processing, writes any needed
> parameters to the queue and returns with a 'wait...' message
>
> the background process receives the queue item and does the process
> without tying up the web response.
>
>
> the first implementation almost everybody does is called "Ghetto
> queues", it consist of writing the parameters to the database in a
> 'todo' table, and a cron process that periodically checks these todo's
> and processes them.  it works, but falls down at a certain load.
> after that, you need a real queue manager; either RabbitMQ, Redis
> Queues, or a lot of other options.
>
> Celery is a python package that allows you to simply add a '@task'
> decorator to any function; so that when you call them, they're not
> executed, but instead the argument list is pushed to a queue.  it also
> creates an admin command that does the queue reading and actually
> calls the functions with the arguments it founds on there.
>
> -- 
> Javier
>
>

-- 
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/-/eHejT5-eTHQJ.
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.



Adding link to admin page

2012-03-25 Thread Larry Martell
I have a client that has an app built with django. On every page of
their app is a link to their admin site. They tell me the admin site
is generated entirely by django, and they've never customized it
before. On the very first line of the admin page it says:

Django administration  Welcome, admin. Change password / Log out

They want me to add a link to that line, to the left of "Django
administration" that will take them back to the page they were on when
they clicked on the link to get them to the admin site.

So I have 2 issues here:

1) How do I override that line to add the link? It appears that page
is generated by contrib/admin/templates/admin/base.html, and I tried
to override it by following the directions at
https://docs.djangoproject.com/en/1.2/ref/contrib/admin/#overriding-admin-templates,
but whatever I do seems to have no effect.

2) How can I get the link of the page of the app they came from? It's
not simply just going back one page, as they could have navigated all
over the place of the admin site before clicking the "Back to app"
link.

Thanks!
-larry

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



Tweepy Status Error

2012-03-25 Thread coded kid
Hi guys, I been trying to iterate over status, but I’m getting this
error:

Traceback :
 File “”, line 2, in 
NameError: name ‘process_status’ is not defined.

Below is the codes:

from tweepy import Cursor
for status in Cursor(api.user_timeline).items():
process_status(status)

What I’m I doing wrong? Thanks!

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



Sending data to the server

2012-03-25 Thread drk
Hi, so I have a application that works offline (with localStorage),
and now I'm trying to get it to work in a server.

I'm having a problem sending the data to server, I'm using jquery:

$.ajax({

type: 'POST',
url: 'http://mysite.aa/logout/',
data: JSON.stringify( stuff ),
contentType: 'text/plain; charset=utf-8',
complete: function() { console.log('complete'); }
});

and I get a 403 error.

In chrome's console:

POST http://mysite.aa/logout/ 403 (FORBIDDEN)
XHR finished loading: "http://myserver.aa/logout/";

In server:
[25/Mar/2012 17:20:43] "POST /logout/ HTTP/1.1" 403 2282


Any ideas?

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



How to adjust grid in Django Admin Forms

2012-03-25 Thread traveller3141
I've just created a model in Django and want to use the admin form to
enter information for it. The problem I'm having is that my field
names are so long that they overlap the edit boxes where their values
are to be entered.

If one follows the tutorial in the Django website, it's as if the
label "Question:" overlapped the edit box where one was supposed to
enter a question.

Any thoughts, comments or suggestions would be greatly appreciated.

Thanks

-- 
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: How to Detect Current Page as Homepage?

2012-03-25 Thread Python_Junkie

You can retrieve the url variable that you are interested in with 
evaluating this variable
request.path

Use this link for more details

http://www.djangobook.com/en/2.0/chapter07/

This is an example from the above source

def current_url_view_good(request):
return HttpResponse("Welcome to the page at %s" % request.path)




On Sunday, March 25, 2012 3:49:33 AM UTC-4, Kev Dwyer wrote:
>
> easypie wrote:
>
> > I'm trying to check {% if homepage %} then show  {% endif %}
> > 
> > I'm not sure how to go about a test to check the current page if it's my
> > homepage. Do I need to mess around with context processors? What's the
> > usual way of doing it? And how would the {% if ... %} look like?
> > 
>
> Assuming your home is named "home" in your urls.py, you could try:
>
> {% url home as home %}
>
> {% if request.path == home %}{% endif %}
>
>

-- 
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/-/gXYW34-7QAoJ.
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: Creating pdf files

2012-03-25 Thread Python_Junkie
I see from your link that there are 2 possible downloads to enable you to 
install the software that you want.

If you are having issues with the windows 2.7 exe, just use the zip file.

Then you can install the software by executing the following command after 
unzipping the file in windows.

c>  cd into the directory that contains the setup.py file

Then explicity install the software with python version2.7

c:\directory_where_setup_file_lives> c:\python27\python.exe setup.py install

Good luck



On Sunday, March 25, 2012 9:48:04 AM UTC-4, NENAD CIKIC wrote:
>
> Hello! 
> I am novice django user, and now i want to create pdf documents. 
> Following the official docs at 
> https://docs.djangoproject.​com/en/dev/howto/outputting-​pdf/
>  
> it seems the reportlab is suggested to be used. 
> The problem is that the installer does not work for python 2.7.2, for 
> windows. I have succesfully installed the reportlab on my ubuntu 
> virtualbox, but if it is possible i would like to continue development 
> on windows. 
> Are there any way to install reportlab on windows? 
> On the same page other options are listed: 
> pdflib 
> pisa 
>
> On pip there is a pypdflib. Is this the same as pdflib? 
>
> In anycase, what is the suggested way to generate simple pdf files 
> (invoices with a logo and some text). Any example? 
>
> Thanks 
> Nenad 
>

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



philosophy behind sites and applications in Django

2012-03-25 Thread Jojo
Hi guys, I'm new in Django (I started with the 1.3 and now I'm playing with 
the 1.4) and I'd like to understand better the phylosophy behind the 
concepts of sites and applications.
Ok a site can contain multiple applications and an application can live in 
many sites, that's simple.

Now.

For me a site is like a "container" of applications and every application 
accomplish a particular job just like manage polls, articles and so on. But 
a site must have its own graphic style, and in particular common parts, 
just like user management.

How do you handle these "trasversal" (common) components?
For example, is it possible to define a css at site level? How to deal with 
user management and other commont funcionalities?

These are only generic questions, I hope someone can give me a full 
explanation, or at least point me in the right direction.

Thank you to everybody and good work!

-- 
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/-/xM3TUeVaOA4J.
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: Creating pdf files

2012-03-25 Thread Matthias Mintert

This should help with reportlab issues on windows:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#reportlab

-- 
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/-/z9vJIG34C3AJ.
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: Creating pdf files

2012-03-25 Thread NENAD CIKIC
Thanks, the install worked.

On 26 ožu, 02:37, Matthias Mintert  wrote:
> This should help with reportlab issues on 
> windows:http://www.lfd.uci.edu/~gohlke/pythonlibs/#reportlab

-- 
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: Creating pdf files

2012-03-25 Thread NENAD CIKIC
I think i will use the pdfdocument wrapper
pip install pdfdocument
The author Matthias Kestenholz has created a wrapper for reportlib; at
first glance it seems easy to use.
Acknowledges to another one Matthias:)

https://github.com/matthiask/plata/tree/master/plata/reporting

On 26 ožu, 03:39, NENAD CIKIC  wrote:
> Thanks, the install worked.
>
> On 26 ožu, 02:37, Matthias Mintert  wrote:
>
>
>
>
>
>
>
> > This should help with reportlab issues on 
> > windows:http://www.lfd.uci.edu/~gohlke/pythonlibs/#reportlab

-- 
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: philosophy behind sites and applications in Django

2012-03-25 Thread Mario Gudelj
The easiest thing to do is to create each site as a separate project.
Define a base template for that project inside templates directory and link
your css in that template. Extend that template in all your other
templates. Same goes for users.  Each project/site will have it's own db
and its users.

On 26/03/2012 11:22 AM, "Jojo"  wrote:

> Hi guys, I'm new in Django (I started with the 1.3 and now I'm playing
> with the 1.4) and I'd like to understand better the phylosophy behind the
> concepts of sites and applications.
> Ok a site can contain multiple applications and an application can live in
> many sites, that's simple.
>
> Now.
>
> For me a site is like a "container" of applications and every application
> accomplish a particular job just like manage polls, articles and so on. But
> a site must have its own graphic style, and in particular common parts,
> just like user management.
>
> How do you handle these "trasversal" (common) components?
> For example, is it possible to define a css at site level? How to deal
> with user management and other commont funcionalities?
>
> These are only generic questions, I hope someone can give me a full
> explanation, or at least point me in the right direction.
>
> Thank you to everybody and good work!
>
> --
> 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/-/xM3TUeVaOA4J.
> 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.
>

-- 
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: Tweepy Status Error

2012-03-25 Thread Babatunde Akinyanmi
What is wrong is clear. process_status is not defined or imported so
that's why you have that error. I don't know about tweepy but maybe
process_status is supposed to be imported from somewhere.

On 3/25/12, coded kid  wrote:
> Hi guys, I been trying to iterate over status, but I’m getting this
> error:
>
> Traceback :
>  File “”, line 2, in 
> NameError: name ‘process_status’ is not defined.
>
> Below is the codes:
>
> from tweepy import Cursor
> for status in Cursor(api.user_timeline).items():
> process_status(status)
>
> What I’m I doing wrong? Thanks!
>
> --
> 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.
>
>

-- 
Sent from my mobile device

-- 
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: Is there a place for new Django specialized hosting?

2012-03-25 Thread Mario Gudelj
None of those hosts AT mentioned are cheap (those that actually work) and
many of them are either in Beta or don't work. If you can do $10/month
hosting for a low traffic site and then charge more once the site starts
using a certain amount of bandwidth I think you have a business there.

On 23 March 2012 01:52, shacker  wrote:

> Agreed - hosting of any kind is a tough business these days - it's become
> so commoditized that prices are rock bottom and customer expectations
> extremely high. And there are tons of Django-optimized hosts out there
> already - search for "django hosting" for listings and comparative sites
> before even thinking of taking on a niche like this.
>
> ./s
>
>  --
> 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/-/6_yMq53AQTYJ.
>
> 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.
>

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