Re: looking for ideas how to build a Django reminder service

2014-08-23 Thread Michael Lind Hjulskov
I'm hoping that it can 
-on change update user.days via ajax request
-return a succes alert message 

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cff7bc61-a16f-483f-815d-6883e47ae728%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: looking for ideas how to build a Django reminder service

2014-08-23 Thread Michael Lind Hjulskov
Here are some of the code i wrote in my attempt to build it

https://gist.github.com/michaelhjulskov/36aadfbd87213f3019ee

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a8c50fcc-838d-43d3-bb4c-b8897c31cf0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


looking for ideas how to build a Django reminder service

2014-08-23 Thread Michael Lind Hjulskov
Hi :)

I want to build an app for my web shop that can remind my customers to 
re-buy
I want it to be controlled by the customer and i'm thinking it should be 
onotoone related to user; callable simply by calling user.reminder.days

it should only send a reminder if its more that x days after latest order, 
and only once. So it need to save the latest reminder was sent y date and 
relative to ordernumber x

I'd like it to be very simple to include a dropdown i my templates where 
the user can change from "off" to e.g. 4 weeks(28 days)
For that i was thinking a templatetag would be the simplest and most 
flexible way to integrate it

I'd like the sending of reminder mails to be triggered by cronjob

Here's my questions:
Do you know of any existing snippet or app, that i could copy some of this 
code from? Something simular or just partly with simular functions.
Or do I need to build it from scratch? (i actually already started building 
it but got a little stuck)
Do you have any ideas how I can build it very simple?

Thanks a lot

Michael Hjulskov

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/46d76b66-a853-4aa5-be5d-eb035eea1e75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to simplify this code - newbie question

2014-06-30 Thread Michael Lind Hjulskov
Hi :o)

I would like to simplify *get_rating* to fewer lines of code:

class Product(AbstractProduct):

... just a little info about the model fields ...
title = charfield
parent = foreignkey(Product, related_name='variants')
rating = a float
def is_group - return True if it is a parent product and have variants 
...

@property
def get_rating(self):
u"""Return a product's rating - group product's ratings is gathered 
and presented as one"""
if self.is_group:
ratings_count = 0
if self.rating:
ratings_sum = self.rating
ratings_count+=1
for variant in self.variants.all():
if variant.rating:
ratings_sum += variant.rating
ratings_count+=1

if ratings_count > 0:
rating = float(ratings_sum) / ratings_count
return rating
return self.rating


My best guess is below, but it isnt working.
Will somebody please teach me what I should do and maybe explain to me why 
it isnt working.
I really want to learn this :o)

class Product(AbstractProduct):

@property
def get_rating(self):
u"""Return a product's rating - group product's ratings is gathered 
and presented as one"""
if self.is_group:
return float(Product.objects.filter(Q(parent__in=self) | 
Q(pk=self.pk)).aggregate(Avg('rating')))
return self.rating


Thanks alot :)

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/007ec8b7-4ab9-460e-bf3e-06c14f91b5db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: interesting project: django-crucrudile

2014-06-26 Thread Michael Lind Hjulskov
aggree

Den torsdag den 26. juni 2014 17.08.32 UTC+2 skrev Fabio Caritas 
Barrionuevo da Luz:
>
>
> https://github.com/pstch/django-crucrudile
>
>
>
> -- 
> Fábio C. Barrionuevo da Luz
> Acadêmico de Sistemas de Informação na Faculdade Católica do Tocantins - 
> FACTO
> Palmas - Tocantins - Brasil - América do Sul
>
> http://pythonclub.com.br/
>
> Blog colaborativo sobre Python e tecnologias Relacionadas, mantido 
> totalmente no https://github.com/pythonclub/pythonclub.github.io .
>
> Todos são livres para publicar. É só fazer fork, escrever sua postagem e 
> mandar o pull-request. Leia mais sobre como publicar em README.md e 
> contributing.md.
> Regra básica de postagem:
> "Você" acha interessante? É útil para "você"? Pode ser utilizado com 
> Python ou é útil para quem usa Python? Está esperando o que? Publica logo, 
> que estou louco para ler...
>
> 

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/effe2d04-364e-4fec-8a55-2f43dfa04d62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi Erik

