OK I found what happen,
It need to build step by step
./manage.py migrate contenttypes
./manage.py migrate auth
./manage.py migrate sites
./manage.py migrate my_app
./manage.py migrate
max於 2017年3月24日星期五 UTC+8下午12時56分04秒寫道:
>
> I delete the table Django built(e.g. django_content_type) in my sql
I delete the table Django built(e.g. django_content_type) in my sql server,
and restart a new Django project
But when I did makemigrations the table didn;t show up, only
django_migrations created
Somebody know what is going on?
--
You received this message because you are subscribed to the Goo
There's no Django community standard of which I'm aware for doing this.
There *is* a standard way to run tests for Python projects which use
setuptools (which yours should do if you want people to be able to `pip
install` it) [1].
I usually do something like this blog post describes [2]. Or, y
Hi.
You should rename the "id" field in your model to something else. You can edit
your models.py and put another name, like "dbid" or something.
Django models reserve the "id" field for primary key; your table has another
field as primary key.
--
You received this message because you are sub
May be you are missing a data base migration?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, s
I ran into the same problem today in a script for creating large amounts of
test data. It would be awkward to re-organize the code it such a way that
related objects are assigned to fields only after they've been saved, so I
made a utility method to a take a model instance which has fields which
Hi,
The plans are to use classytags on the website at work and I'm going
through the documentation and running some experimental code as I go. This
is being run on with classtags 0.8.0, python 3.5.2, and django 1.10.3.
I've written some templates and using classy tags, written an inclusion tag
On Wednesday 22 March 2017 23:55:06 æ Žå¿—æ˜Ž wrote:
> Ubuntu 14.04 Desktop,
> apache 2.4.7,
> python 3.4.3,
> Djanog 1.10.6
And your WSGI config?
--
Melvyn Sopacua
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this grou
I have the following template:
$(document).ready(function(){
function captcha() {
$.ajax({
type: "POST",
url: "../captcha",
data:{},
contentType: "application/json",
dataType: "json",
Do you really have to use Apache for any reason?
If not I recommend using nginx+ uwsgi to deploy django, the killer feature
that convinced me to leave Apache was the simpler config file nginx have.
There are plenty of tutorials on how to deploy django like this, if you
don't find anything suitabl
Is quering Provider model significantly less efficient using this pattern?
class Provider(models.Model):
def __new__(cls, url, *args, **kwargs):
if 'google' in url:
return object.__new__(Google)
elif 'bing' in url:
return object.__new__(Bing)
url =
--System configuration:
Ubuntu 14.04 Desktop,
apache 2.4.7,
python 3.4.3,
Djanog 1.10.6
-- Apache2 works fine and I can see its default page, but cannot view any
Django page.
-- Searched on Google, and found lots of documents, tried tons of them,
still the same result.
anyone has experienc
G'day,
Very new to Django, I'm trying to connect to an existing MySQL database
that I am not familiar with. I used inspectDB to load up the database
models.py file, and am seeing these errors for some of the tables :
'id' can only be used as a field name if the field also sets
'primary_key=Tru
Is querying Provider model significantly less efficient using this pattern?
class Provider(models.Model):
def __new__(cls, url, *args, **kwargs):
if 'google' in url:
return object.__new__(Ekino)
elif 'bing' in url:
print('gowno')
url = models.CharFi
Thank you tim for the link.
Since on the referenced discussion someone asked for help to debug this, I
published my solution here:
http://stackoverflow.com/questions/42972444/django-detect-module-level-db-queries/42972445#42972445
I think it would help if you get a RuntimeException if you acces
Belowe the steps i have followed, but it doesnt work. I type in my browser
: www.localhost/capthca but no image is displayeded and i get an error : no
such table: captcha_captchastore
I dont find it very simple as suggested from documentation. Do you have any
simple tutorial?
1.pip instal
16 matches
Mail list logo