> Den 04/11/2014 kl. 23.07 skrev lnzy3...@gmx.de:
>
>
> Hi Erik,
>
> the idea was, that one Author can write in more than one language (eg. en and
> de), or no one at all. This was the background to use the ManyToManyField.
Yes, but then you simply create multiple Interest objects, right? O
How to find the word 'python' in string 'pythonpythonpythonpyth'?
--
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 p
a.find('python')
--
Rafael E. Ferrero
2014-11-05 8:16 GMT-03:00 Віталій Лисенко :
> How to find the word 'python' in string 'pythonpythonpythonpyth'?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and s
Sorry. I asked the question incorrectly.
Example.
I line 'pythonpythonpyth'. How do I know which word is the foundation line?.
Other examples:
"DOLORIUMD" --> rigth answer DOLORIUM
"HELLOL" --> HELLOL
"thewordword" --> thewordword
I need to know whether the word in the text is repeated and get it.
Vitaly feel free to look on https://www.python.org/ for a solution to your
issue and please keep only django related questions in this "Django users"
group.
Thank you.
Denis.
On 5 November 2014 12:41, Віталій Лисенко wrote:
> Sorry. I asked the question incorrectly.
> Example.
> I line 'pythonpy
I am trying to create version for REST application. Here is my URL Examle
www.myapi.com/foo [default version]
www.myapi.com/v1/foo [version one]
This is the project structure
├── __init__.py├── settings.py├── urls.py├── default_app│ ├── __init__.py│ ├──
serializer.py│ ├── models.py│ ├── views
You want to establish the path directories in your .wsgi file. Use
`addsitedir` to set the path to site-packages and set additional paths with
path.append, e.g.:
import os, sys, site
site.addsitedir('/path/to/site-packages')
sys.path.append('/extra/path/1')
sys.path.append('/extra/path/2')
I see where you are coming from Carl, thanks for the information. Do you
have a suitable example of where one might put error handling in the view
code?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop r
Swap the urls:
url(r'^v1/', include(v1_urls, namespace="v1"))
url(r'^', include(default_urls, namespace="default")),
On Wed, Nov 5, 2014 at 5:01 AM, Shoaib Ijaz wrote:
> I am trying to create version for REST application. Here is my URL Examle
>
> www.myapi.com/foo [default version]
> www.my
Hi Daniel,
Would it work to pass in an empty Context? You could also as you say, try
using render() to see if it would work.
Collin
--
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
Hello,
Would it work to import AppAdmin, instantiate it, and then call the methods
in a unit test?
Collin
--
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 dj
I have a fresh installation of Django 1.7 on virtualenv. When i run the
migration python manage.py migrate am getting
from xml.sax.expatreader import ExpatParser as _ExpatParser
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 24, in
raise SAXReaderNotAvailable("expat not suppor
Hello,
> You have to use a mod_wsgi that is built against python3. On
> Debian/Ubuntu, the package is called libapache2-mod-wsgi-py3.
>
Also, there's an Red Hat package of mod_wsgi built against python 3.3 here:
http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/repoview/python33-mod_wsg
Hi Daniel,
On 11/05/2014 08:44 AM, Daniel Grace wrote:
> I see where you are coming from Carl, thanks for the information. Do
> you have a suitable example of where one might put error handling in the
> view code?
Usually I try to keep view code as short and simple as possible (because
it is the
Hello,
> https://github.com/PyMySQL/mysqlclient-python
>
> I didn't tried that. Someone use it?
>
I use it.
There's a thread about it on django-developers.
https://groups.google.com/d/topic/django-developers/n-TI8mBcegE/discussion
Collin
--
You received this message because you are subscr
Hello,
You could also try creating an assignment tag something like:
{% get_base_url as base_url %}
https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#assignment-tags
That way you don't need to deal with context_processors.
Collin
--
You received this message because you are s
Hi David,
Interesting. Shouldn't the test database be a separate, fresh, empty
database (not a legacy database)?
Thanks,
Collin
--
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,
Hi,
I'm trying to write my own implementation of the Django comments
framework for various reasons and am wondering how one would link
comments to a particular object (model) of another type. For instance I
could have a ForeignKey in the Comment model pointing to a Blog post
article but that
Hi,
On 11/05/2014 11:09 AM, Some Developer wrote:
> I'm trying to write my own implementation of the Django comments
> framework for various reasons and am wondering how one would link
> comments to a particular object (model) of another type. For instance I
> could have a ForeignKey in the Commen
So I'm trying to write an ajax script that post data to django without
having to leave the page. Currently it is on submit however eventually im
going to put it on a timer.
Right now the function outputs to the console as a success but no data is
returned from django.
Here is my ajax
$(docu
Another note is I try to return posted data and out put it to the html for
testing and that doesn't get returned either.
--
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 e
On 05/11/2014 18:16, Carl Meyer wrote:
Hi,
On 11/05/2014 11:09 AM, Some Developer wrote:
I'm trying to write my own implementation of the Django comments
framework for various reasons and am wondering how one would link
comments to a particular object (model) of another type. For instance I
co
On 11/05/2014 11:35 AM, Some Developer wrote:
> On 05/11/2014 18:16, Carl Meyer wrote:
>> On 11/05/2014 11:09 AM, Some Developer wrote:
>>> I'm trying to write my own implementation of the Django comments
>>> framework for various reasons and am wondering how one would link
>>> comments to a partic
I'm having a strange issue with a pair of ManyToManyFields, where they're
acting like they're required fields in the admin even though they're not.
# In models.py
instructors = models.ManyToManyField(Instructor, blank=True)
students = models.ManyToManyField(Profile, blank=True)
I can
Hi,
Say I have a function as follows:
def is_supervisor(user):
return user.groups.filter(name='supervisor').exists()
...and a CBV for deleting records:
class DeleteFlow(DeleteView):
# etc...
How can I restrict access to this view using the function?
I understand that this may be possibl
updated my ajax to the following but for somereason it just says something
went wrong
$(document).ready(function() {
$('#get_info').submit(function() {
$.ajax({
type: "POST",
url: "/vmstatus/",
dataType: "json",
async:
Hi Scot,
On 11/05/2014 12:11 PM, Scot Hacker wrote:
> I'm having a strange issue with a pair of ManyToManyFields, where
> they're acting like they're required fields in the admin even though
> they're not.
>
>
> # In models.py
> |
> instructors =models.ManyToManyField(Instructor,blank=True)
On Wednesday, November 5, 2014 11:15:47 AM UTC-8, Carl Meyer wrote:
>
> So because you are manually creating your `instructors` and `students`
> fields on the form, the `blank=True` in the model has no effect; you
> need to pass `required=False` to your two form fields.
>
Got it, right you
On 05/11/2014 18:47, Carl Meyer wrote:
On 11/05/2014 11:35 AM, Some Developer wrote:
On 05/11/2014 18:16, Carl Meyer wrote:
On 11/05/2014 11:09 AM, Some Developer wrote:
I'm trying to write my own implementation of the Django comments
framework for various reasons and am wondering how one wou
Hello all,
Not long ago my book "Web Development with Django Cookbook" was published
and now you have a chance to win a free copy of it.
Check
http://djangotricks.blogspot.de/2014/11/win-free-copies-of-web-development-with-django-cookbook.html
for more details.
Cheers,
Aidas Bendoraitis
--
Actually - I'd suggest that the Python mailing list isn't the right place
either.
It sounds like the problem you're describing is called the Longest Repeated
Substring problem:
http://en.wikipedia.org/wiki/Longest_repeated_substring_problem
The solution to this problem is well known, and O(n) -
does this help? http://www.nltk.org/
On Wed, Nov 5, 2014 at 7:28 PM, Russell Keith-Magee
wrote:
>
> Actually - I'd suggest that the Python mailing list isn't the right place
> either.
>
> It sounds like the problem you're describing is called the Longest Repeated
> Substring problem:
>
> http://e
How access verbose_name of a instance in template?
I have:
car = Car.objects.get(pk=1)
In my template:
{{ car.color.??? }} {{ car.color }}
I wanna print the verbose_name, i want to it:
Color: red
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
On 6/11/2014 2:29 PM, Neto wrote:
How access verbose_name of a instance in template?
I have:
car = Car.objects.get(pk=1)
Try this in a script somewhere to see if it returns the verbose name
def get_verbose_name(obj, field):
return
obj.__class__()._meta.get_field_by_name('{0}'.format(fie
34 matches
Mail list logo