Ok. So I fixed the problem by starting my PK values at 1. It seems
like there is a discrepancy between the way fixtures are imported into
a mysql db and a sqlite db. Using PK's that start at 1 works on both.
On Jan 25, 11:18 am, Johan wrote:
> Hi. I'm having a funny issue.
On Wed, 2012-01-25 at 09:41 -0800, JJ Zolper wrote:
> Okay I am glad to hear that something I knew was on the right track!
> Thanks Kenneth! However what is OSM? Open Street Maps? maybe you could
> tell me a little bit more about it as I have not heard of it
http://www.openstreetmap.org/
--
I think I am qualified to give you advice. When I say "qualified", I really
mean it.
First, I am not a very strong programmer myself. Even as a CS student, I
always feel like I am behind. Nontheless, I am always eager to learn and am
very determined to debug for days.
Python is not a big language
http://www.hoboes.com/Mimsy/hacks/replicating-djangos-admin/
--
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/-/-SBv03JcdswJ.
To post to this group, send
> When you are developing your Django app, the development server that
> comes with Django (python manage.py runserver) works fine on Windows.
> When you are ready to move things into production for everyone else
> access, you should not use the development server; instead you should
> use a
On 26 January 2012 13:14, JJ Zolper wrote:
>> The keywords were 'in production'. The development server (i.e. python
>> manage.py runserver) works fine under Windows. But when you want to
>> make the website accessible to your audience (the internet, company
>> etc.), you
> The keywords were 'in production'. The development server (i.e. python
> manage.py runserver) works fine under Windows. But when you want to
> make the website accessible to your audience (the internet, company
> etc.), you should host that on Linux.
I still don't quite understand. Can you
A friend of mine is joining my team, but unfortunately only knows a
little Python (CGI) and neither Django nor Pinax.
Which books and/or online tutorials should I recommend to him?
I am thinking:
- https://docs.djangoproject.com/en/dev/intro/
- http://www.lightbird.net/dbe/
But not sure if the
On 26 January 2012 12:05, JJ Zolper wrote:
>> Unless you have a
>> preference for Windows though, I wouldn't use it as a Django app web
>> server in production; there's far less support on the net to help you
>> out when things go wrong.
>
> Let me see if this what you
> Unless you have a
> preference for Windows though, I wouldn't use it as a Django app web
> server in production; there's far less support on the net to help you
> out when things go wrong.
Let me see if this what you mean... so when I want to run "python manage.py
runserver," a Django
On 26 January 2012 04:50, JJ Zolper wrote:
> In many of the (I)DEs (PythonWin, IDLE, probably the various EMACS
> and VI configurations, SciTE), one can edit a file, save it (some will
> save for you if needed), then hit some key combo which will spawn a
> Python interpreter
Just to fill in some more info, __unicode__ methods are also part of
core python and just happen to appear a lot in django code because of
its preference for 16-bit unicode strings (though I think the methods
are actually mostly invoked in the admin). There is also a __str__
function for
On Fri, Jan 13, 2012 at 3:35 PM, Micky Hulse wrote:
> Would it be possible for me to setup my list_filter to only show
> author names that have been assigned to my flat pages? For example,
> let's say I have 10 pages, and two of those pages have the been FK'd
> to "bjohnson"
"Krondaj wrote:
>I'm using python 2.7.2
>for another model i'm forming i have:
>
>def __unicode__(self):
>return (self.project_and_task, self.project_number,
> self.date_created, self.requested_by)
>
>to understand (i think the new method makes a little more sense?) the
>format
Not really I don't have any preference. Any input is welcome!
--
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/-/VoMln37CSU8J.
To post to this group, send
hi there,
has anyone of you an idea in which cycle the field method of
ForeignKey.validate is triggered?
I have a custom ForeignKey Field where i override the validate method.
So i expect that
ModelForm validation triggers
-> Model validation (clean methods) and this triggers
Just curious--is there any particular reason that you were using Visual
Studio?
On Wed, Jan 25, 2012 at 12:50 PM, JJ Zolper wrote:
> In many of the (I)DEs (PythonWin, IDLE, probably the various EMACS
> and VI configurations, SciTE), one can edit a file, save it (some will
>
In many of the (I)DEs (PythonWin, IDLE, probably the various EMACS
and VI configurations, SciTE), one can edit a file, save it (some will
save for you if needed), then hit some key combo which will spawn a
Python interpreter passing it the file for execution. You may even be
prompted to supply
Okay I am glad to hear that something I knew was on the right track! Thanks
Kenneth! However what is OSM? Open Street Maps? maybe you could tell me a
little bit more about it as I have not heard of it?
--
You received this message because you are subscribed to the Google Groups
"Django users"
On Jan 25, 4:54 pm, Krondaj wrote:
(snip)
> I get:
>
> File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36
> upload_doc = models.FileField(upload_to 'documents')
>
> ^
> SyntaxError: invalid syntax
>
> any idea's what's up?
Please re-read carefully the error
On Wed, 25 Jan 2012 16:54:55 +0100, Krondaj wrote:
in my model i'm using:
from django.db import models, datetime, MEDIA_ROOT
class RrsForm(models.Model):
#
upload_doc = models.FileField(upload_to 'documents')
I get this error when I run (before running
trying to show where ^ goes: haviing problems: i'm hoping this shows
it at the last quote mark:
> File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36
> upload_doc = models.FileField(upload_to 'documents')
>
>
trying to show where ^ goes: haviing problems: i'm hoping this shows
it at the last quote mark:
> File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36
> upload_doc = models.FileField(upload_to 'documents')
>
>
trying to show where ^ goes: haviing problems: i'm hoping this shows
it at the last quote mark:
> File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36
> upload_doc = models.FileField(upload_to 'documents')
>
>
trying to show where ^ goes: haviing problems: i'm hoping this shows
it at the last quote mark:
> File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36
> upload_doc = models.FileField(upload_to 'documents')
> ^.
>
upload_doc = models.FileField(upload_to 'documents')
^
On Jan 25, 3:54 pm, Krondaj wrote:
> in my model i'm using:
>
> from django.db import models, datetime, MEDIA_ROOT
>
> class RrsForm(models.Model):
> #
>
> upload_doc = models.FileField(upload_to 'documents')
the arrow should be pointing at the last quote at ')
like this (hopefully):
File "/home/chrissmith/Dcode/rrws/rrs/models.py", line 36
upload_doc = models.FileField(upload_to 'documents')
^
SyntaxError: invalid syntax
Any idea's??
On Jan 25, 3:54 pm, Krondaj wrote:
> in
in my model i'm using:
from django.db import models, datetime, MEDIA_ROOT
class RrsForm(models.Model):
#
upload_doc = models.FileField(upload_to 'documents')
I get this error when I run (before running syncdb):
python manage.py sql rrs
I get:
File
Hi Petr,
I'm using python 2.7.2
for another model i'm forming i have:
def __unicode__(self):
return (self.project_and_task, self.project_number,
self.date_created, self.requested_by)
to understand (i think the new method makes a little more sense?) the
format should be:
def
On Jan 25, 12:30 am, Rich Jones wrote:
> Hello, all!
(snip - Mike already answered)
> Will I need to do a database migration
> to do this? Or can I just add a 'verified=False' and run syncdb?
URL Validation is done in django, not in the database, so there's no
need for a
Hello,
wondering if there is any easy way to exclude a little part from a
template to be cached, on every site there is a the usual register/login
or you are logged in with a user menu, back in php+smarty times it was
easy solved using a dynamic tag to easily exclude a small part from
being
> "coded kid" wrote:
>If I may say, 'u' makes it easy to return variable with any hassle.
>And %s rep each string in your script. I think there should be other
>ways to go about this. Hope you get my point?
This is wrong. The prefix 'u' means that the following string is a Unicode
string,
My Python-expert partner suggested a clever workaround as follows:
As I'm already running through the model._meta.fields beforehand to
create header row for my .csv file, I can build a dictionary of the
choices to refer to later.
choices_lookup_dict = {}
header_row = []
for field in
Hi,
If you are looking for a fuzzy solution, you can find it here
https://github.com/sholiday/genderPredictor
This should suit your purpose.
It uses nltk package for predicting, but as Kenneth said, it won't be 100%
perfect. You can expect 80-90% success.
Hope this helps.
Thanks,
Anoop
atm
___
On Wed, 2012-01-25 at 09:49 +0100, Demetrio Girardi wrote:
> How can I go about this? Is there a publicly available database of
> first names divided by language and gender? A public web-service that
> guesstimates the gender?
not possible in my opinion. There may be some languages where a name
Hi. I'm having a funny issue. I have a fixture for my static tables.
They are all populated via syncdb using the fixture. On my sqlite test
environment it works perfectly. On my production environment, with a
MySQL database, the data is populated into the tables via the fixture
except for the
*I don't know if there are any databases or webservices available for the
purpose. But how would you handle the exceptions ?! Like if it does not
exist in the db, and common names used across genders ?!*
*
*
On Wed, Jan 25, 2012 at 11:49 AM, Demetrio Girardi <
demetrio.gira...@gmail.com> wrote:
>
This is not a django-specific question, but I couldn't find anything
useful on the subject and have no better place to ask.
Let's say I want to put "welcome {{user.first_name}}" on top of my
template. In many languages, "welcome" has to be declined by gender. I
have no use for the user's gender
38 matches
Mail list logo