Re: Starting a new Python blog

2012-01-30 Thread Kevin
@Aaron, good suggestion, I'll definitely look into it for a future
update, if only Twitter supported RSS feeds.

@Kate, yes I have considered changing the style of the site.  I had no
idea the template would be so awkward when I first tested it.  Now
that there's content, the styling really hurts navigation and overall
usability.

@Wc, I will make the change to open bookmarks in a new window/tab.
There is also the live bookmark feature available for Desktop browser
users, should work in all major browsers.

Kevin

On Jan 30, 7:47 am, Katie Cunningham  wrote:
> Have you considered changing the styling of your site? It's a bit
> awkward to look at, since it looks like it was only made to fit on a
> much smaller screen. Perhaps you could look at Bootstrap, which is a
> much more flexible CSS framework?
>
> Katie
>
> On Mon, Jan 30, 2012 at 8:45 AM, Aaron Cannon
>
>
>
>
>
>
>
>  wrote:
> > For me, Twitter is the new RSS.  Any chance of setting up a feed for
> > new content notifications?
>
> > Thanks.
>
> > Aaron
>
> > On 1/30/12, Kevin  wrote:
> >> It is good to see some subscribers this early on.  Thank you.  I have
> >> rolled out the updates for Tutorials and set the foundation for the
> >> Review system by starting a list of packages I frequently use, and
> >> hope to later review.  I hope to have the full review system live by
> >> the end of this week.
>
> >> The tutorials will also use the package list I built to build a list
> >> of dependencies required for the tutorial itself.  I hope this makes
> >> it much easier to follow tutorials by knowing which Python packages
> >> will be required before hand.  The package list has a summary of the
> >> package and a link to the website where it is maintained.  There are
> >> currently 2 tutorials available for consumption.  Both are videos I
> >> made on YouTube for Rackspace Cloud last year, so if your curious
> >> about how Rackspace cloud works, do check them out.
>
> >> There is a separate RSS feed for the tutorials:
> >>http://www.pythondiary.com/tutorials.xml
>
> >> I am planning on making a "Digest" RSS Feed which will contain the
> >> latest posts from each section, but will also keep the separate feeds
> >> there for subscribers who only want the blog, or just tutorials.
>
> >> The site will remain ad-free for the time being, so that requests are
> >> quick for end-users.  I made use of the Django caching framework to
> >> also increase the response time.  I hope to keep the blog site quick
> >> and clean.
>
> >> Enjoy!
>
> >> On Jan 29, 5:06 pm, Mario Gudelj  wrote:
> >>> Same :)
>
> >>> On 29 January 2012 19:11, Anler Hernandez Peral  wrote:
>
> >>> > you have one subscriber over here and waiting to see more posts ;)
>
> >>> > --
> >>> > anler
>
> >>> > On Sat, Jan 28, 2012 at 9:35 PM, Kevin  wrote:
>
> >>> >> Hello Everyone,
>
> >>> >>  For sometime now I have been itching to create a Python blog, and
> >>> >> now the fruits of my labor have paid off.  I am ready to release the
> >>> >> blog to the public eyes.  At the moment it has 2 main features, a blog
> >>> >> portion, and a bookmark system.  Both the blog and the bookmark system
> >>> >> offer an RSS Atom feed.  The bookmark system is fully compatible with
> >>> >> "Live Bookmarks" to quickly access some of my top Python sites I visit
> >>> >> or visited recently which caught my eye.
>
> >>> >>  The website is called "Python Diary", a rather unique take on a tech
> >>> >> blog name.  The site itself has a diary-like theme, and is for the
> >>> >> most part very easily to navigate.  The website was completely built
> >>> >> using Python, the theme was taken from a wordpress theme website and
> >>> >> formatted to work with the Django template system.  The entire backend
> >>> >> is written from scratch using a few reusable Django apps, namely,
> >>> >> django-tagging, south, and cumulus.
>
> >>> >>  Now you might be saying, "Oh great, yet another Python blog".  But
> >>> >> wait...  I plan on setting this blog apart from the thousands of other
> >>> >> blogs in the world with some very unique features.  Features normally
> >>> >> found on commercial software blogs, movie and video game blogs is a
> >>> >> thorough review system.  I plan on going through many of the available
> >>> >> Python packages out there in the wild and basically reviewing them
> >>> >> like one would review anything else.  I do not see a dedicated Python
> >>> >> website which has reviews of many Python packages available in PyPi.
> >>> >> I plan on stating the usual pros and cons of the package, and
> >>> >> providing a score.  For example of how this type of review is
> >>> >> formatted, take a look at a CNET Review.
>
> >>> >> My new blog can be found here:http://www.pythondiary.com/
>
> >>> >>  Tell me what you think of the website in general, and the overall
> >>> >> idea 

Creating a hierarchy of objects in my api.py

2012-01-30 Thread St@n
Hello,

I am playing around with tastypie and i want to create a hierarchy of
data.

What i currently have is this:


class keywordResource(ModelResource):
tweets = fields.ToManyField(timelineResource, 'tweets', full=True)
class Meta:
queryset = Keyword.objects.all()
resource_name = 'keyword'
excludes = ['id', 'keyword_id']
include_resource_uri = False

def alter_list_data_to_serialize(self, request, data_dict):
if isinstance(data_dict, dict):
if 'meta' in data_dict:
# Get rid of the "meta".
del(data_dict['meta'])
# Rename the objects.
data_dict['keyword'] = copy.copy(data_dict['objects'])
del(data_dict['objects'])
return data_dict



Can someone explain the relationship to me in creating such a
hierarchy?

in the line tweets = fields.ToManyField(timelineResource, 'tweets',
full=True)

it means that timelineResource is a child of Keyword right? and
"tweets" would be the column name in timeline table or just a generic
name?

or must i map a matching column that appears in both tables (keyword,
timeline)?


Thank you

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



Proper way of building model classes in app using 2 databases

2012-01-30 Thread Piotr Wierzgała
Hi,

I'm writting an app which uses 2 databases and I'm wondering how I
should build model classes for tables from second database (which I
only use to read data).

I have a models.py module in my app's package where I defined all the
model classes I needed. I also defined there model classes from second
database but I added "managed = False" meta option to them because I
don't want syncdb to create or reset them. The problem appears when I
do datadump. I got an error telling that a relation "xxx" does not
exists, where "xxx" is relation from second database marked with
"managed = False".

The problem disappears when I create a separate package for model
classes from second database (without adding it to installed apps).
I'd like to ask if solving that problem in such way i the right way?

-- 
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: admin list_filter: limit choices to model values?

2012-01-30 Thread JHeasly
In 1.4/trunk, looks like filterspec.py gets replaced by filters.py (as part 
of adding the ability to filter a list_filter), so we'll just sit tight and 
wait for 1.4 to be released (rather than have to go  back and remove the 
defunct filterspec code).

— John

-- 
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/-/fHJwHJZDaZMJ.
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 need help with Python Tools for Visual Studio 2010 and Django

2012-01-30 Thread JJ Zolper
I have never heard of Guess Additions thanks for the tip!

Right now I am going to remove my Ubuntu installation and re-install to 
give it more RAM and Video memory as well as install guest Additions!

Thanks,

JJ

-- 
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/-/Zd1wCdtXBgMJ.
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: Routing to database based on user

2012-01-30 Thread akaariai
I forgot one thing: be cautious with transactions. The transaction
middleware will start a transaction only on 'default' alias. So, you
will probably need to use the transactions.commint_on_success /
commit_manually with the using parameter to make this work reliably.
Or write your own transaction middleware. If you need multidb-spanning
transactions you are in trouble. Or, at least if you need two phase
commit...

 - Anssi

