title: django save model ForeignKey relation
body: <p>in my model.py </p>
  
  <pre><code>class Layer(models.Model):
      user = models.IntegerField()
      name = models
      ...
  
  class Point(models.Model):
      layers = models.ForeignKey(Layer)
      meta = models.TextField()
      ...
  </code></pre>
  
  <p>in my view.py</p>
  
  <pre><code>def datasave(request, id):
      mid = request.POST.get("layerid",default = "")
      metas = request.POST.get("meta",default = "")
  
      cs = Point()
      cs.layers = mid
      cs.meta = metas
      cs.save()
  </code></pre>
  
  <p>but it gives an error in my django debug..in my project i use geodjango,openlayers and extjs... i didnt find any solution about <strong>saving my post</strong></p>
  
  <p>i didnt make any relation with my foreignkey.. basically i want to make a layer than when i want to add a point in my layer , i want save my point with layer id....</p>