I've been adding #tags to my auth urls to redirect traffic after signups
and resets. This keeps most of the routing intact, but gives you a hook to
redirect on in a later stage.
However, I'm not using django-registration so I can't give you any examples.
On Friday, September 5, 2014 11:23:54 PM
I have three primary levels of access in my project.
The public at /
Instructors at /instructor/
Staff at /staff/
The issue is with the password reset process.
If someone comes to /instructor/ and then goes through the password reset
process I want them to end up at /instructor/ when they're
Thanks a lot for your help.
I got another way to do that with StringIO the same way as the tempfile.
Could you tell me which is better? I'm not good at programing and
working on it.
http://stackoverflow.com/questions/3723220/how-do-you-convert-a-pil-image-to-a-django-file
于 2014/9/6 2:07,
I believe what you're looking for is an initial value. In __init__ the
following would achieve this:
self.fields['exercise_field'].initial = self.getRandomText(self.language,
self.dictionary)
On Friday, September 5, 2014 8:17:33 AM UTC-7, Yarick Antonov wrote:
>
> I have serious OOP design
I'd recommend not using a custom field for this. Instead, you can do
something like:
class ExerciseForm(forms.Form):
exercise_field = forms.CharField(widget=forms.TextInput(attrs={
'autocomplete': 'off', 'autofocus': 'autofocus'}))
def __init__(self, *args, **kwargs):
That's more a of a pillow question than a django question, but something
like this might work:
import tempfile
imagefile = tempfile.TemporaryFile()
im.save(imagefile)
return imagefile
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
On Fri, Sep 5, 2014 at 3:44 PM, ngangsia akumbo wrote:
>
> 11:13:37 web.1 | return util.import_app(self.app_uri)
> 11:13:37 web.1 | File
"/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in
import_app
> 11:13:37 web.1 | __import__(module)
>
You could also ask for tips on the modwsgi list which may have a good
solution.
--
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
There's also a native JSONResponse in django 1.7
https://docs.djangoproject.com/en/dev/ref/request-response/#jsonresponse-objects
--
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,
Another option, and one that is seeing a bit more momentum at the moment is
Django ReST Framework:
http://www.django-rest-framework.org
Yours,
Russ Magee %-)
On Fri, Sep 5, 2014 at 4:42 AM, Avraham Serour wrote:
> take a look at tastypie:
> http://tastypieapi.org/
>
What is probably happening lower down in the stack that the browser is closing
a connection to the server before all the content is sent back causing a broken
pipe error which is being reported as a KeyboardInterrupt exception by django.
Cheers
François
On Sep 5, 2014, at 4:03 AM, Rok Jaklič
Usually KeyboardInterrupt comes from ctrl+c being pressed in the terminal,
if that helps.
--
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
It guess it's pretty complicated, but it's possible to specify it kind of
like this:
class MyAdmin(admin.ModelAdmin):
fields = ['name', 'theplace']
def theplace(self, obj):
return obj.place.name
theplace.admin_order_field = ['place__name']
--
You received this message
I have serious OOP design problem, and i don't know the way to solve it.
*Here are two of my views:*
def exercise(request):
if request.method == 'GET':
request.session["exercise_start"] = time()
form = ExerciseForm(language = request.session["language"],
dictionary =
Looks like Gunicorn can't find your app module hellodjango.wsgi
Did you make a wsgi.py in your app folder as described in the Heroku docs?
On Friday, September 5, 2014 12:19:25 PM UTC+2, ngangsia akumbo wrote:
>
> i had a problem trying to deply django on heroku
>
> yems bphotel # foreman start
>
On Fri, Sep 5, 2014 at 3:28 PM, DJ-Tom wrote:
> Well that seems much too complicated just for running variations of the
> same application twice. There all kinds of stuff running on that server and
> adding a proxy to it would be a nightmare to check if everything still
Well that seems much too complicated just for running variations of the
same application twice. There all kinds of stuff running on that server and
adding a proxy to it would be a nightmare to check if everything still
works.
What a pity, Django is such a powerful tool, but lacks easy
take a look at tastypie:
http://tastypieapi.org/
http://django-tastypie.readthedocs.org/en/latest/index.html
On Fri, Sep 5, 2014 at 1:42 PM, Meghdeep Ray wrote:
> Hi,
> I am working on an Android Application which will have to send JSONs to
> and receive them from a
Hi,
I am working on an Android Application which will have to send JSONs to and
receive them from a Backend which I plan to build in Django.
Does anyone have any good resources for this specific thing ?
Or does anyone know of a GitHub project which already does this ?
Any help is greatly
i had a problem trying to deply django on heroku
yems bphotel # foreman start
11:13:37 web.1 | started with pid 9269
11:13:37 web.1 | [2014-09-05 11:13:37 +] [9269] [INFO] Starting
gunicorn 19.1.1
11:13:37 web.1 | [2014-09-05 11:13:37 +] [9269] [INFO] Listening at:
found this error trying to run the command
foreman start
yems bphotel # foreman start
11:13:37 web.1 | started with pid 9269
11:13:37 web.1 | [2014-09-05 11:13:37 +] [9269] [INFO] Starting
gunicorn 19.1.1
11:13:37 web.1 | [2014-09-05 11:13:37 +] [9269] [INFO] Listening at:
Thanks for the clarification guys. That is truly horrific :)
Sorry not to have tested my suggestion first.
Michael
On Thursday, September 4, 2014 5:20:18 PM UTC+1, Zachary McCord wrote:
>
> I simply didn't believe it at first, but sure enough, in python 2.7:
>
> >>> class Bomb(object):
> ...
I'm not sure what the specific issue with migrations is but this article
has a nice trick (intended for making temporary models/tables) that would
allow you to bring in a model and get it to sync whenever you like. I'd
suggest putting this in your test setUp() method. It uses 'syncdb' cause
it's
Hi,
on our production environment we get random KeyboardInterrupt exceptions
being thrown (Bad gateway in browser), but we do not know where to even
start to look.
We went through our raised exceptions but everything seems to be ok there...
Usually we get this if we click on links fast on
Hello, I'm working on a Django project that need to upload images and
there's limit on the image file size(like 5M). I need to compress the image
if it is larger than the upper limit.
And my problem is *how can i return the compressed image data just like
the format of file.read()?*
Here's how
Sorry Colin, I have no idea what you mean. Where in the django admin
settings would I specify this? AFAIK, the column names / labels / IDs are
auto-generated by the admin and it attempts the sort when you click on the
column heading.
On 4 September 2014 21:19, Collin Anderson
Thanks Collin!
Am Donnerstag, 4. September 2014 19:47:08 UTC+2 schrieb Collin Anderson:
>
> It hasn't been decided yet, and it's not necessarily 1.7. See the thread
> on django-developers.
> https://groups.google.com/d/topic/django-developers/KweKHgdIiz0/discussion
>
--
You received this
27 matches
Mail list logo