On Jan 31, 12:45 am, akaariai  wrote:
> On Jan 31, 12:01 am, Tom Eastman  wrote:
>
>
>
>
>
>
>
>
>
> > Hey guys,
>
> > I'm writing a django project that will require me to route queries to
> > certain large databases based on who the logged in user is.
>
> > So all the tables for django.contrib.auth and session and stuff will be
> > in the 'central' database, as well as a table that maps users to which
> > database they need to use for the main app.
>
> > Can you help me come up with a way of routing database queries this way
> > using a Django database router?
>
> > At the start of the view could I take the logged in user from
> > request.user or wherever it is, and some how provide that variable to my
> > database router for the rest of the request?
>
> > All suggestions welcome.
>
> I assume that settings.DATABASES have all the needed per-user
> databases defined.
>
> I think the best solution forward is to use threading.local to store
> the request.user. So, something like this should work:
>   - have a middleware that stores the request.user in threading.local
>   - database routers just fetch the request.user from the
> threading.local storage.
>
> You could also play with the connections dictionary, something like
> this should work in 1.4:
>
> Have a special database alias 'per_user_db'. Assuming alias 'thedb2'
> is the correct database to use for the user, you would then in a
> middleware do this:
> django.db.connections['per_user_db'] = django.db.connections['thedb2']
> This should work in the upcoming 1.4, but in 1.3 you will get problems
> due to threading.
>
> Now, you will just always route your queries to 'per_user_db'.
>
> For example:
> SomeModel.objects.create(field1=val1, ...)
> connections['default'] = connections['other']
> print SomeModel.objects.all()
> will print an empty list, but if you comment out the assignment, you
> will see the just created object in the DB.
>
> As said, the above should work correctly in multithreaded environment
> only in the upcoming 1.4. In 1.3 the connections assignment will be
> global, and you will get weird errors! Note that I haven't actually
> tested this in multithreaded environment.
>
>  - Anssi

-- 
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: Routing to database based on user

2012-01-30 Thread akaariai
On Jan 31, 12:01 am, Tom Eastman  wrote:
> Hey guys,
>
> I'm writing a django project that will require me to route queries to
> certain large databases based on who the logged in user is.
>
> So all the tables for django.contrib.auth and session and stuff will be
> in the 'central' database, as well as a table that maps users to which
> database they need to use for the main app.
>
> Can you help me come up with a way of routing database queries this way
> using a Django database router?
>
> At the start of the view could I take the logged in user from
> request.user or wherever it is, and some how provide that variable to my
> database router for the rest of the request?
>
> All suggestions welcome.

I assume that settings.DATABASES have all the needed per-user
databases defined.

I think the best solution forward is to use threading.local to store
the request.user. So, something like this should work:
  - have a middleware that stores the request.user in threading.local
  - database routers just fetch the request.user from the
threading.local storage.

You could also play with the connections dictionary, something like
this should work in 1.4:

Have a special database alias 'per_user_db'. Assuming alias 'thedb2'
is the correct database to use for the user, you would then in a
middleware do this:
django.db.connections['per_user_db'] = django.db.connections['thedb2']
This should work in the upcoming 1.4, but in 1.3 you will get problems
due to threading.

Now, you will just always route your queries to 'per_user_db'.

For example:
SomeModel.objects.create(field1=val1, ...)
connections['default'] = connections['other']
print SomeModel.objects.all()
will print an empty list, but if you comment out the assignment, you
will see the just created object in the DB.

As said, the above should work correctly in multithreaded environment
only in the upcoming 1.4. In 1.3 the connections assignment will be
global, and you will get weird errors! Note that I haven't actually
tested this in multithreaded environment.

 - Anssi

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



Routing to database based on user

2012-01-30 Thread Tom Eastman
Hey guys,

I'm writing a django project that will require me to route queries to
certain large databases based on who the logged in user is.

So all the tables for django.contrib.auth and session and stuff will be
in the 'central' database, as well as a table that maps users to which
database they need to use for the main app.

Can you help me come up with a way of routing database queries this way
using a Django database router?

At the start of the view could I take the logged in user from
request.user or wherever it is, and some how provide that variable to my
database router for the rest of the request?

All suggestions welcome.

Cheers!

Tom



signature.asc
Description: OpenPGP digital signature


Re: Django Admin completely empty

2012-01-30 Thread darwin_tech
hmmm. I am the superuser, but I went ahead and tried the createuser
command to make another. Still the same in the admin. No models or
user/privilege options. The strange thing is there are boxes where you
would expect apps/models top be, but they are totally empty.

Any other suggestions?

Sam

On Jan 30, 3:40 pm, Andres Reyes  wrote:
> Do you have permissions on the models you want to see?
>
> You can create a new superuser with
> python manage.py createsuperuser
>
> 2012/1/30 darwin_tech :
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > On my development server my Django Admin works as expected, showing
> > all my
> > models and the auth models. However, on the production server, even
> > though the whole application works fine, when I log into the admin I
> > see nothing. No models, no auth. Just a stack of empty boxes.
> > If anyone has any idea as to why this might be, your input would be
> > much appreciated.
>
> > Sam
>
> > --
> > 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 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Andrés Reyes Monge
> armo...@gmail.com
> +(505)-8873-7217

-- 
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 Deploy - Some Questions regarding it

2012-01-30 Thread akaariai
I don't know much about nginx, but here are some pointers:

First, this page seems good source of information:
https://code.djangoproject.com/wiki/DjangoAndNginx

Now, take note of the "location /site_media" directive in the above
link. This is basically telling the server that when there is a
request for localhost/site_media/some_file then check some_file from /
media. This is the main point here. You are serving the media from
filesystem path /media, and it is accessible from the 
www.somesite.com/site_media/
URL. I don't know about nginx, but it is probably crucial that the
location site_media is _above_ the other location directives.

If you are able to serve some static files from site_media/ path and
Django from root path you are close to solution. Then, using the above
example where /site_media was mapped to filesystem path /media, you
will need to actually have the media files under /media/ file system
path. This is best done using Django's static media application. You
also need to tell Django to upload the files to /media directory.
Check Django's uploading files documentation for how to do this.
Helping links:
https://docs.djangoproject.com/en/dev/howto/static-files/
https://docs.djangoproject.com/en/dev/topics/http/file-uploads/

Sorry if some/all of the above is obvious to you. You have so many
questions packed in one post that it is hard to tell what exactly is
your question :)

Handling uploaded files and static media can be a little hard at
first. The new (as of 1.3) static media handling is actually very
good, but many net resources still use the old way of handling media
files adding into the confusion. Try to follow the documentation. If
it is hard to follow, please ask again. And remember that improving
documentation is taken seriously in the Django community, so if you
can't follow the documentation, then there is a chance to improve it.

Also, I haven't used nginx, so this is a learning process for me,
too :)

 - Anssi

On Jan 29, 1:45 am, Felipe Arruda 
wrote:
> Hi there everyone, I'm trying to make my first deploy of a project,
> and encountered some problems.
> Here is the scenario:
> I read that to make uploaded files only accessible for the
> uploader(the user) was a better choice to use nginx(apparently more
> easy to configure).
> But after following a couple of tutorials(a lot of them actually) I
> still couldn't make it serve the media files, but them I got really
> confuse, and decided that I should review my concepts before trying
> any further.
> So here are my questions:
>
> Does Nginx serve the files that the user upload or just de static
> ones(css, admin_media and stuff)?
> If so:
> -- Could anyone give me an example of configuration for this?
> -- Should I remove the url conf  that maps '^media/(?P.*)$' ?
> If not:
> -- Then how should I config my settings in production so that it
> serves my css and admin_media?
> -- How should Nginx be configured to serve me this?
>
> And also there are other matters, like:
> Should I configure django.sites to point to what? or I don't need this
> set?
> What is better: Copy admin/media to my media folder, or my static
> folder? or should I just make a symlink?
> And finally should I change the directory permissions to the nginx
> user:group? If so, then what directories? Just the media/static, or
> the hole project?(I'm leaving the media/static folder inside the
> project folder, is this a problem to deploy?)
>
> Thanks for the atention, any help is welcome since I've been for 4
> days trying to make this work(in a virtualmachine, testing in lan) and
> still no media/static been served(but I could manage the site to run
> and appear, but no css in admin).