I solved it.. You vere right I should check again the files in migration
folder
It was my IDE (Pycharm) which for some reason sometimes fail on uploading
files. So there was missing a few files, in a migrations folder
Sorry I didnt know that - Pycharm is still new for me. I'm use to Filezilla
which would prompt such error more clearly

Let me know if I can help You some day
I work with ecommerce and my number is 22116322

Thank You very much

Michael


2014-06-25 22:07 GMT+02:00 Michael Lind Hjulskov <mich...@hjulskov.dk>:

> hmm
> could it be:
> I run my local development env with a sqlite3 as database
> when I launch to deployment, I use mysql as db
>
> But doesnt South produce the same result when i run schemamigration,
> nomatter what db I'm using ?
> Hope You undderstand what I mean
>
>
>
> *Med venlig hilsen*
> Michael Hjulskov
>
> Mobil +45 22116322
>
>
> 2014-06-25 22:02 GMT+02:00 Michael Lind Hjulskov <mich...@hjulskov.dk>:
>
>  Den 25/06/2014 kl. 21.30 skrev Michael Lind Hjulskov <mich...@hjulskov.dk
>>> >:
>>>
>>> > Hi Erik
>>> >
>>> > Thank You
>>> >
>>> > I tried ./manage.py migrate myappname --traceback
>>> > Still the same error message and no more info available than before.
>>>
>>> Check your migrations folder and make sure you only have South migration
>>> files in there. Also, update to the latest South version, if you haven't
>>> already.
>>>
>> Just checked on the server
>>  There are only south files, and one __init__.py file i each migration
>> folder
>> I have South 0.8.4 installed, which is the latest I can find
>>
>>>
>>>
>> > PS I see You are from DK - I'm from Aalborg, You?
>>>
>>> Roskilde.
>>>
>> OKay I'm looking for a Danish django developer to help me sometimes when
>> i'm in finding myself in a dead end.
>>
>>>
>>> Erik
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/d6TT9Z6nDLI/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/1E00F7CB-168A-4EAA-92D9-89B235A25155%40cederstrand.dk
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJrCdYD6EOq48RDzO4U4Ud24nmZ_O%2BJ%3DG82eno7qHhDvyVhcXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
hmm
could it be:
I run my local development env with a sqlite3 as database
when I launch to deployment, I use mysql as db

But doesnt South produce the same result when i run schemamigration,
nomatter what db I'm using ?
Hope You undderstand what I mean



*Med venlig hilsen*
Michael Hjulskov

Mobil +45 22116322


2014-06-25 22:02 GMT+02:00 Michael Lind Hjulskov <mich...@hjulskov.dk>:

> Den 25/06/2014 kl. 21.30 skrev Michael Lind Hjulskov <mich...@hjulskov.dk
>> >:
>>
>> > Hi Erik
>> >
>> > Thank You
>> >
>> > I tried ./manage.py migrate myappname --traceback
>> > Still the same error message and no more info available than before.
>>
>> Check your migrations folder and make sure you only have South migration
>> files in there. Also, update to the latest South version, if you haven't
>> already.
>>
> Just checked on the server
>  There are only south files, and one __init__.py file i each migration
> folder
> I have South 0.8.4 installed, which is the latest I can find
>
>>
>>
> > PS I see You are from DK - I'm from Aalborg, You?
>>
>> Roskilde.
>>
> OKay I'm looking for a Danish django developer to help me sometimes when
> i'm in finding myself in a dead end.
>
>>
>> Erik
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/d6TT9Z6nDLI/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/1E00F7CB-168A-4EAA-92D9-89B235A25155%40cederstrand.dk
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJrCdYC33EsEvwETR4wvkECK9rA6q%2BvZjAS3Db8uOrwppknbRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
>
> Den 25/06/2014 kl. 21.30 skrev Michael Lind Hjulskov <mich...@hjulskov.dk
> >:
>
> > Hi Erik
> >
> > Thank You
> >
> > I tried ./manage.py migrate myappname --traceback
> > Still the same error message and no more info available than before.
>
> Check your migrations folder and make sure you only have South migration
> files in there. Also, update to the latest South version, if you haven't
> already.
>
Just checked on the server
There are only south files, and one __init__.py file i each migration folder
I have South 0.8.4 installed, which is the latest I can find

