you want
class Choice(models.Model):
Note the capitalization of Model.
By convention, class names in python should be capitalized.
On Sat, Jan 16, 2016 at 5:56 PM, ofeyofey wrote:
> hi,
>
> I see the error there was dateTimeField and corrected that but now I
> get
>
hi,
I see the error there was dateTimeField and corrected that but now I
get
pi@raspberrypi ~/DjangoPi/mathGenerator $ python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File
Hi,
Thank you so much for looking at this.
I change setting.py to
INSTALLED_APPS = [
'generator',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
On Mon, Jan 11, 2016 at 07:06:22AM -0800, Brutus Schraiber wrote:
> Hi all…
>
> I have some models in a `test.py` file. How can I view the SQL that will be
> generated for them?
>
> Something like `django-admin sql` or similar but for models defined in
> `test.py` not in `models.py`.
Django
i want to create one view only with *post list* and *categories list* on my
main page template html.
the categories is a new class with colum title and is many to many
relatioship to my *post class.*
*class Category(models.Model):cattitle =
your app is called "generator", that's all you need to put in INSTALLED APPS
also, I'm not sure if this matters, but I tend to put my apps after the
ones bundled with django.
On Sat, Jan 16, 2016 at 5:30 PM, ofeyofey wrote:
> Hi,
>
> I am following the Django tutorial on
Hi,
I am following the Django tutorial on the Django site. Getting errors when
i try to make migrations after adding the app to the list of apps in
mathGenerator/settings.py
Setting up Django on a raspberry Pi. I don't think the fact that it is on
api should make any difference becasue it is
At least to me it doesn't make a lot of sense to define new models in your
tests, but I also don't know the particular problem you are solving.
On Sat, Jan 16, 2016 at 1:27 PM, Brutus Schraiber wrote:
> Wrong place to ask such things?
>
> This doesn't seem too
On Sat, Jan 16, 2016 at 2:28 AM, wrote:
> Thanks Larry for the reply. Nothing is happening after invoking the script(I
> think, I am doing something wrong in using the python script in Django
> views). I have tried running the script separately which is working fine and
>
Wrong place to ask such things?
This doesn't seem too uncommon or complicated, or am I missing the point?
Am Montag, 11. Januar 2016 16:06:22 UTC+1 schrieb Brutus Schraiber:
>
> Hi all…
>
> I have some models in a `test.py` file. How can I view the SQL that will
> be generated for them?
>
>
How you call your script in the view? You said that is import as from
utils.scriptname import classname but what method do you call in the view.
Remember, all code in script file that are not in a function o class will
execute at import time.
I guest you have something like
def
If you do this frequently, your view will likely growing with wastes of
script. You should clean it regularly.
On Friday, January 15, 2016 at 4:56:07 PM UTC+2, raman@gmail.com wrote:
>
> Hi,
>
> I have a script which is running fine and giving output in the form of
> list of lists. I want
12 matches
Mail list logo