-- 
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 Admin completely empty

2012-01-30 Thread Andres Reyes
Do you have permissions on the models you want to see?

You can create a new superuser with
python manage.py createsuperuser



2012/1/30 darwin_tech :
> Hi,
>
> On my development server my Django Admin works as expected, showing
> all my
> models and the auth models. However, on the production server, even
> though the whole application works fine, when I log into the admin I
> see nothing. No models, no auth. Just a stack of empty boxes.
> If anyone has any idea as to why this might be, your input would be
> much appreciated.
>
> Sam
>
> --
> 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.
>



-- 
Andrés Reyes Monge
armo...@gmail.com
+(505)-8873-7217

-- 
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: Print list with select related with reverse foreign key

2012-01-30 Thread akaariai
On Jan 29, 6:23 pm, Gabriel Carneiro Novaes 
wrote:
> I have two modelshttp://paste.ideaslabs.com/show/BN0e2z4NSa
>
> I want to print a list of ads (title,slug, and thumb_photo)
>
> How can I make this list, since the key is reverse?
>
> Something like this SQL:http://paste.ideaslabs.com/show/Iw8ii2noz

The problem is that by the model definitions you can have multiple
thumb-photos per ad. So, you can't use select related, as it can only
traverse relations that return one related item per row.

Now, there are some options:
  - If you in fact want just one photo per add, then you should change
the foreign key to OneToOne key. After that select_related should
work.
  - You can use a pre-release version of 1.4 and its
prefetch_related() feature which is meant exactly for this kind of
situation.
  - You can do a manual prefetch. Basically you run two queries, then
do the join in Python code. I know there are snippets doing this, but
I can't find one currently. I hope some other reader of this list can
point out a snippet demonstrating this. This can be a little hard to
write if you haven't done this ever before.
  - You can run one SQL query per list item, by using something like:
{% for adphoto in obj.adimage_set.all %}
 {# display photo here #}
{% endfor %}
in your template.

 - Anssi

-- 
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: Question regarding ticket #17062

2012-01-30 Thread akaariai
On Jan 30, 11:21 am, Ashe  wrote:
> Hello,
>
> I have been using django 1.3.1 for some months.
> I had a long time bug and I finally took some hours to track it.
> Sometimes in my admin interface (not the default django one), all the
> query based on datetime object have a very strange behavior.
> After some research, I ended up with the conclusion that
> transaction.rollback puts my postgresql database in the server
> timezone, despite TIME_ZONE being set at UTC.
>
> With that information, I found this ticket 
> (https://code.djangoproject.com/ticket/17062
> ) and this changeset (https://code.djangoproject.com/changeset/17128
> ). So apparently it's solved in the trunk.
>
> I'm using some transactions for some really important administration
> tasks that modify multiple tables at the same time. I can't change
> that, and I really need to solve my query issue.
> I'm not authorized to change the timezone of the server (on
> webfaction).
> Could you help me make this modification working in the 1.3.1 ? I
> looked at the file modified in the changeset 17128, but it looks like
> it changed a lot between the release and this changeset.
> Or would you recommend to install the trunk ? I won't hide that I'm a
> bit scarred to put a trunk version on production.
> Will it be in the 1.4 ? I wasn't able to tell from the changeset page.

If you don't want to use a custom version of Django, and can't wait
for 1.4, you should be able to set the time zone for per database
user. Connect to the database with your database user, and do this:
ALTER USER "thedbuser" SET TIME ZONE 'wanted_zone'; -- where
wanted_zone would be UTC for you.
So, for example for me the above would look:
ALTER USER "akaariai" SET TIME ZONE 'Europe/Helsinki';

The per-user settings are a really nice feature. Many problems in
PostgreSQL can be neatly solved by usage of the per-user settings.

You can verity that the change took place by reconnecting (the per
user settings are only changed on connect), and running:
select current_setting('timezone');

The effect of this is that the rollback will still reset you timezone,
but as the default is UTC there is nothing to worry :) In fact, once
1.4 is out, it will no longer run SET TIME ZONE at all, as 1.4 is able
to recognize that the time zone is already correct for the connection!

 - Anssi

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



Full Time Developer Position - NYC - Django

2012-01-30 Thread Michael Scovetta
Hi!
  We'd like to hire an experienced developer to work on a few major 
projects:
 - Mobile development (iOS, Android, Boxee, NeoTV, XBOX, GoogleTV...)
 - Django / MySQL / Redis
 - jQueryMobile
 - Phonegap, Titanium, etc.

Looking for someone who wants to work in a "startup" inside a very large 
media corporation. 

Let me know if you're interested; I can send many more details.

Thanks--

Mike

-- 
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/-/O7S7bdT6mPIJ.
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 regarding ticket #17062

2012-01-30 Thread Ashe


On Jan 30, 4:54 am, Ramiro Morales  wrote:
> On Mon, Jan 30, 2012 at 6:21 AM, Ashe  wrote:
> > Could you help me make this modification working in the 1.3.1 ? I
> > looked at the file modified in the changeset 17128, but it looks like
> > it changed a lot between the release and this changeset.
>
> Are you sure?. I've just tried and this is what I've found:
>
> The changes to the tests (tests/regressiontests/backends/tests.py)
> apply cleanly to 1.3.1, patch only reports some fuzz:
> Hunk #1 succeeded at 11 with fuzz 2.
> Hunk #2 succeeded at 230 with fuzz 2.
>
> My copy of GNU patch can't apply the changes to the code itself
> ( django/db/backends/postgresql_psycopg2/base.py)
> presumabily because the lines where the modified code lies
> have changed.
> But of you edit that file side by side with the .diff file from r17128
> you will able to easily transfer the changes, because it is mostly
> composed from deletion of code and moving of a block of code to
> another spot.
>
> Have you actually triedporting the changes of that commit
> to a copy of 1.3.1?
>

I didn't, I was afraid to delete the lines 146 to 164 which are only 6
lines in the changeset (183-187), with no understanding of their exact
meaning.

> > Or would you recommend to install the trunk ? I won't hide that I'm a
> > bit scarred to put a trunk version on production.
> > Will it be in the 1.4 ? I wasn't able to tell from the changeset page.
>
> Yes, it will be in 1.4

Great news, I saw the beta is supposed to be released this week, and
we want to use it. So we'll just wait a little.
How do you see if a changeset is included in a release, I wasn't able
to find the information on the website.

Thank you very much for your answers.

--
Ashe

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



Django Caching appended character issue

2012-01-30 Thread bfrederi
I've noticed that occasionally XML files that we create and server
through Django get a character appended onto the file when Django
caching is turned on. If I restart memcached on the remote server, the
appended character (in the last case I saw, it was a "W") disappears
and the XML file appears normally.

I know the description of this problem is really unhelpful and vague,
but it's such a bizarre and rare thing in the first place. Is there at
least a method that could help me diagnose this issue? I am just all-
around stumped so far. Has anyone seen something like this before?

-- 
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-db-log import Exception

2012-01-30 Thread Timothy Makobu
Naa, looks too bloaty for me. I'll just write midleware and do the
logging inside process_exception()