>
>
> PS I see You are from DK - I'm from Aalborg, You?
>
> Roskilde.
>
OKay I'm looking for a Danish django developer to help me sometimes when
i'm in finding myself in a dead end.

>
> Erik
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/d6TT9Z6nDLI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1E00F7CB-168A-4EAA-92D9-89B235A25155%40cederstrand.dk
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJrCdYDeKwcULCazqO6E04Av7oA_C5EfdiGTaWG-c%3DaFGwX7rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: page not found errors for most urls but main landing page displaying okay

2014-06-25 Thread Michael Lind Hjulskov
Hi

I had the exact same problem a few days ago. It was one of my templates 
that suddenntly was emty. very spooky
Or maybe you have an "extends" somewhere that is not correct
I would debug by looking in the relevant view and see which template is 
called, and the simplify that template to test if bug is in templates or 
elsewhere

Michael

Den onsdag den 25. juni 2014 21.08.35 UTC+2 skrev Lee:
>
> I have copied a Django project to my web server from a repo and am getting 
> the correct initial landing page for the website with the right styling 
> when I go to the main URL. Most other urls give "page not found" errors. 
> This includes the divs that are called on to make menus on the main page so 
> the "Page not found" error is printing over the main landing page. 
>
> I'm not sure where to start with diagnosis - any thoughts would be 
> appreciated.
>
> I have checked the urls.py file and have tried to go directly to the URLs 
> listed starting with http://mysite.org/project/ ...
>
> urlpatterns = patterns('',
> # index.html gives a page not found error
>  url(r'^$', 'project.views.index', name='index'),
>
>
> # These go to an unstyled page with correct text
> url(r'^signup/$', 'project.views.signUp', name='signup'),
> url(r'^login/$', 'project.views.login', name='login'),
> url(r'^logout/$', 'project.views.logout', name='logout'),
>
>
> # These also give a page not found error
>
> url(r'^$', 'project.views.index', name='index'),
> url(r'^map/nav/$', 'project.views.mapNavigation', name='mav_nav'),
> url(r'^interview/new/$', 'project.views.interviewSelect', 
> name='interview_select'),
> url(r'^interview/player/$', 'project.views.interviewPlayer', 
> name='interview_player'),
> url(r'^interview/retailer/$', 'project.views.interviewRetailer', 
> name='interview_retailer'),
>
> url(r'^popup/(?P.+)/(?P.+)/(?P.+)/(?P.+)/(?P.+)/(?P.+)/(?P.+)/(?P.+)/(?P.+)/$','project.views.popup',name='popup'),
>
>
> Lee
>
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54f9de55-4acf-4ede-bc28-f67cbac12eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi Erik

Thank You

I tried ./manage.py migrate myappname --traceback
Still the same error message and no more info available than before.

PS I see You are from DK - I'm from Aalborg, You?

Michael


2014-06-25 20:31 GMT+02:00 Erik Cederstrand <erik+li...@cederstrand.dk>:

> Den 25/06/2014 kl. 16.19 skrev Michael Lind Hjulskov <mhjuls...@gmail.com
> >:
>
> > Hi there :)
> >
> > I'm stuck with this problem
> > when I run python manage.py migrate myappname i get the following error:
> > AttributeError: 'module' object has no attribute 'Migration'
> >
> > I remember I had this problem before, and I remember that I solved it by
> deleting all pyc files  - I tried that - still error
> >
> > any clues?
>
>
> Try getting a backtrace:
>
> ./manage.py migrate myappname --traceback
>
>
> Erik
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/d6TT9Z6nDLI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4657E66A-9476-49A5-8EB1-BD2BEBA86049%40cederstrand.dk
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJrCdYBsCHdHm%2BJVnBho_FKM%3DOWB3Xu3iMODhFw9o9WzOS4vbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi

