Re: Reset Demo Database Data (with Dates)

2013-04-13 Thread Tom Evans
On Sat, Apr 13, 2013 at 12:25 PM, Joey Espinosa wrote: > Thanks, Tom. I'm familiar with fixtures. My problem is that I don't know > which fields exactly will be date fields (so I have to check each model for > those fields), and then increment them according to the

Re: Django Package Manager and Alternate Configs

2013-04-13 Thread Tom Evans
On Sat, Apr 13, 2013 at 9:03 PM, Mark Lybrand wrote: > Another question that comes to my mind, is there such a thing as a Django > Package manager (kind of PPM for Perl or NPM for node or ruby gems or > NuGet... well, you get the idea)? > Django is just python, so these

Re: How to run cdn link in a local setup without screwed up hyperlink?

2013-04-13 Thread Tom Evans
On Sat, Apr 13, 2013 at 8:15 PM, Vince Fulco wrote: > what is the advantage? TIA, V. The protocol used for a '//foo' link is inferred from the protocol used to load the page that it is referenced in. Thus you can return the same HTML regardless of whether the page is served

Re: Unable to storing unicode data using django

2013-04-13 Thread Tom Evans
On Sat, Apr 13, 2013 at 6:37 AM, mln sastry wrote: > > > Hi Anshum, > Thank you for responding. > I defined a Book model as shown below and tried to save it from the admin > shell. > I am using python2.7.3 , django1.5, and python mysql driver 1.2.3. > I am not sure if

Re: Newbie CSRF protection questions

2013-04-13 Thread Tom Christie
One minor correction worth pointing out... "The first defense against CSRF attacks is to ensure that GET requests are >> side-effect free." What's meant by "side effect free"? > > It means that the request must be idempotent - that if you make the same > request on the server multiple times,

Re: VirtualEnv After the Fact

2013-04-13 Thread Shawn Milochik
You don't have to do anything differently than if you were starting out fresh. A virtualenv is a self-contained thing. Here's a recent blog post I wrote that might help: http://milocast.com/virtualenv.html You don't need to uninstall anything at all. However, you will need to install them again,

Django Package Manager and Alternate Configs

2013-04-13 Thread Mark Lybrand
Another question that comes to my mind, is there such a thing as a Django Package manager (kind of PPM for Perl or NPM for node or ruby gems or NuGet... well, you get the idea)? Related: are there packages available to switch out the Django ORM (sort of like .Net has EF or NHibernate)? Or to

VirtualEnv After the Fact