On Mon, Jan 30, 2012 at 7:45 PM, Babatunde Akinyanmi
 wrote:
> Hi Tim,
> Django-db-log is no longer maintained. Its like its not compatible
> with 1.3. Use django-sentry instead.
>
> On 1/30/12, Timothy Makobu  wrote:
>>  right.
>>
>> Hi guys. If someone could kindly alert the dev? I emailed him already
>> but no response yet. Pip needs to pick up the fixed  dangodblog as a
>> dep where the app is hosted. It's all automated.
>>
>>
>> On Mon, Jan 30, 2012 at 6:45 PM, Babatunde Akinyanmi
>>  wrote:
>>> Oh I see. I was reading djangodblog as django-dblog instead of
>>> django-db-log so I was thinking djangodblog was a directory you
>>> created yourself.
>>>
>>> As long as Paginator remains on that line there's no way to go
>>> forward. If I was you, I'd try to go through the source and figure out
>>> if Paginator should be in the source.
>>>
>>> To me it looks like the app was shipped broken. Maybe if you go
>>> through the source, you might find that removing Paginator would mend
>>> things.
>>>
>>> On 1/30/12, Timothy Makobu  wrote:
 This is how Paginator is imported
 https://docs.djangoproject.com/en/dev/topics/pagination/

 from django.core.paginator import Paginator

 (this is part of django.core on my 1.3, so doesn't need installing)

 This is how djangodblog is trying to import it:

 from django.contrib.admin.views.main import ChangeList, Paginator

 ..

 see the difference?

 --
 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.
>>>
>>
>>
>>
>> --
>> sent from my two tin cans via hangerwire
>>
>> --
>> 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.
>



-- 
sent from my two tin cans via hangerwire

-- 
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: Hosting Alwaysdata: install dajax libraries

2012-01-30 Thread Praveen Krishna R
*You can always copy the source folder of the dajax or whatever app into
your project folder.*
*
*
On Mon, Jan 30, 2012 at 7:19 PM, ElDoge  wrote:

> Hi, I am a newbie of Django and I have to try a web application (not
> made by me, but founded in the web)  that manages the shifts rounds of
> the volunteers of my association.
>
> I installaed it into alwaysdata.com free hosting, but the web app need
> the dajax and dajaxice library. It is possible to install it in the
> free hosting? How?
>
> Thanks for you help!!!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Thanks and Regards,
*Praveen Krishna R*

-- 
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: Hosting Alwaysdata: install dajax libraries

2012-01-30 Thread Babatunde Akinyanmi
Alwaysdata allows you to install your own apps. Alwaysdata also IMHO
the best customer support available.

First search the forum at http://forum.alwaysdata.com and if you don't
get the instructions there, log in to your admin account
(http://admin.alwaysdata.com), click on support and then raise a
ticket.

On 1/30/12, ElDoge  wrote:
> Hi, I am a newbie of Django and I have to try a web application (not
> made by me, but founded in the web)  that manages the shifts rounds of
> the volunteers of my association.
>
> I installaed it into alwaysdata.com free hosting, but the web app need
> the dajax and dajaxice library. It is possible to install it in the
> free hosting? How?
>
> Thanks for you help!!!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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: django-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
Hi Tim,
Django-db-log is no longer maintained. Its like its not compatible
with 1.3. Use django-sentry instead.

On 1/30/12, Timothy Makobu  wrote:
>  right.
>
> Hi guys. If someone could kindly alert the dev? I emailed him already
> but no response yet. Pip needs to pick up the fixed  dangodblog as a
> dep where the app is hosted. It's all automated.
>
>
> On Mon, Jan 30, 2012 at 6:45 PM, Babatunde Akinyanmi
>  wrote:
>> Oh I see. I was reading djangodblog as django-dblog instead of
>> django-db-log so I was thinking djangodblog was a directory you
>> created yourself.
>>
>> As long as Paginator remains on that line there's no way to go
>> forward. If I was you, I'd try to go through the source and figure out
>> if Paginator should be in the source.
>>
>> To me it looks like the app was shipped broken. Maybe if you go
>> through the source, you might find that removing Paginator would mend
>> things.
>>
>> On 1/30/12, Timothy Makobu  wrote:
>>> This is how Paginator is imported
>>> https://docs.djangoproject.com/en/dev/topics/pagination/
>>>
>>> from django.core.paginator import Paginator
>>>
>>> (this is part of django.core on my 1.3, so doesn't need installing)
>>>
>>> This is how djangodblog is trying to import it:
>>>
>>> from django.contrib.admin.views.main import ChangeList, Paginator
>>>
>>> ..
>>>
>>> see the difference?
>>>
>>> --
>>> 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.
>>
>
>
>
> --
> sent from my two tin cans via hangerwire
>
> --
> 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.



Hosting Alwaysdata: install dajax libraries

2012-01-30 Thread ElDoge
Hi, I am a newbie of Django and I have to try a web application (not
made by me, but founded in the web)  that manages the shifts rounds of
the volunteers of my association.

I installaed it into alwaysdata.com free hosting, but the web app need
the dajax and dajaxice library. It is possible to install it in the
free hosting? How?

Thanks for you help!!!

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



Additional fields in Django-Registration

2012-01-30 Thread Zach
Hi,

I have been trying to add first_name and last_name to django
registration but I can't get the information to save.  It appears on
the form but something isn't right.  I have been looking at different
solutions online but for some reason it is not working.  Please help.
Thank you!

My post on StackOverflow

http://stackoverflow.com/questions/9066739/additional-fields-not-saving-with-django-registration>

-- 
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-db-log import Exception

2012-01-30 Thread Timothy Makobu
 right.

Hi guys. If someone could kindly alert the dev? I emailed him already
but no response yet. Pip needs to pick up the fixed  dangodblog as a
dep where the app is hosted. It's all automated.


On Mon, Jan 30, 2012 at 6:45 PM, Babatunde Akinyanmi
 wrote:
> Oh I see. I was reading djangodblog as django-dblog instead of
> django-db-log so I was thinking djangodblog was a directory you
> created yourself.
>
> As long as Paginator remains on that line there's no way to go
> forward. If I was you, I'd try to go through the source and figure out
> if Paginator should be in the source.
>
> To me it looks like the app was shipped broken. Maybe if you go
> through the source, you might find that removing Paginator would mend
> things.
>
> On 1/30/12, Timothy Makobu  wrote:
>> This is how Paginator is imported
>> https://docs.djangoproject.com/en/dev/topics/pagination/
>>
>> from django.core.paginator import Paginator
>>
>> (this is part of django.core on my 1.3, so doesn't need installing)
>>
>> This is how djangodblog is trying to import it:
>>
>> from django.contrib.admin.views.main import ChangeList, Paginator
>>
>> ..
>>
>> see the difference?
>>
>> --
>> 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.
>



-- 
sent from my two tin cans via hangerwire

-- 
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-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
Oh I see. I was reading djangodblog as django-dblog instead of
django-db-log so I was thinking djangodblog was a directory you
created yourself.

As long as Paginator remains on that line there's no way to go
forward. If I was you, I'd try to go through the source and figure out
if Paginator should be in the source.

To me it looks like the app was shipped broken. Maybe if you go
through the source, you might find that removing Paginator would mend
things.

On 1/30/12, Timothy Makobu  wrote:
> This is how Paginator is imported
> https://docs.djangoproject.com/en/dev/topics/pagination/
>
> from django.core.paginator import Paginator
>
> (this is part of django.core on my 1.3, so doesn't need installing)
>
> This is how djangodblog is trying to import it:
>
> from django.contrib.admin.views.main import ChangeList, Paginator
>
> ..
>
> see the difference?
>
> --
> 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: django-db-log import Exception

2012-01-30 Thread Timothy Makobu
This is how Paginator is imported
https://docs.djangoproject.com/en/dev/topics/pagination/

from django.core.paginator import Paginator

(this is part of django.core on my 1.3, so doesn't need installing)

This is how djangodblog is trying to import it:

from django.contrib.admin.views.main import ChangeList, Paginator

..

see the difference?

-- 
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: Starting a new Python blog

2012-01-30 Thread wC
Agree with Katie.
Also make bookmarks open in a new tab.

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



Django Admin completely empty

2012-01-30 Thread darwin_tech
Hi,

On my development server my Django Admin works as expected, showing
all my
models and the auth models. However, on the production server, even
though the whole application works fine, when I log into the admin I
see nothing. No models, no auth. Just a stack of empty boxes.
If anyone has any idea as to why this might be, your input would be
much appreciated.

Sam

-- 
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 it possible to return an HttpResponse in django with text & a json object?

2012-01-30 Thread darwin_tech
I blogged about this quite recently:

http://djangosteps.wordpress.com/2012/01/12/filtered-menus-in-django/


Hope this helps,

Sam

On Jan 30, 1:13 am, lokesh  wrote:
> To do this use serializers or you need to make it a plain text iterate
> over objects and make it a string and return httpresponse as a text.
>
> On Jan 29, 7:24 pm, CareerDhaba tech  wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I am in a bit of a jiffy and need some guidance. Here is the issue:
>
> > I am creating a basic Q application, where a question pops up for the
> > user, along with a form to submit the answer. Depending on the type of
> > question, the input of  the form changes (ie if its a multiple choice, its
> > radio buttons, but if its a word problem, its a text area). I am doing this
> > by extending the ModelForm's __init__ method. So far, so good.
>
> > The problem occurs when an answer is submitted via jquery ajax. My view
> > function receives and processes the request correctly, but I am unable to
> > figure out how to send back *both *the question object (as json object) and
> > the form object (as html) via HTTPResponse. I would be processing the data
> > sent to the client via jquery.
>
> > I have posted this on SO, but the suggested answer doesn't make sense to
> > me. Here's the link:http://bit.ly/wGkZdA
>
> > A part of me feels that there is potentially another cleaner way to do what
> > I am trying to do, but I have yet to come up with a more elegant solution
> > (or any solution for that matter).
>
> > My views.py code is on the SO link, or you can also find it 
> > here:http://dpaste.com/hold/694698/
>
> > Thanks in advance for all your help.
>
> > Best,
> > Harshil

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

2012-01-30 Thread Stanwin Siow
ok got it. I read the document and it was good stuff.

Just got confused with copying pasting into my models.py. Thanks alot once 
again.

:)

Best Regards,

Stanwin Siow



On Jan 30, 2012, at 10:02 PM, Michael Elkins wrote:

> On Mon, Jan 30, 2012 at 09:53:18PM +0800, Stanwin Siow wrote:
>> but once my terminal creates the model classes do i have to copy it into my 
>> app's model.py?
> 
> yes, you will need to copy the output to your models.py.  you may need to 
> edit it to put the models in order so that dependencies like foreign keys in 
> the model definitions are satisified.  see the link i posted earlier about 
> inspectdb for details on what you may need to edit.
> 
> -- 
> 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: Django models

2012-01-30 Thread Michael Elkins

On Mon, Jan 30, 2012 at 09:53:18PM +0800, Stanwin Siow wrote:

but once my terminal creates the model classes do i have to copy it into my 
app's model.py?


yes, you will need to copy the output to your models.py.  you may 
need to edit it to put the models in order so that dependencies 
like foreign keys in the model definitions are satisified.  see 
the link i posted earlier about inspectdb for details on what you 
may need to edit.


--
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: Starting a new Python blog

2012-01-30 Thread Katie Cunningham
Have you considered changing the styling of your site? It's a bit
awkward to look at, since it looks like it was only made to fit on a
much smaller screen. Perhaps you could look at Bootstrap, which is a
much more flexible CSS framework?

Katie

On Mon, Jan 30, 2012 at 8:45 AM, Aaron Cannon
 wrote:
> For me, Twitter is the new RSS.  Any chance of setting up a feed for
> new content notifications?
>
> Thanks.
>
> Aaron
>
> On 1/30/12, Kevin  wrote:
>> It is good to see some subscribers this early on.  Thank you.  I have
>> rolled out the updates for Tutorials and set the foundation for the
>> Review system by starting a list of packages I frequently use, and
>> hope to later review.  I hope to have the full review system live by
>> the end of this week.
>>
>> The tutorials will also use the package list I built to build a list
>> of dependencies required for the tutorial itself.  I hope this makes
>> it much easier to follow tutorials by knowing which Python packages
>> will be required before hand.  The package list has a summary of the
>> package and a link to the website where it is maintained.  There are
>> currently 2 tutorials available for consumption.  Both are videos I
>> made on YouTube for Rackspace Cloud last year, so if your curious
>> about how Rackspace cloud works, do check them out.
>>
>> There is a separate RSS feed for the tutorials:
>> http://www.pythondiary.com/tutorials.xml
>>
>> I am planning on making a "Digest" RSS Feed which will contain the
>> latest posts from each section, but will also keep the separate feeds
>> there for subscribers who only want the blog, or just tutorials.
>>
>> The site will remain ad-free for the time being, so that requests are
>> quick for end-users.  I made use of the Django caching framework to
>> also increase the response time.  I hope to keep the blog site quick
>> and clean.
>>
>> Enjoy!
>>
>> On Jan 29, 5:06 pm, Mario Gudelj  wrote:
>>> Same :)
>>>
>>> On 29 January 2012 19:11, Anler Hernandez Peral  wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> > you have one subscriber over here and waiting to see more posts ;)
>>>
>>> > --
>>> > anler
>>>
>>> > On Sat, Jan 28, 2012 at 9:35 PM, Kevin  wrote:
>>>
>>> >> Hello Everyone,
>>>
>>> >>  For sometime now I have been itching to create a Python blog, and
>>> >> now the fruits of my labor have paid off.  I am ready to release the
>>> >> blog to the public eyes.  At the moment it has 2 main features, a blog
>>> >> portion, and a bookmark system.  Both the blog and the bookmark system
>>> >> offer an RSS Atom feed.  The bookmark system is fully compatible with
>>> >> "Live Bookmarks" to quickly access some of my top Python sites I visit
>>> >> or visited recently which caught my eye.
>>>
>>> >>  The website is called "Python Diary", a rather unique take on a tech
>>> >> blog name.  The site itself has a diary-like theme, and is for the
>>> >> most part very easily to navigate.  The website was completely built
>>> >> using Python, the theme was taken from a wordpress theme website and
>>> >> formatted to work with the Django template system.  The entire backend
>>> >> is written from scratch using a few reusable Django apps, namely,
>>> >> django-tagging, south, and cumulus.
>>>
>>> >>  Now you might be saying, "Oh great, yet another Python blog".  But
>>> >> wait...  I plan on setting this blog apart from the thousands of other
>>> >> blogs in the world with some very unique features.  Features normally
>>> >> found on commercial software blogs, movie and video game blogs is a
>>> >> thorough review system.  I plan on going through many of the available
>>> >> Python packages out there in the wild and basically reviewing them
>>> >> like one would review anything else.  I do not see a dedicated Python
>>> >> website which has reviews of many Python packages available in PyPi.
>>> >> I plan on stating the usual pros and cons of the package, and
>>> >> providing a score.  For example of how this type of review is
>>> >> formatted, take a look at a CNET Review.
>>>
>>> >> My new blog can be found here:http://www.pythondiary.com/
>>>
>>> >>  Tell me what you think of the website in general, and the overall
>>> >> idea for this blog.
>>>
>>> >> If you would like to subscribe to the upcoming content, add this RSS
>>> >> feed to your favorite RSS reader:
>>> >>http://www.pythondiary.com/blog.xml
>>>
>>> >> --
>>> >> 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
>>> > 

Re: django-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
**scratching head**
So are you saying you have paginator installed already? Cos your
traceback says you have a admin.py file in a djangodblog directory and
that file is trying to import paginator which it can't find. That's
the root of the error being thrown

On 1/30/12, Timothy Makobu  wrote:
> It's trying to import it from django.contrib.admin.views.main
>
>
> On Mon, Jan 30, 2012 at 4:29 PM, Babatunde Akinyanmi
> wrote:
>
>> Seems like the app depends on paginator. Why not install the paginator
>> app?
>>
>>
>> On 1/30/12, Timothy Makobu  wrote:
>> > Hi all,
>> >
>> > I'm on Django 1.3
>> >
>> > I just now installed django-db-log via pip, but after adding it to
>> > installed_apps, I get this Exception:
>> >
>> > Traceback (most recent call last):
>> >   File "/bundles/port-8233/app_image/epio_wsgi.py", line 32, in __call__
>> > output = wsgi_entrypoint(environ, self.start_response)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
>> > line 273, in __call__
>> > response = self.get_response(request)
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
>> > line 169, in get_response
>> > response = self.handle_uncaught_exception(request, resolver,
>> > sys.exc_info())
>> >   File
>> > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
>> > line 214, in handle_uncaught_exception
>> > if resolver.urlconf_module is None:
>> >   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py",
>> > line 274, in _get_urlconf_module
>> > self._urlconf_module = import_module(self.urlconf_name)
>> >   File
>> "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
>> > line 35, in import_module
>> > __import__(name)
>> >   File "/bundles/port-8233/app_image/redapps/urls.py", line 5, in
>> > admin.autodiscover()
>> >   File
>> >
>> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py",
>> > line 26, in autodiscover
>> > import_module('%s.admin' % app)
>> >   File
>> "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
>> > line 35, in import_module
>> > __import__(name)
>> >   File
>> >
>> "/bundles/port-8233/app_image/pyenv/lib/python2.7/site-packages/djangodblog/admin.py",
>> > line 4, in
>> > from django.contrib.admin.views.main import ChangeList, Paginator
>> > ImportError: cannot import name Paginator
>> >
>> >
>> > --
>> > sent from my two tin cans via hangerwire
>> >
>> > --
>> > 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.
>>
>>
>
>
> --
> sent from my two tin cans via hangerwire
>
> --
> 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: Django models

2012-01-30 Thread Stanwin Siow
sorry to bother you again michael

but once my terminal creates the model classes do i have to copy it into my 
app's model.py?

I wanted to be sure.


Best Regards,

Stanwin Siow



On Jan 30, 2012, at 9:35 PM, Michael Elkins wrote:

> On Mon, Jan 30, 2012 at 09:26:10PM +0800, Stanwin Siow wrote:
>> However what does this error say?
>> 
>> ImportError: Settings cannot be imported, because environment variable 
>> DJANGO_SETTINGS_MODULE is undefined.
> 
> If you have a manage.py for your project, you can just run "manage.py 
> inspectdb" and it will use the DATABASES defined in your settings.py.
> 
> manage.py is just a wrapper around django-admin.py that sets the 
> DJANGO_SETTINGS_MODULE and PYTHONPATH for you.
> 
> -- 
> 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: Starting a new Python blog

2012-01-30 Thread Aaron Cannon
For me, Twitter is the new RSS.  Any chance of setting up a feed for
new content notifications?

Thanks.

Aaron

On 1/30/12, Kevin  wrote:
> It is good to see some subscribers this early on.  Thank you.  I have
> rolled out the updates for Tutorials and set the foundation for the
> Review system by starting a list of packages I frequently use, and
> hope to later review.  I hope to have the full review system live by
> the end of this week.
>
> The tutorials will also use the package list I built to build a list
> of dependencies required for the tutorial itself.  I hope this makes
> it much easier to follow tutorials by knowing which Python packages
> will be required before hand.  The package list has a summary of the
> package and a link to the website where it is maintained.  There are
> currently 2 tutorials available for consumption.  Both are videos I
> made on YouTube for Rackspace Cloud last year, so if your curious
> about how Rackspace cloud works, do check them out.
>
> There is a separate RSS feed for the tutorials:
> http://www.pythondiary.com/tutorials.xml
>
> I am planning on making a "Digest" RSS Feed which will contain the
> latest posts from each section, but will also keep the separate feeds
> there for subscribers who only want the blog, or just tutorials.
>
> The site will remain ad-free for the time being, so that requests are
> quick for end-users.  I made use of the Django caching framework to
> also increase the response time.  I hope to keep the blog site quick
> and clean.
>
> Enjoy!
>
> On Jan 29, 5:06 pm, Mario Gudelj  wrote:
>> Same :)
>>
>> On 29 January 2012 19:11, Anler Hernandez Peral  wrote:
>>
>>
>>
>>
>>
>>
>>
>> > you have one subscriber over here and waiting to see more posts ;)
>>
>> > --
>> > anler
>>
>> > On Sat, Jan 28, 2012 at 9:35 PM, Kevin  wrote:
>>
>> >> Hello Everyone,
>>
>> >>  For sometime now I have been itching to create a Python blog, and
>> >> now the fruits of my labor have paid off.  I am ready to release the
>> >> blog to the public eyes.  At the moment it has 2 main features, a blog
>> >> portion, and a bookmark system.  Both the blog and the bookmark system
>> >> offer an RSS Atom feed.  The bookmark system is fully compatible with
>> >> "Live Bookmarks" to quickly access some of my top Python sites I visit
>> >> or visited recently which caught my eye.
>>
>> >>  The website is called "Python Diary", a rather unique take on a tech
>> >> blog name.  The site itself has a diary-like theme, and is for the
>> >> most part very easily to navigate.  The website was completely built
>> >> using Python, the theme was taken from a wordpress theme website and
>> >> formatted to work with the Django template system.  The entire backend
>> >> is written from scratch using a few reusable Django apps, namely,
>> >> django-tagging, south, and cumulus.
>>
>> >>  Now you might be saying, "Oh great, yet another Python blog".  But
>> >> wait...  I plan on setting this blog apart from the thousands of other
>> >> blogs in the world with some very unique features.  Features normally
>> >> found on commercial software blogs, movie and video game blogs is a
>> >> thorough review system.  I plan on going through many of the available
>> >> Python packages out there in the wild and basically reviewing them
>> >> like one would review anything else.  I do not see a dedicated Python
>> >> website which has reviews of many Python packages available in PyPi.
>> >> I plan on stating the usual pros and cons of the package, and
>> >> providing a score.  For example of how this type of review is
>> >> formatted, take a look at a CNET Review.
>>
>> >> My new blog can be found here:http://www.pythondiary.com/
>>
>> >>  Tell me what you think of the website in general, and the overall
>> >> idea for this blog.
>>
>> >> If you would like to subscribe to the upcoming content, add this RSS
>> >> feed to your favorite RSS reader:
>> >>http://www.pythondiary.com/blog.xml
>>
>> >> --
>> >> 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to 

Re: django-db-log import Exception

2012-01-30 Thread Timothy Makobu
It's trying to import it from django.contrib.admin.views.main


On Mon, Jan 30, 2012 at 4:29 PM, Babatunde Akinyanmi
wrote:

> Seems like the app depends on paginator. Why not install the paginator app?
>
>
> On 1/30/12, Timothy Makobu  wrote:
> > Hi all,
> >
> > I'm on Django 1.3
> >
> > I just now installed django-db-log via pip, but after adding it to
> > installed_apps, I get this Exception:
> >
> > Traceback (most recent call last):
> >   File "/bundles/port-8233/app_image/epio_wsgi.py", line 32, in __call__
> > output = wsgi_entrypoint(environ, self.start_response)
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
> > line 273, in __call__
> > response = self.get_response(request)
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
> > line 169, in get_response
> > response = self.handle_uncaught_exception(request, resolver,
> > sys.exc_info())
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
> > line 214, in handle_uncaught_exception
> > if resolver.urlconf_module is None:
> >   File
> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py",
> > line 274, in _get_urlconf_module
> > self._urlconf_module = import_module(self.urlconf_name)
> >   File
> "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
> > line 35, in import_module
> > __import__(name)
> >   File "/bundles/port-8233/app_image/redapps/urls.py", line 5, in
> > admin.autodiscover()
> >   File
> >
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py",
> > line 26, in autodiscover
> > import_module('%s.admin' % app)
> >   File
> "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
> > line 35, in import_module
> > __import__(name)
> >   File
> >
> "/bundles/port-8233/app_image/pyenv/lib/python2.7/site-packages/djangodblog/admin.py",
> > line 4, in
> > from django.contrib.admin.views.main import ChangeList, Paginator
> > ImportError: cannot import name Paginator
> >
> >
> > --
> > sent from my two tin cans via hangerwire
> >
> > --
> > 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.
>
>


-- 
sent from my two tin cans via hangerwire

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

2012-01-30 Thread Stanwin Siow
Thank you so much.

This information is very useful. It work like a charm for me.

Thank you once again mike. Cheers

Best Regards,

Stanwin Siow



On Jan 30, 2012, at 9:35 PM, Michael Elkins wrote:

> On Mon, Jan 30, 2012 at 09:26:10PM +0800, Stanwin Siow wrote:
>> However what does this error say?
>> 
>> ImportError: Settings cannot be imported, because environment variable 
>> DJANGO_SETTINGS_MODULE is undefined.
> 
> If you have a manage.py for your project, you can just run "manage.py 
> inspectdb" and it will use the DATABASES defined in your settings.py.
> 
> manage.py is just a wrapper around django-admin.py that sets the 
> DJANGO_SETTINGS_MODULE and PYTHONPATH for you.
> 
> -- 
> 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: Django models

2012-01-30 Thread Michael Elkins

On Mon, Jan 30, 2012 at 09:26:10PM +0800, Stanwin Siow wrote:

However what does this error say?

ImportError: Settings cannot be imported, because environment variable 
DJANGO_SETTINGS_MODULE is undefined.


If you have a manage.py for your project, you can just run 
"manage.py inspectdb" and it will use the DATABASES defined in 
your settings.py.


manage.py is just a wrapper around django-admin.py that sets the 
DJANGO_SETTINGS_MODULE and PYTHONPATH for you.


--
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-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
Seems like the app depends on paginator. Why not install the paginator app?


On 1/30/12, Timothy Makobu  wrote:
> Hi all,
>
> I'm on Django 1.3
>
> I just now installed django-db-log via pip, but after adding it to
> installed_apps, I get this Exception:
>
> Traceback (most recent call last):
>   File "/bundles/port-8233/app_image/epio_wsgi.py", line 32, in __call__
> output = wsgi_entrypoint(environ, self.start_response)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
> line 273, in __call__
> response = self.get_response(request)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
> line 169, in get_response
> response = self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
> line 214, in handle_uncaught_exception
> if resolver.urlconf_module is None:
>   File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py",
> line 274, in _get_urlconf_module
> self._urlconf_module = import_module(self.urlconf_name)
>   File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File "/bundles/port-8233/app_image/redapps/urls.py", line 5, in
> admin.autodiscover()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py",
> line 26, in autodiscover
> import_module('%s.admin' % app)
>   File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File
> "/bundles/port-8233/app_image/pyenv/lib/python2.7/site-packages/djangodblog/admin.py",
> line 4, in
> from django.contrib.admin.views.main import ChangeList, Paginator
> ImportError: cannot import name Paginator
>
>
> --
> sent from my two tin cans via hangerwire
>
> --
> 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: Django models

2012-01-30 Thread Stanwin Siow
hi michael,

Thanks for the tip. It is a huge step in my progress.

However what does this error say?

ImportError: Settings cannot be imported, because environment variable 
DJANGO_SETTINGS_MODULE is undefined.

Best Regards,

Stanwin Siow



On Jan 30, 2012, at 8:37 PM, Michael Elkins wrote:

> On Mon, Jan 30, 2012 at 04:13:50AM -0800, St@n wrote:
>> How do i ask django to query for a table that is already created in
>> the database but not part of the models.py?
>> 
>> the models.py is used to described the database and to create tables
>> with that models.py. However i already have my tables created prior to
>> creating the django app.
>> 
>> How then do i get django to query those tables created before?
> 
> You can use "django-admin.py inspectdb" to generate a models.py based on an 
> existing database:
> 
> https://docs.djangoproject.com/en/1.3/ref/django-admin/#inspectdb
> 
> -- 
> 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: Question regarding ticket #17062

2012-01-30 Thread Ramiro Morales
On Mon, Jan 30, 2012 at 6:21 AM, Ashe  wrote:
> Could you help me make this modification working in the 1.3.1 ? I
> looked at the file modified in the changeset 17128, but it looks like
> it changed a lot between the release and this changeset.

Are you sure?. I've just tried and this is what I've found:

The changes to the tests (tests/regressiontests/backends/tests.py)
apply cleanly to 1.3.1, patch only reports some fuzz:
Hunk #1 succeeded at 11 with fuzz 2.
Hunk #2 succeeded at 230 with fuzz 2.

My copy of GNU patch can't apply the changes to the code itself
( django/db/backends/postgresql_psycopg2/base.py)
presumabily because the lines where the modified code lies
have changed.
But of you edit that file side by side with the .diff file from r17128
you will able to easily transfer the changes, because it is mostly
composed from deletion of code and moving of a block of code to
another spot.

Have you actually triedporting the changes of that commit
to a copy of 1.3.1?

> Or would you recommend to install the trunk ? I won't hide that I'm a
> bit scarred to put a trunk version on production.
> Will it be in the 1.4 ? I wasn't able to tell from the changeset page.

Yes, it will be in 1.4
-- 
Ramiro Morales

-- 
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 model problem

2012-01-30 Thread Michael Elkins

On Sun, Jan 29, 2012 at 08:22:40PM -0800, St@n wrote:

I am trying to create a RESTful API with a django website i have
running. The project folder is called rosebud and inside the folder r2
lies my application.

I have tried to retrieve objects by calling the Users table in
django's default authentication model.

But i have problems retrieving objects from other tables in my
database. Is it something to do with how i defined my model.py?

I have this table called timeline in my database but each time i run
the server and query it, it comes back with an error saying
r2_timeline table does not exist.

the error msg is sound because r2_timeline really does not exist. What
exists is the table TIMELINE.


The tables in the database get the name _.  
Since your app is named r2, the timeline model will be put in a 
table named r2_timeline.


Did you run "manage.py syncdb" to create the tables after you 
created your models.py?


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

2012-01-30 Thread Michael Elkins

On Mon, Jan 30, 2012 at 04:13:50AM -0800, St@n wrote:

How do i ask django to query for a table that is already created in
the database but not part of the models.py?

the models.py is used to described the database and to create tables
with that models.py. However i already have my tables created prior to
creating the django app.

How then do i get django to query those tables created before?


You can use "django-admin.py inspectdb" to generate a models.py 
based on an existing database:


https://docs.djangoproject.com/en/1.3/ref/django-admin/#inspectdb

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



Django models

2012-01-30 Thread St@n
Hello,

How do i ask django to query for a table that is already created in
the database but not part of the models.py?

the models.py is used to described the database and to create tables
with that models.py. However i already have my tables created prior to
creating the django app.

How then do i get django to query those tables created before?

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.



Question regarding ticket #17062

2012-01-30 Thread Ashe
Hello,

I have been using django 1.3.1 for some months.
I had a long time bug and I finally took some hours to track it.
Sometimes in my admin interface (not the default django one), all the
query based on datetime object have a very strange behavior.
After some research, I ended up with the conclusion that
transaction.rollback puts my postgresql database in the server
timezone, despite TIME_ZONE being set at UTC.

With that information, I found this ticket ( 
https://code.djangoproject.com/ticket/17062
) and this changeset ( https://code.djangoproject.com/changeset/17128
). So apparently it's solved in the trunk.

I'm using some transactions for some really important administration
tasks that modify multiple tables at the same time. I can't change
that, and I really need to solve my query issue.
I'm not authorized to change the timezone of the server (on
webfaction).
Could you help me make this modification working in the 1.3.1 ? I
looked at the file modified in the changeset 17128, but it looks like
it changed a lot between the release and this changeset.
Or would you recommend to install the trunk ? I won't hide that I'm a
bit scarred to put a trunk version on production.
Will it be in the 1.4 ? I wasn't able to tell from the changeset page.