Here's a bit more info about the error
this is the line 
<https://github.com/matthiask/south/blob/master/south/migration/base.py#L314> 
where it fails in south

Hope to get help

Thanks

Den onsdag den 25. juni 2014 16.19.08 UTC+2 skrev Michael Lind Hjulskov:
>
> Hi there :)
>
> I'm stuck with this problem 
> when I run python manage.py migrate myappname i get the following error:
> AttributeError: 'module' object has no attribute 'Migration'
>
> I remember I had this problem before, and I remember that I solved it by 
> deleting all pyc files  - I tried that - still error
>
> any clues?
>
> Thank You
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/740a3b38-bca5-4514-9032-c181740228a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Howto update a package in venv

2014-06-25 Thread Michael Lind Hjulskov
Thanks Lachlan
Good to know
Python and Django is so cool and full of fancy stuff.
Have a good day

Den søndag den 22. juni 2014 13.07.20 UTC+2 skrev Lachlan Musicman:
>
> I'm a big fan of pip-tools: 
>
> pip install pip-tools 
>
> Once installed, you can do: 
>
> pip-review --interactive 
>
> which will check all installed apps and off to update them - you can 
> choose to upgrade for each app (hence the --interactive). 
>
> Cheers 
> L. 
>
> On 22 June 2014 07:28, Tom Evans <teva...@googlemail.com > 
> wrote: 
> > On Sat, Jun 21, 2014 at 4:57 PM, Michael Lind Hjulskov 
> > <mhju...@gmail.com > wrote: 
> >> Hi 
> >> 
> >> Im relative new to Django and Linux commands etc. 
> >> I hope to get help in here :o) 
> >> 
> >> I use virtualenv and requirements and one of the requirements is Sorl 
> >> But Sorl together with Django 1.6.5 is giving me this error on 
> runserver 
> >> 
> "/home/mh/v/local/lib/python2.7/site-packages/sorl/thumbnail/helpers.py:5: 
> >> DeprecationWarning: django.utils.simplejson is deprecated; use json 
> instead. 
> >>   from django.utils import simplejson" 
> >> 
> >> I believe i found a fix here 
> >> https://github.com/mariocesar/sorl-thumbnail/pull/165/files 
> >> 
> >> My question is 
> >> 1. Is there a way that I can simply add a line to my requirements.txt 
> file, 
> >> so that these two files will be automatically updated when I do the 
> "pip -r 
> >> requirements.txt" ? 
> >> 2. if not, how do I pull such changes into my sorl, inside my venv? 
> >> 
> >> Bby the way, is this the right place to ask such questions? or is there 
> >> anoter forum/group I should use? 
> >> 
> >> Thank You :o) 
> >> 
> >> Michael 
> > 
> > That fix (a better one, actually) is in a released version of 
> > sorl-thumbnail - 11.12.1b. 
> > 
> > So you should just be able to say "pip install --upgrade 
> > sorl-thumbnail" and it will install the correct (latest) version. 
> > 
> > You can check what version you currently have with "pip freeze". 
> > 
> > You can specify you want that exact version in your requirements.txt, 
> > or even on the command line - "sorl-thumbnail==11.12.1b" - but I 
> > wouldn't do that. I much prefer this in development 
> > "sorl-thumbnail>=11.12.1b", or more conservatively on a production 
> > box, "sorl-thumbnail>=11.12.1b,<11.13". 
> > 
> > Cheers 
> > 
> > Tom 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to django...@googlegroups.com 
> . 
> > Visit this group at http://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAFHbX1LHCcB%3DwOri0pZu9VBy5CRWCcySSVMukYMC0e84hcKAQg%40mail.gmail.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> The idea is that a beautiful image is frameable. Everything you need 
> to see is there: It’s everything you want, and it’s very pleasing 
> because there’s no extra information that you don’t get to see. 
> Everything’s in a nice package for you. But sublime art is 
> unframeable: It’s an image or idea that implies that there’s a bigger 
> image or idea that you can’t see: You’re only getting to look at a 
> fraction of it, and in that way it’s both beautiful and scary, because 
> it’s reminding you that there’s more that you don’t have access to. 
> It’s now sort of left the piece itself and it’s become your own 
> invention, so it’s personal as well as being scary as well as being 
> beautiful, which is what I really like about art like that. 
> ---
>  
>
> Adventure Time http://theholenearthecenteroftheworld.com/ 
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ceb303c0-3228-4e1e-96b8-bb58c9b211a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Howto update a package in venv

