thanks every one:
@Donald Stufft: Your method eventually solves my problem, I really
appreciate it.
Thanks very much
On Fri, Oct 14, 2011 at 9:34 PM, Donald Stufft wrote:
> You need a __init__.py in your models.py. You also need to import all your
> models into that __init__.py.
>
> If I re
You need a __init__.py in your models.py. You also need to import all your
models into that __init__.py.
If I recall you'll also want to set
class Meta:
app_label = "the name of your package"
Because the models directory will screw up Django's ability to auto figure it
out.
On Saturday
I tried to delete models.py, and just have a /model subdirectory, but
"pythin manage.py syncdb" doesnt pick up the models in /models directory,
Do i need to change some configurations to tell Django to use /models
subdirectory.
Or do I need __init__.py in my /models subdirectory, I tried both, neit
Hi,
I currently have this models:
class Place(models.Model):
()
class VoteContext(models.Model):
name = models.CharField(max_length = 15, unique = True)
class Vote(models.Model):
place = models.ForeignKey(Place, related_name='voted_place')
context = models.
>From what i can understand, you want to test whether you can connect to
database from your django project or not. If this is your need then try the
following:
Go to the shell using following command: python manage.py shell
On the shell, issue the following statements:
from django.db import conn
A more comprehensive and canonical list is already on the wiki:
https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
If anything's missing then this site should probably be updated,
rather than splintering the list.
--
You received this message because you are subscribed to the Google Gro
http://mongoengine.org/
or
http://django-mongodb.org/
any ideas when django admin interface will have support for mongodb?
Thanks
Bedros
--
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@googl
Hi,
It looks like you don't have the static configured in your urls. Have a look
here:
https://docs.djangoproject.com/en/1.3/howto/static-files/#basic-usage
Regards,
Xavier.
Le 14 oct. 2011 à 18:54, Pulkit Mehrotra a écrit :
> hey i am having problem loading my static files in django 1.3
>
>
Check the Python Version.
Thanks,
Anoop
atm
___
Life is short, Live it hard.
On 14 October 2011 22:24, Andrew Johnson wrote:
> I download and untar Django-1.3.1 and try to install and get:
>
> django/Django-1.3.1> sudo python setup.py install
> Traceback (most recent call last):
> File "setup
You can get it directly from the Python repo[1].
Otherwise you need python-distribute or python-setuptools to build it
(you can just install one of them with 'zypper in python-...' or
download from the same[1] repo).
[1]: http://download.opensuse.org/repositories/devel:/languages:/python/
On Fri,
I download and untar Django-1.3.1 and try to install and get:
django/Django-1.3.1> sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 1, in ?
from distutils.core import setup
ImportError: No module named distutils.core
I don't see a file named distutils.co
hey i am having problem loading my static files in django 1.3
Here is my template:http://pastebin.com/nr7Z97SJ
here is my static file : http://pastebin.com/mEPYMGFt
here is my url file:http://pastebin.com/Dsz5T9zh
I have given the right address in staticfiles_dir but still the problem
persists a
Hello omerd --
If you give some concrete examples of what you are trying to do,
including providing your current models.py code, it will make it
easier for us to help you.
Since you have Registration and Details models, I am assuming you want
the user to be able to create/define these items, rath
Updated django free wb hosting list available at
http://freedjangohosting.com
--
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
dja
I can't find a valid way with Django OMR in order to get : ( a raw
query is also fine )
the Sites.sitename which made the Analysis where
(Analysi_Items.name='somename' and Analysis_Items.value='somevalue')
and (Analysi_items_name='somename' and
Analysis_Items.value='somevalue') and (Analysis_items
SOLVED I think.
I should have had :
def campaign(request, campaign_id):
ctx = {'phones': PersonPhones.objects.all(), "camppeople":
CampPeople.objects.all() }
return render_to_response("campaign.html", ctx,
context_instance=RequestContext(request))
in views.py.
--
You received this mes
Hello,
In the model I have :
def campaign(request, campaign_id):
ctx = {'camppeople': PersonPhones.objects.all() }
return render_to_response("campaign.html", ctx,
context_instance=RequestContext(request))
I also have a place where I store the info whether I want to call that
person:
cla
models should be lowercase, because that's the standard for every single
python package.
Cheers,
AT
On Fri, Oct 14, 2011 at 6:23 AM, Chen Xu wrote:
> Hi,
> I am new to Django.
> I have installed Django and go t everything set up correctly, just started
> some easy tutorials.
>
> So when I do
>
nm, solved
On Oct 14, 1:54 pm, Guy Nesher wrote:
> Hi DR,
>
> Thanks, I've just started developing in Python/Django so I do
> apologize for the bad naming convention (I'll fix this once everything
> works, don't want to add additional errors before I sort this).
>
> Having said that I assumed tha
Thank you for reply, but I still get the errror
Template error
In template .../weblog/templates/blog/article_archive.html, error at
line 6
Caught ViewDoesNotExist while rendering: Tried archive_day in module
django.views.generic.dates. Error was: 'module' object has no
attribute 'archive_day'
1
Hi DR,
Thanks, I've just started developing in Python/Django so I do
apologize for the bad naming convention (I'll fix this once everything
works, don't want to add additional errors before I sort this).
Having said that I assumed that if I define the foreignkey manually
and specifically select a
Thank you for reply, but I still get the errror
Template error
In template /home/pinglin/DjangoProjects/weblog/templates/blog/
article_archive.html, error at line 6
Caught ViewDoesNotExist while rendering: Tried archive_day in module
django.views.generic.dates. Error was: 'module' object has no
a
ajax use usualy load a div part of html with new content fetch from the
server when user do something,like click a submit button. and django process
the request as a simple usual request.
i have using prototype+scriptocolous for the simple syntax to make an ajax
form.
i see the jquery version also
On Friday, 14 October 2011 12:44:45 UTC+1, Guy Nesher wrote:
>
>
> Hi,
>
> I'm trying to populate a table with 2 foreign keys using a csv file
> and keep getting the following error :
> Cannot assign "238": "PrizetoRestaurant.RestauranttId" must be a
> "Restaurant" instance.
>
> I tried to man
On 14/10/2011, at 8:23 PM, Chen Xu wrote:
> Hi,
> I am new to Django.
> I have installed Django and go t everything set up correctly, just started
> some easy tutorials.
>
> So when I do
> Django-admin.py startapp blog
>
>
> it creates a /blog directory that looks like thsi
> /blog
> -
Hello everybody,
I am writing my first web application with Django.
I want to create a web of registration for many subjects.
However, each subject require different set of details to be supplied
so I don't know which models should I have in the database.
Currently I have two models:
Registration
Hi,
I'm trying to populate a table with 2 foreign keys using a csv file
and keep getting the following error :
Cannot assign "238": "PrizetoRestaurant.RestauranttId" must be a
"Restaurant" instance.
I tried to manually define the primary keys in those tables, and I'm
making sure I int() the data
>From what Iankesh said initially, I think he is having problems using
ajax to load part of a page not ajax as a whole.
Iankesh, it is possible to load only a portion of a page with ajax.
On 10/13/11, Sells, Fred wrote:
>> On Wed, Oct 12, 2011 at 9:17 AM, lankesh87 wrote:
>> > I am developing a
maybe you can try remove the models.py coz by default syncdb look for
models.py or anything beneath models folder...but cannot do both of them...
On Oct 14, 2011 5:49 PM, "Chen Xu" wrote:
> and when i tried "python manage.py sqlall " it gives empty.
> I think is it because I am not importing p
The docs (https://docs.djangoproject.com/en/dev/topics/http/views/
#customizing-error-views) state, "The page_not_found view should
suffice for 99% of Web applications, but if you want to override it,
you can specify handler404 in your URLconf".
The page_not_found view only passes on the requested
Ja - just catch OperationalError exception and check if the code was 1044.
Here are a list of all the error codes, so you can choose which ones you
want to handle individually:
http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html
http://dev.mysql.com/doc/refman/5.5/en/error-messages
I've go some python modules which automatically connect to the database then
they are loaded beacuse they have an __init__.py with
from django.core.management import setup_environ
import passion.settings
def loadSettings():
s = setup_environ(passion.settings)
print s
# this should only
On 13 October 2011 23:57, Andriyko wrote:
> urlpatterns = patterns('django.views.generic.dates',
> (r'^(?P\d{4})/v/(?P\d{2})/(?P[-\w]+)/
> $', DateDetailView.as_view(template_name='blog/article_detail.html',
> **entry_info_dict)),
> )
>
Hi,
You are using
(?P\w{3})
but in get_absolute_url you are
and when i tried "python manage.py sqlall " it gives empty.
I think is it because I am not importing properly or something else is
going wrong.
Thanks
On Fri, Oct 14, 2011 at 2:46 AM, Chen Xu wrote:
> I know that will work, but what I can do to just make "python manage.py
> syncdb" work
I know that will work, but what I can do to just make "python manage.py
syncdb" work?
Thanks very much
On Fri, Oct 14, 2011 at 2:37 AM, nicolas HERSOG wrote:
> You can also type python manage.py sqlall and copy paste sql
> instructions in your bd
>
> On Fri, Oct 14, 2011 at 11:23 AM, Chen Xu
You can also type python manage.py sqlall and copy paste sql
instructions in your bd
On Fri, Oct 14, 2011 at 11:23 AM, Chen Xu wrote:
> Hi,
> I am new to Django.
> I have installed Django and go t everything set up correctly, just started
> some easy tutorials.
>
> So when I do
> Django-admin.p
Hi,
I am new to Django.
I have installed Django and go t everything set up correctly, just started
some easy tutorials.
So when I do
Django-admin.py startapp blog
it creates a /blog directory that looks like thsi
/blog
- __init__.py
- tests.py
- models.py
- views.py
I know in D
On Thursday, 13 October 2011 23:58:00 UTC+1, Victor Hooi wrote:
>
> Hi,
>
> I have Django model and in one of the fields I need to store a regex string
> that I can later use.
>
> class Foo(models.Model):
> name = models.CharField(max_length=30, unique=True)
> regex_string = models.TextFie
38 matches
Mail list logo