Regards,
Ashe

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



Django model problem

2012-01-30 Thread St@n
Hi there,

I am trying to create a RESTful API with a django website i have
running. The project folder is called rosebud and inside the folder r2
lies my application.

I have tried to retrieve objects by calling the Users table in
django's default authentication model.

But i have problems retrieving objects from other tables in my
database. Is it something to do with how i defined my model.py?

I have this table called timeline in my database but each time i run
the server and query it, it comes back with an error saying
r2_timeline table does not exist.

the error msg is sound because r2_timeline really does not exist. What
exists is the table TIMELINE.

This is what i have in my models.py:

from tastypie.utils import now
from django.contrib.auth.models import User
from django.db import models
from django.template.defaultfilters import slugify

class timeline(models.Model):
tweet_id = models.IntegerField(max_length=200)
keyword_id = models.IntegerField(max_length=200, blank=True)

def __unicode__(self):
return self


This is what i have in my api.py file

from django.contrib.auth.models import User
from tastypie.authentication import BasicAuthentication
from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource
from r2.models import timeline

class timelineResource(ModelResource):
class Meta:
queryset = timeline.objects.all()
resource_name = 'timeline'
excludes = ['id']
include_resource_uri = False

I would appreciate any help i can get to help me get a better idea as
i'm pulling my hair out already. Thank you so much!