2014-06-25 Thread Michael Lind Hjulskov
That did the trick Tom
Thanks alot for spending Your time on me.
Cheers

Den lørdag den 21. juni 2014 23.29.24 UTC+2 skrev Tom Evans:
>
> On Sat, Jun 21, 2014 at 4:57 PM, Michael Lind Hjulskov 
> <mhju...@gmail.com > wrote: 
> > Hi 
> > 
> > Im relative new to Django and Linux commands etc. 
> > I hope to get help in here :o) 
> > 
> > I use virtualenv and requirements and one of the requirements is Sorl 
> > But Sorl together with Django 1.6.5 is giving me this error on runserver 
> > 
> "/home/mh/v/local/lib/python2.7/site-packages/sorl/thumbnail/helpers.py:5: 
> > DeprecationWarning: django.utils.simplejson is deprecated; use json 
> instead. 
> >   from django.utils import simplejson" 
> > 
> > I believe i found a fix here 
> > https://github.com/mariocesar/sorl-thumbnail/pull/165/files 
> > 
> > My question is 
> > 1. Is there a way that I can simply add a line to my requirements.txt 
> file, 
> > so that these two files will be automatically updated when I do the "pip 
> -r 
> > requirements.txt" ? 
> > 2. if not, how do I pull such changes into my sorl, inside my venv? 
> > 
> > Bby the way, is this the right place to ask such questions? or is there 
> > anoter forum/group I should use? 
> > 
> > Thank You :o) 
> > 
> > Michael 
>
> That fix (a better one, actually) is in a released version of 
> sorl-thumbnail - 11.12.1b. 
>
> So you should just be able to say "pip install --upgrade 
> sorl-thumbnail" and it will install the correct (latest) version. 
>
> You can check what version you currently have with "pip freeze". 
>
> You can specify you want that exact version in your requirements.txt, 
> or even on the command line - "sorl-thumbnail==11.12.1b" - but I 
> wouldn't do that. I much prefer this in development 
> "sorl-thumbnail>=11.12.1b", or more conservatively on a production 
> box, "sorl-thumbnail>=11.12.1b,<11.13". 
>
> Cheers 
>
> Tom 
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5e7e2b67-4ca7-436e-834e-82ff530fd614%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


on manage.py migrate appname I get: AttributeError: 'module' object has no attribute 'Migration'

2014-06-25 Thread Michael Lind Hjulskov
Hi there :)

I'm stuck with this problem 
when I run python manage.py migrate myappname i get the following error:
AttributeError: 'module' object has no attribute 'Migration'

I remember I had this problem before, and I remember that I solved it by 
deleting all pyc files  - I tried that - still error

any clues?

Thank You

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/757031e8-0951-4d97-908c-ba0e9f9fd88e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Howto update a package in venv

2014-06-21 Thread Michael Lind Hjulskov
Hi 

Im relative new to Django and Linux commands etc.
I hope to get help in here :o)

I use virtualenv and requirements and one of the requirements is Sorl
But Sorl together with Django 1.6.5 is giving me this error on runserver
*"/home/mh/v/local/lib/python2.7/site-packages/sorl/thumbnail/helpers.py:5: 
DeprecationWarning: django.utils.simplejson is deprecated; use json 
instead.*
*  from django.utils import simplejson"*

I believe i found a fix here
https://github.com/mariocesar/sorl-thumbnail/pull/165/files

My question is
1. Is there a way that I can simply add a line to my requirements.txt file, 
so that these two files will be automatically updated when I do the "pip -r 
requirements.txt" ?
2. if not, how do I pull such changes into my sorl, inside my venv?

Bby the way, is this the right place to ask such questions? or is there 
anoter forum/group I should use?

Thank You :o)

Michael

-- 
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, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d98cf906-4c21-441e-bec0-e3a86d1f5b7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.