Hello All,
I need some urgent help with this one. Am trying to show a user profile
when the user navigates to a url of this format
http://example.com/user/
I have provided the following expression in my urls.py file
(r'^user/(\w+)/$','accounts.views.userProfile'),
this working fine for normal u
I'm not sure, but I think this should work - try it out and let us know.
r'^user/([\w\-+.@]+)/$'
I'm not too good with regexes, either. No one is. Also, characters like "+"
are encoded in URLs - so you might want to think of that.
On Sun, Apr 22, 2012 at 1:42 PM, Swaroop Shankar V wrote:
> Hel
Thanks a lot for your reply. I just found an regex from some blog which is
as follows
(r'^user/([\w\'\.\-]+\s?[\w\'\.\-]+)/$','accounts.views.userProfile'),
and this seems to be working fine. Have not tested all the use cases for
this regex, but anyway username with . (dot) is working fine now.
I think that one also matches upto one whitespace character(space, tab or
newline) within the username(The \s).
On Sun, Apr 22, 2012 at 2:12 PM, Swaroop Shankar V wrote:
> Thanks a lot for your reply. I just found an regex from some blog which is
> as follows
>
> (r'^user/([\w\'\.\-]+\s?[\w\'\.\-
On Apr 22, 4:45 am, Taras_96 wrote:
> Hi,
>
> I've just upgraded to Django 1.4, and I was getting a
> 'builtin_function_or_method' object has no attribute 'split' error
> being thrown. I traced this down to an erroneous use of distinct, I
> had:
>
> X.objects.distinct(id)
>
> Which had previously
Hi,
I have a django admin form where in i have overriden two fields widgets to
display in ModelMultipleChoiceField
ie
attributea = forms.ModelMultipleChoiceField()
attributeb=forms.ModelMultipleChoiceField()
now i when i click save and add another data will be saved to database and
will be redi
I don't think it has ever been possible. That's why people put empty
models.py in their apps.
W dniu niedziela, 22 kwietnia 2012 06:25:20 UTC+1 użytkownik dor napisał:
>
> As of the latest version (1.4), this is impossible. What's the rationale
> behind it? Why isn't it fixed by now? If I make a
File myapp/models.py has this sample code..
from django.db import models
# model for 'user' table in database oracle_dbuser1:user
class User(models.Model):
. . .
customerid = models.BigIntegerField()
# model for 'customer' table in database oracle_dbuser2:customer
# Note that there is
I realize it is way past time I publicized this conference to the
Django users group - sorry for the omission. Open Django is a series
of three conferences, so we hope to have at least one that's
reasonable for you to travel through.
http://opendjango.com/
There's less than a month to go now, a
Hi, I am attempting to get nginx and uwsgi running on my local box, I
followed any number of tutorials and this one had the most complete
information.
http://gekicstart.ca/tech-posts/nginxuwsgidjango-stack/
It is written for Debian\Ubuntu so I had to transpose a bit. I got through
most of it and I
On Sat, Apr 21, 2012 at 10:25:20PM -0700, dor wrote:
> As of the latest version (1.4), this is impossible. What's the
> rationale behind it? Why isn't it fixed by now? If I make a fix,
> will it be accepted by the official team?
It is caused by the way Django loads and registers apps. Currently it
On Apr 22, 1:31 pm, Aditya Sriram M wrote:
> File myapp/models.py has this sample code..
>
> from django.db import models
>
> # model for 'user' table in database oracle_dbuser1:user
> class User(models.Model):
> . . .
> customerid = models.BigIntegerField()
>
> # model for 'customer' tabl
Hello,
I have a formset and some JavaScript to add more forms into this formset.
In a view, I iterate through the formset saving (not a ModelForm just Form
with save method) each form:
for form in formset:
form.save()
But I want to ignore empty forms that were added by JavasScript and not
This has been asked eleventy bajillion times, but I don't see a wiki
page on it? :)
I'd be happy to dig through the archives and compile a list if there's
no objection.
Would there be a problem including for-pay IDEs? (For example I use
PyCharm from time to time)
Any wiki managers or people wi
Thanks, I saw that .model thing too, but was also unsure about it... I
might just test it.
Em sábado, 21 de abril de 2012 19h04min30s UTC-3, akaariai escreveu:
>
> On Apr 21, 8:35 pm, Arruda wrote:
> > Should I create this many-to-many table as a normal model(no proxy) and
> set
> > the foo f
try running command prompt as an admin (right click, select Run As
Administrator)
fixed it for me.
--
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
So using your tip, I've done this:
class Foo1Bar(FooBar):
>
> objects = TypeAwareManager('foo__type',1)
>
> class Meta:
> proxy= True
>
> def change_fb(cls):
> old_foo = cls.foo
>
> @property
> def new_foo(self):
> return Foo1(self.old_fo
> Hi, I am attempting to get nginx and uwsgi running on my local box, I
> followed any number of tutorials and this one had the most complete
> information.
> http://gekicstart.ca/tech-posts/nginxuwsgidjango-stack/
>
> It is written for Debian\Ubuntu so I had to transpose a bit. I got through
> mo
Thanks I will give that a shot. Solid advice on the build version, my
machine is 3.2 and django is up to 2.7. I was wondering how to force a
script to run at 2.7 because I was worried about the version clash.
thanks a lot.
--jerry
On Sun, Apr 22, 2012 at 2:01 PM, Roberto De Ioris wrote:
>
> >
I'm using a generic TemplateView (django-1.4), but I want to be able to add
something to the context. Is that possible?
The docs at
https://docs.djangoproject.com/en/1.4/topics/generic-views/#adding-extra-context
talk about "an extra optional parameter, extra_context", but I don't get what
th
Quotes around extra_context
HTH
On Apr 22, 11:20 pm, Roy Smith wrote:
> I'm using a generic TemplateView (django-1.4), but I want to be able to add
> something to the context. Is that possible?
>
> The docs
> athttps://docs.djangoproject.com/en/1.4/topics/generic-views/#adding-ex...talk
> abo
Oh, and an extra set of curly braces:
url(r'^about$',
TemplateView.as_view(template_name='legal_ipsum/about.html',
{"extra_content":{"pagename":"about"}})),
On Apr 22, 11:28 pm, Ejah wrote:
> Quotes around extra_context
> HTH
>
> On Apr 22, 11:20 pm, Roy Smith wrote:
>
>
>
>
>
>
>
> > I'm us
Hello,
I have a form with ModelMultipleChoiceField on it, and I am getting
'DatabaseError: too many SQL variables' (using SQLite) when the user
picks more than 1000 entries in the selection widget and posts the
form.
The problem seems to be the method clean of ModelMultipleChoiceField,
which trie
Hi Lukas,
I haven't looked into the problem in detail, but it doesn't surprise me that it
exists.
It's also probable that it's something that is new to 1.4 (or, at least, that
it manifests in slightly different ways in 1.4). One of the features added in
1.4 is bulk insertion of data. This mea
This should help you out with adding extra context to TemplateView
http://godjango.com/15-class-based-views-part-1-templateview-and-redirectview/
Roy Smith wrote:
I'm using a generic TemplateView (django-1.4), but I want to be able
to add something to the context. Is that possible?
The docs a
hi there i am trying a simple example using AJAX, DJANGO, JQUERY, JSON and
my if request.is_ajax() is not working for some reason.. here is my code:
URLS: (r'api/newdoc/$', 'rose_miracle.views.newdoc'),
VIEW:
def newdoc(request):
# only process POST request
print "entrei"
if request.
dear psychok7:
You have no data from your ajax post, you should post some data with
your ajax post, like this
$.post("api/newdoc/", {'user':'your username'}, function(data) {
alert(data);
});
}
在 2012年4月23日星期一,psychok7 写道:
> hi there i am trying a simple example using AJAX, DJANGO
I set ANONYMOUS_USER_ID in my project setting.
It doesn't work.
Error message:
---
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py
This should work:
# django-guardian requires an anonymous user
ANONYMOUS_USER_ID = -1
Also, I think you need to "python manage.py syncdb" the first time you use it.
Brian Schott
bfsch...@gmail.com
On Apr 22, 2012, at 11:41 PM, su wrote:
> I set ANONYMOUS_USER_ID in my project setting.
> It
I got this error when I syncdb.
在 2012年4月23日星期一UTC+8上午11时51分18秒,BFSchott写道:
>
> This should work:
>
> # django-guardian requires an anonymous user
> ANONYMOUS_USER_ID = -1
>
> Also, I think you need to "python manage.py syncdb" the first time you use
> it.
>
> Brian Schott
> bfsch...@gmail.com
>
Ohh this looks little promising..
However,
1. I need a few cols of table1 and few from table 2 to be displayed. How
can we achieve that at the .filter() level? and
2. At the view level like using the list_display () for displaying them
in the Admin interface
On Sunday, 22 April 2
31 matches
Mail list logo