Stanwin



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



django-db-log import Exception

2012-01-30 Thread Timothy Makobu
Hi all,

I'm on Django 1.3

I just now installed django-db-log via pip, but after adding it to
installed_apps, I get this Exception:

Traceback (most recent call last):
  File "/bundles/port-8233/app_image/epio_wsgi.py", line 32, in __call__
output = wsgi_entrypoint(environ, self.start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
line 273, in __call__
response = self.get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
line 169, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
line 214, in handle_uncaught_exception
if resolver.urlconf_module is None:
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py",
line 274, in _get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
line 35, in import_module
__import__(name)
  File "/bundles/port-8233/app_image/redapps/urls.py", line 5, in
admin.autodiscover()
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py",
line 26, in autodiscover
import_module('%s.admin' % app)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",
line 35, in import_module
__import__(name)
  File 
"/bundles/port-8233/app_image/pyenv/lib/python2.7/site-packages/djangodblog/admin.py",
line 4, in
from django.contrib.admin.views.main import ChangeList, Paginator
ImportError: cannot import name Paginator


-- 
sent from my two tin cans via hangerwire

-- 
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: superuser unable to delete an object

2012-01-30 Thread kenneth gonsalves
On Mon, 2012-01-30 at 12:39 +0530, kenneth gonsalves wrote:
> def has_delete_permission(self, request, obj=None):
> # Same as change permission
> self.has_change_permission(request, obj=obj)
> 
> when I login as superuser and try to delete a child object I get a 403
> forbidden error. Any clues? 

solved - has_delete_permission is not returning anything.
-- 
regards
Kenneth Gonsalves

-- 
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 need help with Python Tools for Visual Studio 2010 and Django

2012-01-30 Thread Sam Lai
On 29 January 2012 16:49, JJ Zolper  wrote:
> Sam,
>
> I have set up VirtualBox with Python and Django. Things have gone
> flawlessly.
>
> Only thing I've noticed is it seems to be running a tad bit slow. I feel
> this way because I had a native installation before and it ran quite well.

Have you installed the VirtualBox Guest Additions? That will, among
other things, optimise your  video which should make it feel a lot
faster.

This looks like a good guide for installing it on Ubuntu 11.10 -
http://www.varunvats.com/2011/06/install-virtualbox-guest-additions-for-ubuntu-11-04-guest/

> Before I go too far into writing code I was hoping to "perfect" my
> environment. I want to be able to donate enough resources such as RAM to the
> VM so that it runs well but at the same time maintain a steady local Windows
> boot.
>
> Would you mind helping get me situated?
>
> My Laptop is a Fujitsu Lifebook T5010. A 231 GB HDD with 4 GB RAM. I have
> Windows 7 Enterprise 64 bit operating system installed.
>
> The original or current setup for my Ubuntu 11.10 on my VirtualBox system
> is:
>
> Base Memory: 700 MB (RAM? max is 4096)
> Storage: 40 GB (Fixed)
> Video Memory: 12 MB (max is 128)
> Monitor count is 1
>
> Those are all the details I thought might be useful. I would really
> appreciate some guidance as to what you set yours up as or what you think
> might be the best to optimize performance?
>
> As a side note I'm really asking anyone in this thread what their opinion
> is? I plan is to look through this thread and see who else mentioned Linux
> and see if I can get input so I'm ready to go before I dive too deep into my
> development.
>
> Thanks to you and to everyone who has been very patient with me, given me so
> many tips, and stepped me through my setup!
>
> Much appreciation,
>
> JJ Zolper
>
>
>
>
> --
> 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/-/y689VFsrhDUJ.
>
> 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: Tutorial for dev version not working (Polls app): admin

2012-01-30 Thread Ramiro Morales
On Sun, Jan 29, 2012 at 12:15 AM, Alec Taylor  wrote:
>
> Going through the tutorial using the latest trunk in a virtualenv.
>
> I am getting stuck in this section:
> https://docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-the-admin-form
>
> No matter how I rearrange the fields (even when I remove the
> "question" field), I cannot notice any difference in the poll admin
> screens. I have tried syncdb, and restarting the server.

I've just followed tutorial up to that  and it's working for me.
>
> I've looked at [...] the view screen
> (http://localhost:9400/admin/polls/poll/1/) and the add screen
> (http://localhost:9400/admin/polls/poll/add/). There are no
> differences in field order/display on any of these pages.

The two pages above are the ones that are supposed to reflect
the changes in vusual order) you perform to the 'fields' field of your
django.contrib.admin.ModelAdmin subclass named PollAdmin.

In that step of the tutorial one is supposed to work with the
polls/admin.py and edit it so the final contents are::

01  from polls.models import Poll
02  from django.contrib import admin
03
04  class PollAdmin(admin.ModelAdmin):
05  fields = ['pub_date', 'question'] # or the order you want to use
06
07  admin.site.register(Poll, PollAdmin)


Are you sure you are doing that?

--
Ramiro Morales

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