2013-04-13 Thread Mark Lybrand
Okay, so I started learning and messing around with Django before learning about VirtualEnv. What is the best thing for me to do to start using VirtualEnv? I assume that I must uninstall Django; is that right? Do I need to pretty much uninstall all the packages I have installed up to now (so

Re: need help with csv export

2013-04-13 Thread Mark Lybrand
Have you looked at this: http://docs.python.org/2/library/csv.html On Fri, Apr 12, 2013 at 2:53 PM, frocco wrote: > Hello, > > I have a php export file that I need to duplicate in django. > I am using django csv import > > Here is the PHP format I want. > >

Re: How to run cdn link in a local setup without screwed up hyperlink?

2013-04-13 Thread Vince Fulco
what is the advantage? TIA, V. On Sat, Apr 13, 2013 at 1:24 PM, Avraham Serour wrote: > Instead of http:// I recommend using just // , for example: > rel="stylesheet"> > > > > On Sat, Apr 13, 2013 at 6:29 PM, Vincent Fulco wrote: > >> [SOLVED] Oddly,

Re: How to run cdn link in a local setup without screwed up hyperlink?

2013-04-13 Thread Avraham Serour
Instead of http:// I recommend using just // , for example: On Sat, Apr 13, 2013 at 6:29 PM, Vincent Fulco wrote: > [SOLVED] Oddly, copied right from an online resource and colon was missing > in web address, accesses external site correctly now. > > > On Saturday, April

RE: Unable to storing unicode data using django

2013-04-13 Thread Anshum Verma
The issue is when you alter table all the columns switch to original charset which is usually latin1. If you run the command show create table mybooks you will be able to see that. Sent from my Windows Phone -- From: mln sastry Sent:

Re: Circular import problem

2013-04-13 Thread bubufff
Thank all, I just moved the import to the local function and it works. Still re-factoring the codes to overcome this issue completely On Friday, April 12, 2013 1:08:26 AM UTC+7, bub...@gmail.com wrote: > > Hi all, > > I have a util file, which will do some stuffs and then, update a model (so >

A django app for upload/select/crop avatar

2013-04-13 Thread 月忧茗
As the email title, I made a reusable django app for doing this common things. github: https://github.com/yueyoum/django-upload-avatar you can find a youbute link in github -- My GitHub https://github.com/yueyoum My Blog http://codeshift.org -- You received this message because you are

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Saturday, April 13, 2013 10:40:10 AM UTC-6, Ian wrote: > > On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: >> >> Thank you for the reply, >> >> The field is defined in the Django model as: >> location_description = models.TextField(_('additional route >> information'),

Re: need suggestion for wysiwyg with youtube embed support

2013-04-13 Thread frocco
Nevermind, the css default was hiding the iFrame button On Saturday, April 13, 2013 8:06:13 AM UTC-4, frocco wrote: > > I have ckeditor installed, but do not see any youtube support. > Are there any other django editors? > > Thanks > -- You received this message because you are subscribed to

Re: Oracle database TextField limitations and Django admin interface queries

2013-04-13 Thread Ian
On Friday, April 12, 2013 7:43:32 AM UTC-6, Lauri Savolainen wrote: > > Thank you for the reply, > > The field is defined in the Django model as: > location_description = models.TextField(_('additional route information'), > blank=True) > > Data length for the corresponding column in the database

Re: Changing homepage order

2013-04-13 Thread Larry Martell
On Sat, Apr 13, 2013 at 8:59 AM, Breda Doherty wrote: > Hey Folks, > > Totally new to Django, trying to learn how to do some stuff so I can change > stuff myself rather than hiring someone. > > I want to change the ordering of my home-page so that under Latest Activity

Re: How to run cdn link in a local setup without screwed up hyperlink?

2013-04-13 Thread Vincent Fulco
[SOLVED] Oddly, copied right from an online resource and colon was missing in web address, accesses external site correctly now. On Saturday, April 13, 2013 9:37:07 AM UTC-5, Vincent Fulco wrote: > > Attempting to use bootstrapcdn.com in a local bootstrap template on a VM > (with 2nd IP address

Changing homepage order

2013-04-13 Thread Breda Doherty
Hey Folks, Totally new to Django, trying to learn how to do some stuff so I can change stuff myself rather than hiring someone. I want to change the ordering of my home-page so that under Latest Activity the Reviews section would come down under The Tips Section. This is my site-

Re: Custom view on the home page based on groups assigned to user.

2013-04-13 Thread Enator24
HI Guddu, Thanks for the reply , could you put some examples as well. Thanks , Enator On Saturday, 13 April 2013 02:55:55 UTC+5:30, Guddu wrote: > > Within the templates, you can show different HTML elements based on the > user attributes/group. Traditional IF checks. > > Regards, > Guddu > >

django form

2013-04-13 Thread Harjot Mann
I have made a form in models.py file and displayed using html and i want that when i submit after filling, it should refer to another html file displaying the mesage that form data is filled but it is showing an error can anyone help me please?? -- You received this message because you are

Re: Help implement CSS into Django!!!!

2013-04-13 Thread Vincent Fulco
Running a dev server, is the following required or not--> "manage.py collectstatic"? The official docs would indicate no and there is too much mis-information floating around so it is hard to verify one way or the other for a noob. Django 1.4 would appear to be able to find static files in

Re: Django queryset 'in' operator fails on first call

2013-04-13 Thread Peter of the Norse
On Apr 10, 2013, at 7:44 AM, bradley griffiths wrote: > Corss posted from stack overflow > > When using the 'in' operator on a queryset, the first time the call is made > it fails. > > from django.db import models > > > class Category(models.Model): > name =

Re: Unable to storing unicode data using django

2013-04-13 Thread mln sastry
Hi Anshum, At first I modified the db charset with below commands. It did not help. ALTER DATABASE mybooks DEFAULT CHARACTER SET = 'utf8' DEFAULT COLLATE = 'utf8_general_ci' ALTER TABLE book DEFAULT CHARACTER SET = 'utf8' COLLATE = 'utf8_general_ci' It worked after I tried this ALTER

How to run cdn link in a local setup without screwed up hyperlink?

2013-04-13 Thread Vincent Fulco
Attempting to use bootstrapcdn.com in a local bootstrap template on a VM (with 2nd IP address to outside world) before pushing to heroku. Standard code in the head: http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css; rel="stylesheet"> Static urls ref in

RE: Unable to storing unicode data using django

2013-04-13 Thread Anshum Verma
This seems to be coming from MySQL . Can you check what is the default charset for the Book table in mysql and also that of the individual columns. You can share the output of show create table from mysql. Regards, Anshum Sent from my Windows Phone -- From: mln

need suggestion for wysiwyg with youtube embed support

2013-04-13 Thread frocco
I have ckeditor installed, but do not see any youtube support. Are there any other django editors? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Reset Demo Database Data (with Dates)

2013-04-13 Thread Joey Espinosa
Thanks, Tom. I'm familiar with fixtures. My problem is that I don't know which fields exactly will be date fields (so I have to check each model for those fields), and then increment them according to the current date (which will change every day). So if a demo happens on the 9th, and my field is

Testing tastypie DELETE, sending data in the body

2013-04-13 Thread Daniel França
I'm trying to test a REST request using tastypie ResourceTestCase and api_client, but it has a different behaviour from using angular js, for example. The data sent for a DELETE request comes in GET parameters of the request using the api_client of ResourceTestCase of tastypie.. like if it was